Given a MAKEFILE design the data structure that a parser would create and then write code that iterates over that data structure executing commands if needed?
-
-
Answer:
MAKEFILE is used when compiling large CPP projects for faster compilation. When you change a single file, only this file can be recompiled instead of everything. It comprises of 3 components: target, dependencies and system commands. Based on a time stamp the compiler recompiles the target. If in case one of its dependencies is also a target, and has a more recent time stamp, this dependency is recompiled before the actual target specified as the first argument. Therefore if you consider this as a tree and each node has its children as its dependencies, then a post order traversal will accomplish our task. While traversing each node the corresponding dependency can be recompiled if its time stamp is higher than its parent.
community wiki at wiki.answers.com Visit the source
Related Q & A:
- How to write code to go through web pages automatically and get the required information?Best solution by Stack Overflow
- How to determine the structure of a protein?Best solution by ChaCha
- How does the structure of a chloroplast enable it to build up a concentration gradient of protons?Best solution by Yahoo! Answers
- What's the difference between a static data member and a regular data member?Best solution by eHow old
- What's the structure of a synovial joint?Best solution by en.wikipedia.org
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.