changeset 2812:cea361c342f4

Install ${srcdir} changes from DJM. * Makefile.in (SUBDIR_MAKEFILES): Add oldXMenu/Makefile to this list. (COPYDIR, COPYDESTS): Install files from both the etc directory in the source tree and the etc directory in the object tree. (${SUBDIR}): Pass the prefix variable down to submakes. (everywhere): Use `sed', not `/bin/sed'. Not all systems have sed in /bin. (lib-src/Makefile, src/Makefile, oldXMenu/Makefile): Edit in values for srcdir and VPATH. (install): Add `v' flag to tar command. Make sure that `dir' exists in ${srcdir}/info before copying it. Remember that the man pages come from the source tree, not the object tree. * configure.in: Remove remarks saying that the --srcdir option doesn't work. Create the etc directory in the object tree. Recognize configuration names of the form *-sun-solaris*. Recognize sunos5 and solaris as operating system names.
author Jim Blandy <jimb@redhat.com>
date Sat, 15 May 1993 22:57:27 +0000
parents 6cc1bf599a56
children 89b1121e2d43
files Makefile.in configure1.in
diffstat 2 files changed, 35 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Sat May 15 22:25:51 1993 +0000
+++ b/Makefile.in	Sat May 15 22:57:27 1993 +0000
@@ -202,15 +202,15 @@
 SUBDIR = lib-src src
 
 # The makefiles of the directories in $SUBDIR.
-SUBDIR_MAKEFILES = lib-src/Makefile src/Makefile
+SUBDIR_MAKEFILES = lib-src/Makefile src/Makefile oldXMenu/Makefile
 
 # Subdirectories to install, and where they'll go.
 # lib-src's makefile knows how to install it, so we don't do that here.
 # When installing the info files, we need to do special things to
 # avoid nuking an existing dir file, so we don't do that here;
 # instead, we have written out explicit code in the `install' targets.
-COPYDIR = etc ${srcdir}/lisp ${srcdir}/external-lisp
-COPYDESTS = ${etcdir} ${lispdir} ${externallispdir}
+COPYDIR = etc ${srcdir}/etc ${srcdir}/lisp ${srcdir}/external-lisp
+COPYDESTS = ${etcdir} ${etcdir} ${lispdir} ${externallispdir}
 
 all:	src/paths.h ${SUBDIR}
 
@@ -240,7 +240,7 @@
 
 ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
 	cd $@; $(MAKE) all ${MFLAGS} \
-		CC='${CC}' CFLAGS='${CFLAGS}' \
+		CC='${CC}' CFLAGS='${CFLAGS}' prefix='${prefix}' \
 		srcdir='${srcdir}/$@' libdir='${libdir}'
 
 ## We build the makefiles for the subdirectories here so that we can
@@ -255,13 +255,14 @@
 	  echo "# running \`make lib-src/Makefile' at the top of the" ;	\
 	  echo "# Emacs build tree instead, or editing" ;		\
 	  echo "# \`${srcdir}/lib-src/Makefile.in' itself." ;		\
-	  /bin/sed < ${srcdir}/lib-src/Makefile.in			\
+	  sed < ${srcdir}/lib-src/Makefile.in				\
 	  -e 's|^\(version *=\).*$$|\1'"${version}"'|'			\
 	  -e 's|^\(configname *=\).*$$|\1'"${configuration}"'|'		\
 	  -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|'			\
 	  -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|'		\
 	  -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|'			\
-	  -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|'			\
+	  -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/lib-src|'		\
+	  -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/lib-src|'		\
 	  -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|'		\
 	  -e 's|^\(ALLOCA *=\).*$$|\1'"${ALLOCA}"'|'			\
 	  -e 's|^CC *=.*$$|CC='"${CC}"'|'				\
@@ -280,8 +281,9 @@
 	  echo "# running \`make src/Makefile' at the top of the" ;	\
 	  echo "# Emacs build tree instead, or editing" ;		\
 	  echo "# \`${srcdir}/src/Makefile.in' itself." ;		\
-	  /bin/sed < ${srcdir}/src/Makefile.in				\
-	  -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|'			\
+	  sed < ${srcdir}/src/Makefile.in				\
+	  -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/src|'		\
+	  -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/src|'			\
 	  -e 's|^CC *=.*$$|CC='"${CC}"'|'				\
 	  -e 's|^LN_S *=.*$$|LN_S='"${LN_S}"'|'				\
 	  -e 's|^CFLAGS *=.*$$|CFLAGS='"${CFLAGS}"'|' 			\
@@ -290,10 +292,21 @@
 	chmod -w src/Makefile
 
 oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile Makefile
