Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed 

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Accounting

Authors: Floyd A. Beams, Joseph H. Anthony, Bruce Bettinghaus, Kenneth Smith

11th Edition

978-0132568968, 9780132568968

More Books

Students also viewed these Accounting questions