[singular] 18/45: use $DESTDIR as a pre-prefix, in install* targets

felix salfelder felix-guest at alioth.debian.org
Sat Sep 14 13:57:03 UTC 2013


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master-3-1-5
in repository singular.

commit 21700caa423e193a79b262946e2e254a3cc72caa
Author: Felix Salfelder <felix at salfelder.org>
Date:   Thu Feb 16 08:45:58 2012 +0100

    use $DESTDIR as a pre-prefix, in install* targets
---
 IntegerProgramming/Makefile.in |   12 +++---
 Singular/Makefile.in           |   85 ++++++++++++++++++----------------------
 factory/GNUmakefile.in         |   25 ++++++------
 kernel/Makefile.in             |   20 +++++-----
 libfac/Makefile.in             |   14 +++----
 omalloc/Makefile.in            |   22 +++++------
 6 files changed, 85 insertions(+), 93 deletions(-)

diff --git a/IntegerProgramming/Makefile.in b/IntegerProgramming/Makefile.in
index 50de520..05fccfe 100644
--- a/IntegerProgramming/Makefile.in
+++ b/IntegerProgramming/Makefile.in
@@ -63,12 +63,12 @@ install-nolns: install
 install_all: install
 
 install install-libsingular: $(MAIN1) $(MAIN2) $(MAIN3) $(MAIN4) $(LLL)
-	${MKINSTALLDIRS} ${bindir}
-	${INSTALL_PROGRAM} $(MAIN1) ${bindir}
-	${INSTALL_PROGRAM} $(MAIN2) ${bindir}
-	${INSTALL_PROGRAM} $(MAIN3) ${bindir}
-	${INSTALL_PROGRAM} $(MAIN4) ${bindir}
-	${INSTALL_PROGRAM} $(LLL) ${bindir}
+	${MKINSTALLDIRS} $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} $(MAIN1) $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} $(MAIN2) $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} $(MAIN3) $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} $(MAIN4) $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} $(LLL) $(DESTDIR)${bindir}
 
 install-bindist: $(MAIN1) $(MAIN2) $(MAIN3) $(MAIN4)
 	${MKINSTALLDIRS} ${install_bindir}
diff --git a/Singular/Makefile.in b/Singular/Makefile.in
index c4a6e78..3e02df1 100644
--- a/Singular/Makefile.in
+++ b/Singular/Makefile.in
@@ -556,51 +556,42 @@ install_all: install
 install-nolns: all installbin-nolns installslib-nolns
 
 installbin: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS}
-	${MKINSTALLDIRS} ${bindir}
-	${INSTALL_PROGRAM} ${SING_EXEC} ${SINGULAR}
+	${MKINSTALLDIRS} $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} ${SING_EXEC} $(DESTDIR)${SINGULAR}
 	-for file in *.so; do \
-	  ${INSTALL_PROGRAM} $$file ${bindir}; \
+	  ${INSTALL_PROGRAM} $$file $(DESTDIR)${bindir}; \
 	done
-	${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} ${bindir}
-	${INSTALL_PROGRAM} ESingular TSingular ${bindir}
-	${INSTALL_PROGRAM} surfex ${bindir}
-	chmod a+x ${SINGULAR}
-	rm -f ${bindir}/${SING_EXEC}${EXEC_EXT}
-	cd ${bindir}; ${LN_S} ${SINGULAR} Singular${EXEC_EXT};
-
-installbin-nolns: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS}
-	${MKINSTALLDIRS} ${bindir}
-	${INSTALL_PROGRAM} ${SING_EXEC} ${SINGULAR}
-	-for file in *.so; do \
-	  ${INSTALL_PROGRAM} $$file ${bindir}; \
-	done
-	${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} ${bindir}
-	${INSTALL_PROGRAM} ESingular TSingular ${DL_LIBS} ${bindir}
-	chmod a+x ${SINGULAR}
-	rm -f ${bindir}/${SING_EXEC}${EXEC_EXT}
-	${INSTALL_PROGRAM} ${SINGULAR} ${bindir}/Singular${EXEC_EXT};
+	${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} ESingular TSingular $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} surfex $(DESTDIR)${bindir}
+	chmod a+x $(DESTDIR)${SINGULAR}
+	rm -f $(DESTDIR)${bindir}/${SING_EXEC}${EXEC_EXT}
+	cd $(DESTDIR)${bindir}; ${LN_S} ${SINGULAR} Singular${EXEC_EXT};
+
+installbin-nolns: installbin
+	${INSTALL_PROGRAM} ${SING_EXEC} $(DESTDIR)${install_bindir}/Singular${EXEC_EXT};
 
 installslib: LIB
 	test -r ${slibdir} || ${LN_S} `pwd`/LIB ${slibdir}
 
 installslib-nolns: LIB
