Blob Blame History Raw
--- ./src/Makefile.in.in.orig	2011-04-29 07:31:14.000000000 -0600
+++ ./src/Makefile.in.in	2011-05-03 14:09:39.714499623 -0600
@@ -37,6 +37,8 @@
 RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@
 #endif
 
+DESTDIR=
+
 PROGNAME=@PROGNAME@
 prefix=@prefix@
 SRC=@srcdir@
@@ -1019,7 +1021,7 @@
 #ifdef HAVE_SHLIB
 MAKEPATH=../lib-src/make-path
 install: $(PROGNAME)
-	$(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s
+	$(MAKEPATH) $(DESTDIR)$(archlibdir)/include $(DESTDIR)$(archlibdir)/include/m $(DESTDIR)$(archlibdir)/include/s
 	-@echo "Copying include files for ellcc..."
 	-@hdir=`pwd`; \
 	cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \
@@ -1033,12 +1035,12 @@
 		test -d s && hdrtars="$$hdrtars s/*"; \
 		test -d m && hdrtars="$$hdrtars m/*"; \
 		test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
-			(cd $(archlibdir)/include && umask 022 && tar xf -); \
-		chmod 755 $(archlibdir)/include; \
-		test -d $(archlibdir)/include/s && \
-		  chmod 755 $(archlibdir)/include/s; \
-		test -d $(archlibdir)/include/m && \
-		  chmod 755 $(archlibdir)/include/s;) \
+			(cd $(DESTDIR)$(archlibdir)/include && umask 022 && tar xf -); \
+		chmod 755 $(DESTDIR)$(archlibdir)/include; \
+		test -d $(DESTDIR)$(archlibdir)/include/s && \
+		  chmod 755 $(DESTDIR)$(archlibdir)/include/s; \
+		test -d $(DESTDIR)$(archlibdir)/include/m && \
+		  chmod 755 $(DESTDIR)$(archlibdir)/include/s;) \
 	done)
 #endif
 
--- ./lwlib/Makefile.in.in.orig	2011-04-29 07:31:10.000000000 -0600
+++ ./lwlib/Makefile.in.in	2011-05-03 14:09:39.703499575 -0600
@@ -21,6 +21,8 @@
 ## along with the Lucid Widget Library.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
+DESTDIR=
+
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .h .o .i .s
--- ./lib-src/Makefile.in.in.orig	2011-04-29 07:31:08.000000000 -0600
+++ ./lib-src/Makefile.in.in	2011-05-03 14:09:39.702499571 -0600
@@ -22,6 +22,8 @@
 ## above a certain point in this file are in shell format instead of
 ## in C format.  How the hell is this supposed to work? */
 
+DESTDIR=
+
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .h .o
@@ -242,26 +244,26 @@
 ## just run them directly from lib-src.
 ${archlibdir}: all
 	@echo; echo "Installing utilities run internally by XEmacs."
-	./make-path ${archlibdir}
+	./make-path $(DESTDIR)${archlibdir}
 	if test "`(cd ${archlibdir} && $(pwd))`" != "`$(pwd)`"; then \
 	  for f in ${PRIVATE_INSTALLABLE_EXES}; do \
-	    (cd .. && $(INSTALL_PROGRAM) lib-src/$$f ${archlibdir}/$$f) ; \
+	    (cd .. && $(INSTALL_PROGRAM) lib-src/$$f $(DESTDIR)${archlibdir}/$$f) ; \
 	  done ; \
 	fi
 	if test "`(cd ${archlibdir} && $(pwd))`" \
 	     != "`(cd ${srcdir}     && $(pwd))`"; then \
 	  for f in ${PRIVATE_INSTALLABLE_SCRIPTS}; do \
-	    (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f ${archlibdir}/$$f); \
+	    (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f $(DESTDIR)${archlibdir}/$$f); \
 	  done ; \
 	fi
 
 install: ${archlibdir}
 	@echo; echo "Installing utilities for users to run."
 	for file in ${PUBLIC_INSTALLABLE_EXES} ; do \
-	  (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
+	  (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} $(DESTDIR)${bindir}/$${file}) ; \
 	done
 	for file in ${PUBLIC_INSTALLABLE_SCRIPTS} ; do \
-	  (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \
+	  (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} $(DESTDIR)${bindir}/$${file}) ; \
 	done
 
 uninstall:
--- ./tests/tooltalk/Makefile.orig	2011-04-29 07:31:17.000000000 -0600
+++ ./tests/tooltalk/Makefile	2011-05-03 14:09:39.715499628 -0600
@@ -27,6 +27,8 @@
 
 ### Code:
 
+DESTDIR=
+
 CC       = cc -Xc
 CPPFLAGS = -I/usr/openwin/include
 CFLAGS   = -g -v -DNeedFunctionPrototypes
--- ./man/Makefile.orig	2011-04-29 07:31:11.000000000 -0600
+++ ./man/Makefile	2011-05-03 14:09:39.711499611 -0600
@@ -18,6 +18,8 @@
 # You should have received a copy of the GNU General Public License
 # along with XEmacs.  If not, see <http://www.gnu.org/licenses/>.
 
