]> code.delx.au - gnu-emacs/commitdiff
Install David Mackenzie's patches to make ${srcdir} work.
authorJim Blandy <jimb@redhat.com>
Sat, 15 May 1993 23:21:35 +0000 (23:21 +0000)
committerJim Blandy <jimb@redhat.com>
Sat, 15 May 1993 23:21:35 +0000 (23:21 +0000)
* Makefile.in (srcdir, VPATH): Get this value from the top-level
Makefile.
(xmakefile): Use ${srcdir} to find the files from which we produce
xmakefile.  Edit the values for srcdir and VPATH into xmakefile.
* ymakefile (srcdir, VPATH): New definitions for the Makefile
to edit.
(ALL_CFLAGS): Remove `-Is' and `-Im'; add `-I${srcdir}', and
`-I.'.
(emacs): Adjust dumping commands to deal with a separate source
directory.
(${etc}DOC): Pass `-d ${srcdir}' to make-docfile, to tell it where
to find the source files.
(prefix-args): Find the source code in ${srcdir}.

src/Makefile.in

index 70cad233587d6592477769c1f3cc1de5881b61e8..b6d56977738fa488669e24623ce10712d90bb251 100644 (file)
@@ -9,7 +9,8 @@ MAKE = make
 
 CC=cc
 CFLAGS=-g
-srcdir=.
+srcdir=@srcdir@/src
+VPATH=@srcdir@/src
 LN_S=ln -s
 
 # ============================= Targets ==============================
@@ -72,8 +73,8 @@ relock:
 ### the definition of CPP above may fix it.
 xmakefile: ymakefile config.h
        -rm -f xmakefile xmakefile.new junk.c junk.cpp
-       cp ymakefile junk.c
-       ${CPP} ${CFLAGS} junk.c > junk.cpp \
+       cp ${srcdir}/ymakefile junk.c
+       ${CPP} -I${srcdir} ${CFLAGS} junk.c > junk.cpp \
        -DC_SWITCH_SITE="`echo ${CFLAGS}' ' \
                          | sed -e 's/-g /C_DEBUG_SWITCH /' \
                                -e 's/-O[0-9]* /C_OPTIMIZE_SWITCH /'`"
@@ -81,6 +82,8 @@ xmakefile: ymakefile config.h
        sed     -e 's/^#.*//'                           \
                -e 's/^[ \f\t][ \f\t]*$$//'             \
                -e 's/^ /       /'                      \
+               -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|'      \
+               -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'|'       \
        | sed -n -e '/^..*$$/p'                         \
        > xmakefile.new
        mv -f xmakefile.new xmakefile