-	echo "Producing \`oldXMenu/Makefile' from \`${srcdir}/oldXMenu/Makefile.in'."
 	rm -f oldXMenu/Makefile.tmp
-	cp "${srcdir}"/oldXMenu/Makefile oldXMenu/Makefile
-
+	@echo "Producing \`oldXMenu/Makefile' from \`${srcdir}/oldXMenu/Makefile'."
+	@(echo "# This file is generated from \`${srcdir}/oldXMenu/Makefile'." ; \
+	  echo "# If you are thinking about editing it, you should seriously consider" ; \
+	  echo "# running \`make oldXMenu/Makefile' at the top of the" ; \
+	  echo "# Emacs build tree instead, or editing" ;		\
+	  echo "# \`${srcdir}/oldXMenu/Makefile.in' itself." ;		\
+	  sed < ${srcdir}/oldXMenu/Makefile				\
+	  -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/oldXMenu|'		\
+	  -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/oldXMenu|'		\
+	  -e 's|^CC *=.*$$|CC='"${CC}"'|'				\
+	  -e 's|^DEFS *=.*$$|DEFS='"${DEFS}"'|' \
+	  -e '/^# DIST: /d') > oldXMenu/Makefile.tmp
+	@${srcdir}/move-if-change oldXMenu/Makefile.tmp oldXMenu/Makefile
+	chmod -w oldXMenu/Makefile
 
 Makefile:
 	./config.status
@@ -318,7 +331,7 @@
            && [ `(cd $${dir}; /bin/pwd)` != `(cd $${dest}; /bin/pwd)` ] \
            && (echo "Copying $${dir}..." ; \
 	       rm -rf $${dest} ; mkdir $${dest} ; \
-	       (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xf - ); \
+	       (cd $${dir}; tar cf - . )|(cd $${dest}; umask 0; tar xvf - ); \
 	       for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
 		 rm -rf $${subdir}/RCS ; \
 		 rm -rf $${subdir}/CVS ; \
@@ -326,8 +339,8 @@
 		 rm -f  $${subdir}/*~ ; \
 	       done) ; \
 	 done
-	-(cd info ; \
-	  if [ ! -f ${infodir}/dir ]; then \
+	-(cd ${srcdir}/info ; \
+	  if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \
 	    ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 ./dir ${infodir}/dir ; \
 	  fi ; \
 	  if [ "`echo *.info*`" != "*.info*" ]; then \
@@ -335,8 +348,8 @@
 	      ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 $$f ${infodir}/$$f ; \
 	    done ; \
 	  fi)
-	for page in emacs etags ctags ; do \
-	  ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 etc/$${page}.1 \
+	cd ${srcdir}/etc; for page in emacs etags ctags ; do \
+	  ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 $${page}.1 \
 	    ${mandir}/$${page}${manext} ; \
 	done
 	${INSTALL_PROGRAM} ${INSTALLFLAGS} -m 1755 src/emacs \
--- a/configure1.in	Sat May 15 22:25:51 1993 +0000
+++ b/configure1.in	Sat May 15 22:57:27 1993 +0000
@@ -102,7 +102,7 @@
 
 The --srcdir=DIR option specifies that the configuration and build
 	processes should look for the Emacs source code in DIR, when
-	DIR is not the current directory.  This option doesn't work yet.
+	DIR is not the current directory.
 
 If successful, ${progname} leaves its status in config.status.  If
 unsuccessful after disturbing the status quo, it removes config.status."
@@ -196,8 +196,6 @@
 	    shift; val="$1"
 	  fi
           srcdir="${val}"
-
-	  echo "${progname}: Beware - the \`--srcdir' option doesn't work yet." >&2
 	;;
 
 	## Has the user tried to tell us where the X files are?
@@ -320,7 +318,9 @@
 if [ ! -d ./oldXMenu ]; then
   mkdir ./oldXMenu
 fi
-
+if [ ! -d ./etc ]; then
+  mkdir ./etc
+fi
 
 #### Given the configuration name, set machfile and opsysfile to the
 #### names of the m/*.h and s/*.h files we should use.
@@ -678,7 +678,7 @@
   ;;
 
   ## Suns
-  *-sun-sunos* | *-sun-bsd* )
+  *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
     case "${configuration}" in
       m68*-sunos1* )	machine=sun1 ;;
       m68*-sunos2* )	machine=sun2 ;;
@@ -690,6 +690,7 @@
     case "${configuration}" in
       *-sunos4.0*	  ) opsys=sunos4-0 ;;
       *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
+      *-sunos5* | *-solaris* ) opsys=sol2 ;;
       *			  ) opsys=bsd4-2   ;;
     esac
   ;;