Answered step by step
Verified Expert Solution
Question
1 Approved Answer
how defining macros in code is tedious and why it is better to define macros for conditional compilation through the command line. In this
how defining macros in code is tedious and why it is better to define macros for conditional compilation through the command line. In this problem you will write a script called compile which can take three optional arguments; the string MERGE_ENABLED, SIGN_ENABLED and EDIT_ENABLED (in any order). We would like to be able to run compile with 0 or more of these arguments and the script would compile the Document Viewer program, that you updated in the previous problem, with the corresponding macros defined. For example, executing the script as follows: ./compile EDIT_ENABLED MERGE_ENABLED should compile the program with the macros EDIT_ENABLED and MERGE_ENABLED defined. The compile script should always name the resulting executable viewer like in the previous problem. After the above command has executed, the viewer executable would support the EDIT and MERGE feature but SIGN would be disabled.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Defining macros in code can be tedious because it requires modifying the source code and recompiling the program each time we want to enable or disabl...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started