11.3 Converting old makefiles
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:
include header.mki
PROG = P4E
GLOBALS.4gl = P4E.4gl
FILES.4gl = \
${GLOBALS.4gl} \
bankwind.4gl \
ckapwind.4gl \
ckhdwind.4gl \
secufunc.4gl \
vendwind.4gl
FILES.per = ${ALLFORMS.per}
include_footer.mki
amakeallo can be ued to rebuild all the .o object files in a Makefile.
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.