Generating a demo version from production code

Ken Lerman lerman at stpstn.UUCP
Mon Nov 19 03:57:20 AEST 1990


In article <6734 at uceng.UC.EDU> dmocsny at minerva.che.uc.edu (Daniel Mocsny) writes:
[...]
->I need to create a demonstration version of a C program. This demonstration
->program will preserve the user-interface and screen-handling of the
->original, but will disable certain aspects of the original program's
->function, such as the ability to vary built-in data by editing, and
->writing/reading data files.
[...]
->--
->Dan Mocsny				Snail:
->Internet: dmocsny at minerva.che.uc.edu	Dept. of Chemical Engng. M.L. 171
->	  dmocsny at uceng.uc.edu		University of Cincinnati
->513/751-6824 (home) 513/556-2007 (lab)	Cincinnati, Ohio 45221-0171

We add a subdirectory called demo to each directory.  Then have your
makefile first create the demo version of a .o, then move it to the
demo subdirectory, and then create the non-demo version.  (In our
case, we have debug, non-debug versions, and shared-library versions
of some of our code.)

The only disadvantage we find in this is that when we are in a major
debug cycle, we always make both versions and that takes a little
longer.  Of course, we could have multiple targets to solve this problem.

Ken



More information about the Comp.lang.c mailing list