home *** CD-ROM | disk | FTP | other *** search
-
- In my opinion, it would be useful to fix etc/Makefile to be compatible
- with the VPATH feature of GNU make. A context diff for that is bigger
- than the Makefile, so I'll enclose an entire Makefile instead. For
- readability, it has irrelevant rules omitted; they can reasonably be
- reinstated, except for the explicit rules for targets that depend on
- .c files (the ones with the $(CC) commands). Even those could be
- reinstated, if fixed the same way as those for, say, etags and ctags.
- The key is to use $@ and $< instead of explicit file names.
-
- The motivation for this is something like
-
- mkdir -p /usr/local/lemacs/etc
- cd /usr/local/lemacs/etc
- etc=/home/free/lemacs-19.6/etc
- make 'CC=gcc -O2' -f $etc/Makefile VPATH=$etc
-
- That results in an otherwise empty directory full of the executables
- that belong in exec-directory. Incidentally, it would also be useful
- not to distribute binaries in the etc directory; they have to be
- removed before this works.
-
- Here's the stripped down Makefile:
-
-
- EXECUTABLES = test-distrib etags ctags wakeup make-docfile \
- digest-doc sorted-doc movemail cvtmail fakemail yow env \
- emacsserver emacsclient b2m hexl
-
- all: ${EXECUTABLES}
-
- .c:
- $(CC) -o $@ ${CFLAGS} $< $(LOADLIBES)
-
- # This justs verifies that the non-ASCII characters
- # in the file `testfile' have no been clobbered by
- # whatever means were used to copy and distribute Emacs.
- # If they were clobbered, all the .elc files were clobbered too.
- test: test-distrib
- ./test-distrib
-
- etags: etags.c
- $(CC) -o $@ ${CFLAGS} -DETAGS $< $(LOADLIBES)
-
- ctags: etags.c
- $(CC) -o $@ ${CFLAGS} -DCTAGS $< $(LOADLIBES)
-
- movemail: movemail.c ../src/config.h
- yow: yow.c ../src/paths.h
-
- env: env.c ../src/config.h
- $(CC) -o $@ -DEMACS ${CFLAGS} $< $(LOADLIBES)
-
- # This one is NOT included in EXECUTABLES.
- # See ../src/ymakefile.
- emacstool: emacstool.c
- $(CC) emacstool.c -o emacstool -g -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
-
-