+DESTDIR=
+
 SHELL    = /bin/sh
 MAKEINFO = makeinfo
 TEXI2DVI = texi2dvi
--- ./etc/tests/external-widget/Makefile.orig	2011-04-29 07:31:06.000000000 -0600
+++ ./etc/tests/external-widget/Makefile	2011-05-03 14:10:13.269646148 -0600
@@ -16,6 +16,8 @@
 ## You should have received a copy of the GNU General Public License
 ## along with XEmacs.  If not, see <http://www.gnu.org/licenses/>.
 
+DESTDIR=
+
 CFLAGS += -Xc -g -DTOOLTALK
 EMACSHOME = ../../..
 EMACSLIBDIR = $(EMACSHOME)/editor/src
--- ./Makefile.in.in.orig	2011-05-03 13:50:06.283333766 -0600
+++ ./Makefile.in.in	2011-05-03 14:15:27.424015117 -0600
@@ -59,6 +59,8 @@
 RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@
 #endif
 
+DESTDIR=
+
 SHELL = /bin/sh
 LANG = C
 LC_ALL = C
@@ -398,43 +400,43 @@
 	(cd ./$${subdir} && $(MAKE) $(RECURSIVE_MAKE_ARGS) install prefix=${prefix} \
 	    exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
 	    archlibdir=${archlibdir}) ; done
-	if test "`(cd ${archlibdir} && $(pwd))`" != \
+	if test "`(cd $(DESTDIR)${archlibdir} && $(pwd))`" != \
 		"`(cd ./lib-src && $(pwd))`"; then \
 	   if test -f ../Installation; then \
-		${INSTALL_DATA} ../Installation ${archlibdir}/Installation; \
+		${INSTALL_DATA} ../Installation $(DESTDIR)${archlibdir}/Installation; \
 	   fi; \
-	   ${INSTALL_DATA} lib-src/config.values ${docdir}/config.values; \
-	   ${INSTALL_DATA} lib-src/DOC ${docdir}/DOC; \
+	   ${INSTALL_DATA} lib-src/config.values $(DESTDIR)${docdir}/config.values; \
+	   ${INSTALL_DATA} lib-src/DOC $(DESTDIR)${docdir}/DOC; \
 	   for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \
 	     do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \
 	else true; fi
 #if (defined(PDUMP) && !defined (DUMP_IN_EXEC)) || (defined (PDUMP) && defined(WIN32_NATIVE))
-	${INSTALL_DATA} src/${PROGNAME}.dmp ${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp
+	${INSTALL_DATA} src/${PROGNAME}.dmp $(DESTDIR)${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp
 #endif
 #ifdef WIN32_NATIVE
-	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}
-	-chmod 0755 ${bindir}/${PROGNAME}
+	${INSTALL_PROGRAM} src/${PROGNAME} $(DESTDIR)${bindir}/${PROGNAME}
+	-chmod 0755 $(DESTDIR)${bindir}/${PROGNAME}
 #else
 # ifdef CYGWIN
-	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe
-	-chmod 0755 ${bindir}/${PROGNAME}-${version}.exe
-	cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME}
-	cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME}
+	${INSTALL_PROGRAM} src/${PROGNAME} $(DESTDIR)${bindir}/${PROGNAME}-${version}.exe
+	-chmod 0755 $(DESTDIR)${bindir}/${PROGNAME}-${version}.exe
+	cd $(DESTDIR)${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME}
+	cd $(DESTDIR)${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME}
 # else
