home *** CD-ROM | disk | FTP | other *** search
- This program is the public domain Make program which appeared on
- mod.sources, Volume 7, number 91. I have ported it to the Amiga under
- Manx Aztec C version 3.40a. This short document assumes you know
- Make, and simply points out the Amiga specific features of the
- program. The supported switches are listed in the comment block at
- the beginning of module main.c. I offer no apologies for the fact that
- I ran the code through "indent -i4 -nfc1" on the 4.3BSD system at work
- before I started working on it.
- The program has been compiled under Manx Aztec C Version 3.40.
- It uses Manx's fexecv() function to execute commands and get
- their return value, and the Manx dos_packet() function to send an
- AmigaDOS packet to the file system for touch'ing purposes. Lattice
- recompilers need to change these (at least). Peculiar features
- of the Amiga version are:
-
- (1) The Amiga-specific sections of the code are #ifdef'd on the symbol
- amiga (note the lower case). I endorse Fred Fish's effort to
- have system and compiler-supplied #define's in lower case to
- ensure no collisions with user-supplied ones.
- (2) The file rules.c, routine makerules(), contains the definitions of
- the default built-in rules. For the Amiga, these are equivalent to
- the Makefile:
-
- CC = cc
- CFLAGS =
- AS = as
- AFLAGS =
-
- .c.o:
- $(CC) $(CFLAGS) $<
- .s.o:
- $(AS) $(AFLAGS) -o $@ $<
-
- (indented for clarity only). Thus, one could conceivably do:
- make CC=lc CFLAGS= AS=asm
- to run this make under Lattice C.
- (3) If the file S:builtins.make exists, its contents are read in
- instead of the built-in rules defined in makerules(). Thus, you
- can use different default rules on different disks and change
- the default rules without recompiling make.
- (4) A Control-D typed during execution of a command by make will cause
- an abort with exit status 1 AFTER the completion of that command.
- Control-C is an immediate abort, as you might expect.
- (5) Not really Amiga specific, but worth mentioning, is that characters
- special both to the local operating system (such as : in AmigaDOS) and
- to make may be used in the makefile by preceding them with \
- to temporarily override their special meaning. For example, to tell
- make that RAM:foo depends on AC:foo.c, write:
-
- RAM\:foo : AC\:foo.c
-
- (6) The Aztec fexecv() function, which is used by make to execute its
- commands, only works on programs in directories stored along the
- AmigaDOS PATH, so make sure your PATH includes the appropriate
- directories.
-
- Finally, I added one new feature in the non-machine-specific code:
- the name of the makefile can be a single dash "-", in which case a
- makefile is read from the standard input.
- About the only feature of "real" make missing here is the
- semicolon construct which allows a pair of lines such as the .c.o:
- rule and command above to be written as one line, viz:
- .c.o: ; $(CC) $(CFLAGS) $<
-
- Enjoy! Bug reports in the Amiga-specific stuff should be directed to
- me; others should go to caret@fairlight.OZ, the author of the rest of it.
- By the way, this code is superior to the Manx-supplied make--more switches
- and a better parser; in fact, this make will handle the Makefile for
- MicroGnuEmacs while Manx make chokes on the ln command.
-
- Steve Walton
- ametek!walton@csvax.caltech.edu (ARPA)
- WALTON@CALTECH (BITNET)
- ...!ucbvax!sun!megatest!ametek!walton
-
- Some notes by Olaf Seibert, KosmoSoft:
-
- I adapted this version of make to PDC, and enhanced it a little. In
- particular, if a line end with a backslash, the following newline and
- leading white space of the next line are now ignored. Previously, the
- newline was merely turned into a space. Also, comparison of filenames now
- is case-insignificant. Makefiles need not be internally consistent in the
- case of filenames. Also, the builtin rules are slightly different, for use
- with PDC.
-
- CC = ccx -c
- CFLAGS =
- AS = ccx -c
- AFLAGS =
-
- .c.o:
- $(CC) $(CFLAGS) $<
- .s.o:
- $(AS) $(AFLAGS) $<
-
- /*OIS*0.80*/
-
- I took out the \: feature, which worked only in target names, and not in
- prerequisite files. Instead, I added a more rational interpretation of
- colons. There is now at most one colon possible in a target name, which may
- not contain any spaces.
-
- I incorporared a few bug fixes relating to $< and $*, from the minix newsgroup.
- I added a new feature: the .PATH special target. See manual.
-
-