adamakegen directory1 directory2 directory3
The given directories are the "active" directories. Any directories
other than an active directory that an active directory depends on is
a "passive" directory. AdaMakeGen will scan all of the Ada source code
in both the active and passive directories and generate a Makefile
that compiles the files in the active directories when they are out of
date. During execution, Adamakegen will print the active and passive
directories. The passive directories may have some informational
letters before them:
A few varieties of parameters are recognized:
-nNICK=/stuff/blah
-NNICK=/other/stuff
-e/junk1
-i/junk2
-ljunk3
-r
-fMakefile.sparc
-n creates a nickname in the Makefile so that the Makefiles can be
moved more easily. In the example above, any dependence starting
/stuff/blah/other would be replaced by $(NICK)/other.
-N creates a nickname that is used in the Makefile, but is never defined. This is useful if the user wants to define the value of the nickname in the user section or an included configuration file.
-e excludes the given directory (and everything below it) from being the target of dependencies in the Makefile, but the directory is still scanned for compilation units (and will warn about missing units).
-i ignores the given directory (and everything below it) so it won't be included in the list of passive directories. The user will be warned that any units from this directory are missing.
-l removes the given name (if present) from any directory name when adamakegen is looking for source code. If the ada libraries are placed in whatever/SUN4, executing "adamakegen dir1/SUN4 dir2/SUN4 -lSUN4" will use the ada libraries in dir1/SUN4 and dir2/SUN4, but the source code in dir1 and dir2. This also applies to all passive directories.
-r creates a Makefile that is relative to the current working directory. The default is to use complete path names for all files, but this option tells Adamakegen to use relative names for files below the current directory.
-f tells adamakegen to name the makefile the given name instead of Makefile. This allows users to choose the name of the Makefile. One potential use is to generate Imakefiles instead of Makefiles.
All of the options can be passed either on the command line or placed in an .adamakegenrc file. Options placed in the control file, should be given one per a line with no embedded spaces. Comments in the control file should be on their own line and proceeded with "--". The search path for the control file is (Only the first control file found is used.):
This will generate 2 files (even if they already exist):
make -- compiles everything
make depend -- re-runs adamakegen with the same parameters
make createlib -- builds the libraries with a.path information
make cleanlib -- removes all of the .obj's and a.cleanlib
make veryclean -- removes all of the library directories
make /path/.obj/test.obj -- compiles test.a and everything it depends on.
# DO NOT DELETE THIS LINE -- Ada Make Gen commands are below this line. # DO NOT DELETE THIS LINE -- Place user commands below this line.
all: $(AMGROOT)/bin/prodag
$(AMGROOT)/bin/prodag: $(ROOTS) $(EXTLIBS)
cd $(AMGROOT)/bin ; \
a.ld prodag -o prodag
ADAMAKEGEN The command to execute adamakegen DEPENDCMDS A hook to perform additional commands after adamakegen ADA The command for the Ada compiler AFLAGS Flags to pass to the Ada compiler ERRORTEST1, The two halves of the command to determine whether a ERRORTEST2 compilation was successful. MAKELIB The command to make an Ada library ADDLIB The command to add a directory to an Ada library CLEANLIB The command to empty out an Ada library RMLIB The command to remove an Ada library FIXLIB The command to "normalize" an Ada directoryAdditional portability is gained if the user defines nicknames (-n and -N) for the libraries that are used by the project. This allows installers to change the definition of the nickname at the top of the Makefile and not through out the Makefile.
ERRORTEST1 = test `grep error ERRORTEST2 = 2 > /dev/null | wc -l` -eq 0