-	${MKINSTALLDIRS} ${slibdir}
+	${MKINSTALLDIRS} $(DESTDIR)${slibdir}
 	for file in `pwd`/LIB/*.lib; do \
-	  ${INSTALL_DATA}  $$file ${slibdir}; \
+	  ${INSTALL_DATA}  $$file $(DESTDIR)${slibdir}; \
 	done
-	${MKINSTALLDIRS} ${slibdir}/gftables
+	${MKINSTALLDIRS} $(DESTDIR)${slibdir}/gftables
 	for file in `pwd`/LIB/gftables/*; do \
-	  ${INSTALL_DATA}  $$file ${slibdir}/gftables/; \
+	  ${INSTALL_DATA}  $$file $(DESTDIR)${slibdir}; \
 	done
 
 install-libsingular: libsingular installslib-nolns
-	${MKINSTALLDIRS} ${includedir}/singular
+	${MKINSTALLDIRS} $(DESTDIR)${includedir}/singular
 	for file in *.$(SO_SUFFIX); do \
-	  ${INSTALL_PROGRAM}  $$file ${libdir}; \
+	  ${INSTALL_PROGRAM}  $$file $(DESTDIR)${libdir}; \
 	done
-	${INSTALL_PROGRAM} libsingular.h ${includedir}
+	${INSTALL_PROGRAM} libsingular.h $(DESTDIR)${includedir}
 	for file in subexpr.h tok.h grammar.h ipid.h lists.h ipshell.h attrib.h; do \
-	sed -e "s:<kernel/:<singular/:" < $$file |sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" >${includedir}/singular/$$file ;\
+	sed -e "s:<kernel/:<singular/:" < $$file |sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" >$(DESTDIR)${includedir}/singular/$$file ;\
 	done
 
 uninstall: uninstallbin
@@ -650,23 +641,23 @@ LIB/all.lib:	LIB/all.lib.tmpl
 
 install-bindist: $(HEADERS) $(SOURCES) Makefile depend
 	echo "#define MAKE_DISTRIBUTION	" > distrib.h
-	sleep 1
-	${MAKE} ${SING_EXEC} ESingular TSingular libparse ${RUN_SINGULARS}
-	${MKINSTALLDIRS} ${install_bindir} 
-	${INSTALL_PROGRAM} ${SING_EXEC} ${install_bindir}/Singular
-	-${INSTALL_PROGRAM} *.so ${install_bindir}
-	${INSTALL_PROGRAM} -s  libparse ${RUN_SINGULARS} ESingular TSingular ${install_bindir}
-	${INSTALL_PROGRAM} surfex ${install_bindir}
+	# sleep 1
+	${MAKE} ${SING_EXEC} ESingular TSingular libparse $(DESTDIR)${RUN_SINGULARS}
+	${MKINSTALLDIRS} $(DESTDIR)${install_bindir}
+	${INSTALL_PROGRAM} ${SING_EXEC} $(DESTDIR)${install_bindir}/Singular
+	-${INSTALL_PROGRAM} *.so $(DESTDIR)${install_bindir}
+	${INSTALL_PROGRAM} -s  libparse ${RUN_SINGULARS} ESingular TSingular $(DESTDIR)${install_bindir}
+	${INSTALL_PROGRAM} surfex $(DESTDIR)${install_bindir}
 	echo "#undef MAKE_DISTRIBUTION " > distrib.h
 
 install-sharedist: ${SLIBS_FILES} LIB/gftables
-	${MKINSTALLDIRS} ${install_slibdir}
-	cp ${SLIBS_FILES} ${install_slibdir}
-	${MKINSTALLDIRS} ${install_slibdir}/gftables
-	cp ${GFTABLES} ${install_slibdir}/gftables
-	${MKINSTALLDIRS} ${install_slibdir}/surfex
-	cp LIB/surfex/surfex.jar ${install_slibdir}/surfex
-	chmod -R +rX ${install_slibdir}/*
+	${MKINSTALLDIRS} $(DESTDIR)${install_slibdir}
+	cp ${SLIBS_FILES} $(DESTDIR)${install_slibdir}
+	${MKINSTALLDIRS} $(DESTDIR)${install_slibdir}/gftables
+	cp ${GFTABLES} $(DESTDIR)${install_slibdir}/gftables
+	${MKINSTALLDIRS} $(DESTDIR)${install_slibdir}/surfex
+	cp LIB/surfex/surfex.jar $(DESTDIR)${install_slibdir}/surfex
+	chmod -R +rX $(DESTDIR)${install_slibdir}/*
 
 tar:
 	tar cf Singular-${SINGULAR_VERSION}-src.tar ${DISTFILES}
@@ -764,8 +755,8 @@ mpsr_Tok.og: iparith.inc mpsr_Tok.cc
 	$(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${CXXTEMPLFLAGSG} ${DEFSG} -c mpsr_Tok.cc -o mpsr_Tok.og
 
 installg: Singularg
-	${MKINSTALLDIRS} ${bindir}
-	${INSTALL_PROGRAM} Singularg ${bindir}	
+	${MKINSTALLDIRS} $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} Singularg $(DESTDIR)${bindir}
 
 ESingularg: mod2.h feOpt.cc version.h emacs.cc \
            feOptES.inc
@@ -844,8 +835,8 @@ mpsr_Tok.op: iparith.inc mpsr_Tok.cc
 	$(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${CXXTEMPLFLAGSP} ${DEFSP} -c mpsr_Tok.cc -o mpsr_Tok.op
 
 installp: Singularp
-	${MKINSTALLDIRS} ${bindir}
-	${INSTALL_PROGRAM} Singularp ${bindir}	
+	${MKINSTALLDIRS} $(DESTDIR)${bindir}
+	${INSTALL_PROGRAM} Singularp $(DESTDIR)${bindir}
 
 ##
 ## dependencies
diff --git a/factory/GNUmakefile.in b/factory/GNUmakefile.in
index 61d0db2..85d866b 100644
--- a/factory/GNUmakefile.in
+++ b/factory/GNUmakefile.in
@@ -543,21 +543,22 @@ install_all:    install libsingcf_p.a
 install-nolns: install
 
 installcf:	cf
-		$(MKINSTALLDIRS) $(libdir)
-		$(MKINSTALLDIRS) $(includedir)
-		$(MKINSTALLDIRS) $(templatedir)
-		$(INSTALL_DATA) $(libfactory) $(libdir)/$(libfactory)
-		-$(INSTALL_DATA) libsingcf_g.a $(libdir)/libsingcf_g.a
-		-$(INSTALL_DATA) libsingcf_p.a $(libdir)/libsingcf_p.a
-		$(INSTALL_DATA) factory.h $(includedir)/factory.h
-		$(INSTALL_DATA) cf_gmp.h $(includedir)/cf_gmp.h
-		$(INSTALL_DATA) factoryconf.h $(includedir)/factoryconf.h
-		$(INSTALL_DATA) $(srcdir)/ftmpl_inst.cc $(templatedir)/ftmpl_inst.cc
+		$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+		$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
+		$(MKINSTALLDIRS) $(DESTDIR)$(templatedir)
+		$(INSTALL_DATA) $(libfactory) $(DESTDIR)$(libdir)/$(libfactory)
+		-$(INSTALL_DATA) libsingcf_g.a $(DESTDIR)$(libdir)/libsingcf_g.a
+		-$(INSTALL_DATA) libsingcf_p.a $(DESTDIR)$(libdir)/libsingcf_p.a
+		$(INSTALL_DATA) factory.h $(DESTDIR)$(includedir)/factory.h
+		$(INSTALL_DATA) cf_gmp.h $(DESTDIR)$(includedir)/factory/cf_gmp.h
+		$(INSTALL_DATA) factoryconf.h $(DESTDIR)$(includedir)/factory/factoryconf.h
+		# FIXME: what is templatedir?
+		$(INSTALL_DATA) $(srcdir)/ftmpl_inst.cc $(DESTDIR)$(templatedir)/ftmpl_inst.cc
 		for file in $(templatesrc) $(templateincl); do \
-		  $(INSTALL_DATA) $(srcdir)/templates/$$file $(templatedir)/$$file; \
+		  $(INSTALL_DATA) $(srcdir)/templates/$$file $(DESTDIR)$(templatedir)/$$file; \
 		done
 # we run `ranlib' another time for SUN machines
-		$(RANLIB) $(libdir)/$(libfactory)
+		$(RANLIB) $(DESTDIR)$(libdir)/$(libfactory)
 
 installmem:	mem
 		$(MKINSTALLDIRS) $(libdir)
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index adc9cd9..6f58083 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -48,7 +48,7 @@ PIPE		= @PIPE@
 CFLAGS		= @CFLAGS@ ${PIPE} 
 CXXFLAGS	= @CXXFLAGS@ ${PIPE} 
 CXXTEMPLFLAGS	= @CXXTEMPLFLAGS@
-CPPFLAGS	= -I${srcdir} -I.. -I at prefix@  @CPPFLAGS@ 
+CPPFLAGS	= -I${srcdir} -I.. -I at prefix@  @CPPFLAGS@
 DEFS		= -DNDEBUG -DOM_NDEBUG -D at SING_UNAME@ @DEFS@
 LDFLAGS		= @LDFLAGS@
 LD_DYN_FLAGS	= @LD_DYN_FLAGS@
@@ -236,7 +236,7 @@ libkernel.a: ${OBJS}
 	-rm -f libkernel.a
 	ar cr $@ $^
 
-p_Procs_Lib.o: p_Procs_Lib.inc
+p_Procs_Lib.o: p_Procs_Dynamic.inc
 
 # Hmm compiling with -fomit-frame-pointer resulted in access violation
 # under cygwin
@@ -253,12 +253,12 @@ p_Procs_Dynamic.o p_Procs_Lib.o p_Procs_Dynamic.og p_Procs_Lib.og\
 p_Procs_Dynamic.inc p_Procs_Lib.inc: p_Procs_Dynamic.h
 
 # here is how p_Procs_[Static|Dynamic].inc is generated
-p_Procs_Static.inc: p_Procs_Generate.cc p_Procs_Impl.h mod2.h
+p_Procs_Static.inc: p_Procs_Generate.cc p_Procs_Impl.h |mod2.h
 	$(CXX) $(CPPFLAGS) -g -Dp_Procs_Static p_Procs_Generate.cc -o p_Procs_Static
 	./p_Procs_Static > p_Procs_Static.xx && mv p_Procs_Static.xx p_Procs_Static.inc
 	-rm -f p_Procs_Static p_Procs_Static.exe
 
-p_Procs_Dynamic.inc: p_Procs_Generate.cc p_Procs_Impl.h mod2.h
+p_Procs_Dynamic.inc: p_Procs_Generate.cc p_Procs_Impl.h |mod2.h
 	$(CXX) $(CPPFLAGS) -g -Dp_Procs_Dynamic p_Procs_Generate.cc -o p_Procs_Dynamic
 	./p_Procs_Dynamic > p_Procs_Dynamic.xx && mv p_Procs_Dynamic.xx p_Procs_Dynamic.inc
 	-rm -f p_Procs_Dynamic p_Procs_Dynamic.exe
@@ -272,9 +272,9 @@ p_Procs_%.so: p_Procs_Lib_%.dl_o
 install-nolns: install
 
 install-libsingular: install
-	-${MKINSTALLDIRS} ${includedir}
-	-${MKINSTALLDIRS} ${includedir}/singular
-	-for file in *.h kInline.cc; do sed -e "s:<kernel/:<singular/:"< $$file | sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" > ${includedir}/singular/$$file; done
+	${MKINSTALLDIRS} $(DESTDIR)${includedir}
+	${MKINSTALLDIRS} $(DESTDIR)${includedir}/singular
+	for file in *.h kInline.cc; do sed -e "s:<kernel/:<singular/:"< $$file | sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" > $(DESTDIR)${includedir}/singular/$$file; done
 
 install: all installbin
 
@@ -290,12 +290,12 @@ endif
 
 
 installbin: ${DL_LIBS} ${DL_LIBSG} libkernel.a libkernel_g.a
-	${MKINSTALLDIRS} ${bindir}
+	${MKINSTALLDIRS} $(DESTDIR)${bindir}
 	- ranlib libkernel.a
 	- ranlib libkernel_g.a
 ifeq (,${DL_LIBS})
 else
-	-${INSTALL_PROGRAM} ${DL_LIBS} ${bindir}
+	${INSTALL_PROGRAM} ${DL_LIBS} $(DESTDIR)${bindir}
 ifeq (,${DL_LIBSG})
 else
 	-for file in ${DL_LIBS} ${DL_LIBSG}; do ${INSTALL_PROGRAM} $$file ../Singular; done
@@ -307,7 +307,7 @@ install-bindist: ${DL_LIBS} libkernel.a
 	${MKINSTALLDIRS} ${bindir}
 ifeq (,${DL_LIBS})
 else
-	-${INSTALL_PROGRAM} ${DL_LIBS} ${bindir}
+	${INSTALL_PROGRAM} ${DL_LIBS} $(DESTDIR)${bindir}
 endif
 
 ##
diff --git a/libfac/Makefile.in b/libfac/Makefile.in
index c2b38eb..1f2953f 100644
--- a/libfac/Makefile.in
+++ b/libfac/Makefile.in
@@ -146,13 +146,13 @@ libsingfac_p.a:	$(PROFOBJ)
 install-nolns: install
 
 install install-libsingular:	all
-	${MKINSTALLDIRS} ${includedir}
-	${MKINSTALLDIRS} ${libdir}
-	${INSTALL_DATA} ${LIBFACINCLUDE} ${includedir}
-	${INSTALL_DATA} ${TARGETNAME}.a ${libdir}
-	-${INSTALL_DATA} libsingfac_g.a ${libdir}
-	$(RANLIB) ${libdir}/${TARGETNAME}.a
-	-$(RANLIB) ${libdir}/libsingfac_g.a
+	${MKINSTALLDIRS} $(DESTDIR)${includedir}
+	${MKINSTALLDIRS} $(DESTDIR)${libdir}
+	${INSTALL_DATA} ${LIBFACINCLUDE} $(DESTDIR)${includedir}
+	${INSTALL_DATA} ${TARGETNAME}.a $(DESTDIR)${libdir}
+	-${INSTALL_DATA} libsingfac_g.a $(DESTDIR)${libdir}
+	$(RANLIB) $(DESTDIR)${libdir}/${TARGETNAME}.a
+	-$(RANLIB) $(DESTDIR)${libdir}/libsingfac_g.a
 
 install_all: install libsingfac_p.a
 	-${INSTALL_DATA} libsingfac_p.a ${libdir}
diff --git a/omalloc/Makefile.in b/omalloc/Makefile.in
index 98a7e95..8661ca2 100644
--- a/omalloc/Makefile.in
+++ b/omalloc/Makefile.in
@@ -185,17 +185,17 @@ install-libsingular:
 	$(INSTALL) omalloc.h $(includedir)/singular
 
 install install-libsingular: all
-	$(MKINSTALLDIRS) $(libdir)
-	$(MKINSTALLDIRS) $(includedir)
-	$(INSTALL_DATA) libomalloc.a $(libdir)
-	$(RANLIB) $(libdir)/libomalloc.a
-	$(INSTALL_DATA) libomalloc_ndebug.a $(libdir)
-	$(RANLIB) $(libdir)/libomalloc_ndebug.a
-	$(INSTALL_DATA) omalloc.o $(libdir)
-	$(INSTALL_DATA) omalloc_debug.o $(libdir)
-	$(INSTALL_DATA) omalloc.h $(includedir)
-	$(INSTALL_DATA) omlimits.h $(includedir)
-	$(INSTALL_DATA) mylimits.h $(includedir)
+	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) libomalloc.a $(DESTDIR)$(libdir)
+	$(RANLIB) $(DESTDIR)$(libdir)/libomalloc.a
+	$(INSTALL_DATA) libomalloc_ndebug.a $(DESTDIR)$(libdir)
+	$(RANLIB) $(DESTDIR)$(libdir)/libomalloc_ndebug.a
+	$(INSTALL_DATA) omalloc.o $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) omalloc_debug.o $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) omalloc.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) omlimits.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) mylimits.h $(DESTDIR)$(includedir)
 
 install_all: install libomalloc_p.a
 	$(INSTALL_DATA) libomalloc_p.a $(libdir)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/singular.git



More information about the debian-science-commits mailing list