*** empty log message ***
[bpt/emacs.git] / src / Makefile.in
index 350753f..0717ee9 100644 (file)
@@ -1,19 +1,25 @@
-CPP = $(CC) -E
-MAKE = make  # BSD doesn't have it as a default.
+MAKE = make
+# BSD doesn't have it as a default.
+
+CC =gcc
+CPP = $(CC) -E -Is -Im
 #Note: an alternative is  CPP = /lib/cpp
 
+# Just to avoid uncertainty.
+SHELL = /bin/sh
+
 all: xmakefile doall
 
 doall:
-       $(MAKE) $(MAKEOVERRIDES) -f xmakefile ${MFLAGS} all
+       $(MAKE) CC=${CC} $(MAKEOVERRIDES) -f xmakefile ${MFLAGS} all
 
 #This is used in making a distribution.
 #Do not use it on development directories!
 distclean:
-       -rm -f paths.h config.h emacs-* temacs xemacs xmakefile core *~ \#* *.o
+       -rm -f paths.h config.h machine.h system.h emacs-* temacs xemacs xmakefile core *~ \#* *.o
 
 clean:
-       -rm -f temacs xemacs xmakefile core \#* *.o
+       -rm -f temacs xemacs xmakefile* core \#* *.o
 
 xemacs: xmakefile doxemacs
 
@@ -28,10 +34,16 @@ dotemacs:
 # If you have a problem with cc -E here, changing
 # the definition of CPP above may fix it.
 xmakefile: ymakefile config.h
-       rm -f xmakefile
+       -rm -f xmakefile xmakefile.new junk.c junk.cpp
        cp ymakefile junk.c
-       $(CPP) junk.c | sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ / /' | \
-       sed -n -e '/^..*$$/p' > xmakefile
+       $(CPP) junk.c > junk.cpp
+       < junk.cpp                                      \
+       sed     -e 's/^#.*//'                           \
+               -e 's/^[ \f\t][ \f\t]*$$//'             \
+               -e 's/^ /       /'                      \
+       | sed -n -e '/^..*$$/p'                         \
+       > xmakefile.new
+       mv -f xmakefile.new xmakefile
        rm -f junk.c
 
 tags TAGS: