Section 11.2: Summary Up Chapter 11: amake Section 11.4: 2. amake 

11.3 Converting old makefiles

11.3.1 prepmake

run "prepmake" in the directory containing old make file, "makefile".
This will create file "makefile.prep" containing instruction needed for dumping program definitions to individual make files (*.mk). Note: this functionality depends on the fact that your existing makefiles use command "fgllink" or other 4gl compiler commands somewhere in each defined program target, and list all source files in dependencies. If for any reason this is not true for some makefile you want to process, look at the script, it should be easy to substitute this with some other present command.
Next, "prepmake" will first run "touch *.4gl" (to force all targets into thinking they need building) and then "make -f makefile.prep". This will create one make file for each program defined in makefile.prep, named as <program>.mk, using script "genmake". Each .mk files will contain definitions of include headers and footers, and names of source files needed to build that program, and nothing else. Like this:

11.3.2 example

include header.mki
GLOBALS.4gl = P4E.4gl
FILES.4gl = \
${GLOBALS.4gl} \
bankwind.4gl \
ckapwind.4gl \
ckhdwind.4gl \
secufunc.4gl \
FILES.per = ${ALLFORMS.per}

11.3.3 amakeallo

amakeallo can be ued to rebuild all the .o object files in a Makefile.

11.3.4 amakeallf

amakeallf can be used to recompile all the .per form files in a Makefile.
Note: amake knows how to override header.mki, footer.mki, or both. You can also
override anything coming from header, and later, in footer, anything at all.
 Section 11.2: Summary Up Chapter 11: amake Section 11.4: 2. amake