-	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}
-	-chmod 0755 ${bindir}/${PROGNAME}-${version}
-	cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
-	cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${SHEBANG_PROGNAME}
+	${INSTALL_PROGRAM} src/${PROGNAME} $(DESTDIR)${bindir}/${PROGNAME}-${version}
+	-chmod 0755 $(DESTDIR)${bindir}/${PROGNAME}-${version}
+	cd $(DESTDIR)${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
+	cd $(DESTDIR)${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${SHEBANG_PROGNAME}
 # endif /* CYGWIN */
 #endif /* WIN32_NATIVE */
 #ifdef HAVE_SHLIB
-	$(INSTALL_DATA) $(srcdir)/modules/auto-autoloads.* $(moduledir)
+	$(INSTALL_DATA) $(srcdir)/modules/auto-autoloads.* $(DESTDIR)$(moduledir)
 #endif
 
 install-arch-indep: mkdir info
 	-@set ${COPYDESTS} ; \
 	 for dir in ${COPYDIR} ; do \
-	   if test "`(cd $$1 && $(pwd))`" != \
+	   if test "`(cd $(DESTDIR)$$1 && $(pwd))`" != \
 		   "`(cd $${dir} && $(pwd))`"; then \
 	     : do nothing - echo "rm -rf $$1" ; \
 	   fi ; \
@@ -442,35 +444,35 @@
 	 done
 	-set ${COPYDESTS} ; \
 	 for dir in ${COPYDESTS} ; do \
-	   if test ! -d $${dir} ; then mkdir $${dir} ; fi ; \
+	   if test ! -d $${dir} ; then mkdir $(DESTDIR)$${dir} ; fi ; \
 	 done ; \
 	 for dir in ${COPYDIR} ; do \
 	   dest=$$1 ; shift ; \
 	   test -d $${dir} \
 	     -a "`(cd $${dir} && $(pwd))`" != \
-		"`(cd $${dest} && $(pwd))`" \
+		"`(cd $(DESTDIR)$${dest} && $(pwd))`" \
 	   && (echo "Copying $${dir}..." ; \
 	       (cd $${dir} && $(TAR) -cf - . ) | \
-		(cd $${dest} && umask 022 && $(TAR) -xf - );\
-	       chmod 0755 $${dest}; \
-	       for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
+		(cd $(DESTDIR)$${dest} && umask 022 && $(TAR) -xf - );\
+	       chmod 0755 $(DESTDIR)$${dest}; \
+	       for subdir in `find $(DESTDIR)$${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
 		 (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; \
 	       done) ; \
 	 done
 	if test "`(cd ${srcdir}/info && $(pwd))`" != \
-		"`(cd ${infodir} && $(pwd))`" && cd ${srcdir}/info; then \
-	  if test ! -f ${infodir}/dir -a -f dir ; then \
-	    ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \
+		"`(cd $(DESTDIR)${infodir} && $(pwd))`" && cd ${srcdir}/info; then \
+	  if test ! -f $(DESTDIR)${infodir}/dir -a -f dir ; then \
+	    ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir ; \
 	  fi ; \
 	  for file in *.info* ; do \
-	    ${INSTALL_DATA} $${file} ${infodir}/$${file} ; \
-	    chmod 0644 ${infodir}/$${file}; \
+	    ${INSTALL_DATA} $${file} $(DESTDIR)${infodir}/$${file} ; \
+	    chmod 0644 $(DESTDIR)${infodir}/$${file}; \
 	  done ; \
 	fi
 	cd ${srcdir}/etc && \
 	  for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \
-	    ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
-	    chmod 0644 ${mandir}/$${page}${manext} ; \
+	    ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 $(DESTDIR)${mandir}/$${page}${manext} ; \
+	    chmod 0644 $(DESTDIR)${mandir}/$${page}${manext} ; \
 	  done
 	@echo "If you would like to save approximately 4M of disk space, do"
 	@echo "make gzip-el"
@@ -480,19 +482,23 @@
 	@echo "${lispdir}"
 
 gzip-el:
-	$(SHELL) ${srcdir}/lib-src/gzip-el.sh ${lispdir}
+	$(SHELL) ${srcdir}/lib-src/gzip-el.sh $(DESTDIR)${lispdir}
 
 ## Build all the directories to install XEmacs in.
 ## Since we may be creating several layers of directories,
 ## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use
 ## make-path instead of mkdir.  Not all mkdirs have the `-p' flag.
 mkdir: FRC.mkdir
-	${MAKEPATH} ${COPYDESTS} ${docdir} ${infodir} ${archlibdir} \
-	  ${mandir} ${bindir} ${datadir} ${libdir} \
+	for dir in \
+	    ${COPYDESTS} ${docdir} ${infodir} ${archlibdir} \
+	    ${mandir} ${bindir} ${datadir} ${libdir} \
 #ifdef HAVE_SHLIB
-	  ${moduledir} ${sitemoduledir} \
+	    ${moduledir} ${sitemoduledir} \
 #endif
-	  ${sitelispdir}
+	    ${sitelispdir} ; \
+	do \
+	    ${MAKEPATH} $(DESTDIR)$${dir} ; \
+	done ;
 
 ## Install bundled packages, if present.
 
--- ./modules/base64/Makefile.orig	2011-04-29 07:31:12.000000000 -0600
+++ ./modules/base64/Makefile	2011-05-03 14:09:39.712499615 -0600
@@ -25,6 +25,8 @@
 # 'installed'.
 #
 
+DESTDIR=
+
 SHELL=/bin/sh
 RM=rm -f
 CC=../../lib-src/ellcc
--- ./modules/zlib/Makefile.orig	2011-04-29 07:31:13.000000000 -0600
+++ ./modules/zlib/Makefile	2011-05-03 14:09:39.713499619 -0600
@@ -26,6 +26,8 @@
 # 'installed'.
 #
 
+DESTDIR=
+
 SHELL=/bin/sh
 RM=rm -f
 CC=../../lib-src/ellcc
--- ./modules/common/Makefile.common.orig	2011-04-29 07:31:12.000000000 -0600
+++ ./modules/common/Makefile.common	2011-05-03 14:09:39.712499615 -0600
@@ -29,6 +29,8 @@
 #define NOT_C_CODE
 #include "../../src/config.h"
 
+DESTDIR=
+
 SHELL=/bin/sh
 RM=rm -f
 PROGNAME=@PROGNAME@
@@ -96,7 +98,7 @@
 	-$(RM) *~ \#*
 
 install: $(OBJECT_TO_BUILD)
-	$(INSTALL_PROGRAM) $< $(INSTALLPATH)
+	$(INSTALL_PROGRAM) $< $(DESTDIR)$(INSTALLPATH)
 
 ##
 ## Local Variables: