[SCM] an open source computer algebra system branch, debian, updated. 135ce5a283b0c913d2722c86fa55fffa2e22f4db

Bernhard R. Link brlink at debian.org
Sun Feb 19 20:34:15 UTC 2012


The following commit has been merged in the debian branch:
commit bbc36dff3a4089ffa84aefb8fb8058a04b9c2e64
Author: Felix Salfelder <felix at salfelder.org>
Date:   Thu Feb 16 12:37:00 2012 +0100

    miscellaneous Makefile template patches
         - fix flags (mostly search paths)
         - repair default and install targets
         - break dependency loops
         - weaken dependencies (temporary, upstream fixes needed)

diff --git a/Singular/Makefile.in b/Singular/Makefile.in
index 3885c42..3b775ea 100644
--- a/Singular/Makefile.in
+++ b/Singular/Makefile.in
@@ -85,7 +85,7 @@ endif
 DEFS		= -DNDEBUG -DOM_NDEBUG -D at SING_UNAME@ @DEFS@
 LDFLAGS2	= @LDFLAGS@
 ifneq ($(SINGUNAME),ix86-Win)
-LDFLAGS		= -L at prefix@/kernel -L../kernel -lkernel @LDFLAGS@ 
+LDFLAGS		= -L at prefix@/kernel -L../kernel -L../omalloc -L../libfac -L../factory -lkernel @LDFLAGS@
 LDFLAGSG	= -L at prefix@/kernel -L../kernel -lkernel_g @LD_DYN_FLAGS1@ @LDFLAGS@ 
 LDFLAGSP	= -L at prefix@/kernel -L../kernel -lkernel_p @LD_DYN_FLAGS1@ @LDFLAGS@ 
 else
@@ -362,14 +362,14 @@ GFTABLES = $(wildcard LIB/gftables/[1-9]*)
 	fi
 
 .cc.o:	
-	${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
+	${CXX} -fPIC ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
 .c.o:
-	${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
+	${CC} -fPIC ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
 
 %.dl_o : %.cc
 	${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -c $< -o $@
 
-all:	$(SING_EXEC)
+all:	$(SING_EXEC) $(LIBSINGULAR_NAME)
 
 Singular-static: version.h
 	sleep 1
@@ -386,11 +386,16 @@ Singular${S_EXT}: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \
 	  tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
 	  ${OBJS} ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} ../kernel/mmalloc.o
 
-libsingular: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \
-         iparith.o libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS) 
-	$(LIBSINGULAR_LD) ${SLDFLAGS} ${LIBSINGULAR_FLAGS} -o libsingular.${SO_SUFFIX} \
-	iparith.o mpsr_Tok.o claptmpl.o \
-	${OBJS} -lkernel -L../kernel -L../factory -L../libfac -L${libdir} ${LIBSINGULAR_LIBS} -ldl
+libsingular: ${LIBSINGULAR_NAME}
+
+${LIBSINGULAR_NAME}: version.h $(WIN_LIBS) scanner.cc  ${OBJS} \
+         iparith.o libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS) tesths.o
+	$(LIBSINGULAR_LD) ${SLDFLAGS} ${LIBSINGULAR_FLAGS} -o ${LIBSINGULAR_NAME} \
+ 	tesths.o iparith.o mpsr_Tok.o claptmpl.o \
+ 	${OBJS} -lkernel -L../kernel -L../factory -L../libfac -L${libdir} ${LIBSINGULAR_LIBS}
+	if [ $(LIBSINGULAR_NAME) != libsingular.$(SO_SUFFIX) ]; then \
+		ln -fs $(LIBSINGULAR_NAME) libsingular.$(SO_SUFFIX); \
+	fi
 
 libsingular.a: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \
          iparith.o libparse.cc claptmpl.o mpsr_Tok.o
@@ -426,13 +431,16 @@ iparith.inc: gentable.cc grammar.h tok.h table.h mod2.h
 	 ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} ${LD_DYN_FLAGS} gentable.cc \
 	     -o gentable1
 	./gentable1
-	/bin/rm -f gentable1 gentable1.exe
+	# /bin/rm -f gentable1 gentable1.exe
 
 mpsr_Tok.inc: gentable2.cc grammar.h tok.h table.h mod2.h
 	${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} ${LD_DYN_FLAGS} gentable2.cc \
 	     -o gentable2
 	./gentable2
-	/bin/rm -f gentable2 gentable2.exe
+	# /bin/rm -f gentable2 gentable2.exe
+	#
+	# FIXME: the above doesnt work.
+	touch $@
 
 
 svnver: 
@@ -476,17 +484,17 @@ TSingular: mod2.h feOpt.cc version.h emacs.cc \
 feOpt.o: feOpt.inc feOptES.inc feOptTS.inc
 extra.o: feOpt.inc
 
-feOpt.inc: feOpt.cc mod2.h
+feOpt.inc: feOpt.cc |mod2.h
 	$(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} feOpt.cc -o feOpt
 	./feOpt
 	/bin/rm -f feOpt feOpt.exe
 
-feOptES.inc: feOpt.cc mod2.h
+feOptES.inc: feOpt.cc |mod2.h
 	$(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX  -DESINGULAR -I../kernel feOpt.cc -o feOptES
 	./feOptES
 	rm -f feOptES feOptES.exe
 
-feOptTS.inc: feOpt.cc mod2.h
+feOptTS.inc: feOpt.cc |mod2.h
 	$(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX  -DTSINGULAR -I../kernel feOpt.cc -o feOptTS
 	./feOptTS
 	rm -f feOptTS feOptTS.exe
@@ -557,11 +565,11 @@ endif
 ##
 ## install targets
 ##
-install: all installbin installslib
+install: all installbin installslib install-libsingular
 
 install_all: install
 
-install-nolns: all installbin-nolns installslib-nolns
+install-ln: all installbin installslib-ln
 
 installbin: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS}
 	${MKINSTALLDIRS} $(DESTDIR)${bindir}
@@ -569,6 +577,12 @@ installbin: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS}
 	-for file in *.so; do \
 	  ${INSTALL_PROGRAM} $$file $(DESTDIR)${bindir}; \
 	done
+	${MKINSTALLDIRS} $(DESTDIR)${install_bindir}
+	${MKINSTALLDIRS} $(DESTDIR)${libdir}
+	${INSTALL_PROGRAM} ${SING_EXEC} $(DESTDIR)${SINGULAR}
+	for file in *.so; do \
+	  ${INSTALL_PROGRAM} $$file $(DESTDIR)${libdir}; \
+	done
 	${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} $(DESTDIR)${bindir}
 	${INSTALL_PROGRAM} ESingular TSingular $(DESTDIR)${bindir}
 	${INSTALL_PROGRAM} surfex $(DESTDIR)${bindir}
@@ -579,10 +593,10 @@ installbin: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS}
 installbin-nolns: installbin
 	${INSTALL_PROGRAM} ${SING_EXEC} $(DESTDIR)${install_bindir}/Singular${EXEC_EXT};
 
-installslib: LIB
+installslib-ln: LIB
 	test -r ${slibdir} || ${LN_S} `pwd`/LIB ${slibdir}
 
-installslib-nolns: LIB
+installslib: LIB
 	${MKINSTALLDIRS} $(DESTDIR)${slibdir}
 	for file in `pwd`/LIB/*.lib; do \
 	  ${INSTALL_DATA}  $$file $(DESTDIR)${slibdir}; \
@@ -592,7 +606,7 @@ installslib-nolns: LIB
 	  ${INSTALL_DATA}  $$file $(DESTDIR)${slibdir}; \
 	done
 
-install-libsingular: libsingular
+install-libsingular: ${LIBSINGULAR_NAME}
 	${MKINSTALLDIRS} $(DESTDIR)${includedir}/singular
 	for file in *.$(SO_SUFFIX); do \
 	  ${INSTALL_PROGRAM}  $$file $(DESTDIR)${libdir}; \
@@ -615,11 +629,12 @@ uninstallbin:
 mostlyclean: 
 	-rm -f Singular Singular-static Singularg Singularp libparse feOpt*.inc
 	-rm -f *.o *.og core *.op *.so* *.dl_o*
-	-rm -f ESingular* TSingular*
+	-rm -f ESingular* TSingular* libsingular
 
 clean: mostlyclean
 	-rm -f *.bak *.d *.dd depend 
 	-rm -f ${slibdir}
+	-rm -f gentable1 gentable2
 
 distclean: clean
 	-rm -f iparith.inc mpsr_Tok.inc stamp.h 
diff --git a/emacs/Makefile.in b/emacs/Makefile.in
index 86ba445..47c57e1 100644
--- a/emacs/Makefile.in
+++ b/emacs/Makefile.in
@@ -42,9 +42,12 @@ lib-cmpl.el: ${prefix}/Singular/Makefile lib.pl
 	(cd ${prefix}/Singular;${MAKE} --no-print-directory -s -f Makefile echoLIBS) > lib-temp
 	${PERL} lib.pl -s ${singulardir} `cat lib-temp` > lib-cmpl.el
 
-clean mostlyclean distclean:
+clean mostlyclean:
 	rm -f cmd-cmpl.el hlp-cmpl.el lib-cmpl.el ex-cmpl.el
 
+distclean: mostlyclean
+	rm -f Makefile
+
 install-sharedist: all
 	${MKINSTALLDIRS} ${emacsdir}
 	${INSTALL_DATA} cmd-cmpl.el ${emacsdir}
diff --git a/factory/GNUmakefile.in b/factory/GNUmakefile.in
index 1e8d80d..c80d6e1 100644
--- a/factory/GNUmakefile.in
+++ b/factory/GNUmakefile.in
@@ -455,24 +455,24 @@ distfiles :=	\
 #
 
 # how to create library objets
-%.o: %.cc config.h factoryconf.h
+%.o: %.cc config.h |factoryconf.h
 	$(CXX) -c $< $(LIBCXXFLAGS) -o $@
 %.o: %.c config.h
 	$(CC) -c $< $(LIBCFLAGS) -o $@
 # the debug version:
-%.og: %.cc config.h factoryconf.h
+%.og: %.cc config.h |factoryconf.h
 	$(CXX) -g -c $< $(LIBCGGFLAGS) -o $@
 # the profiling version:
-%.op: %.cc config.h factoryconf.h
+%.op: %.cc config.h |factoryconf.h
 	$(CXX) -O -pg -c $< $(LIBCGGFLAGS) -o $@
 
 # how to create dependency files.  To avoid broken dependency files
 # (which in turn break this GNUmakefile) we first generate them in
 # a temporary file which we then move to the destination file.
-%.dtmp: %.cc factoryconf.h config.h
+%.dtmp: %.cc |factoryconf.h config.h
 	echo $*.d "\\" > $@
 	$(CXX) -MM $< $(DEPCXXFLAGS) >> $@
-%.dtmp: %.c factoryconf.h config.h
+%.dtmp: %.c |factoryconf.h config.h
 	echo $*.d "\\" > $@
 	$(CXX) -MM $< $(DEPCXXFLAGS) >> $@
 %.dtmp: %.template
@@ -783,8 +783,10 @@ $(srcdir)/configure: configure.in
 # seems gmake needs at least a trivial command.  otherwise all
 # files which depend on config.h will be remade even if congig.h
 # did not change.
-config.h:	stamp-h
-		@:
+#
+# WTF?
+#config.h:	stamp-h
+#		@:
 
 stamp-h:	config.h.in config.status
 		CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
@@ -800,7 +802,7 @@ config.status:	configure
 		./config.status --recheck
 
 # create cf_gmp.h
-cf_gmp.h: GNUmakefile gen_cf_gmp.template
+cf_gmp.h: gen_cf_gmp.template
 	echo "#!/bin/sh" >gen_cf_gmp.sh 
 	echo "GMP_H_T=\"`g++ $(LIBCXXFLAGS) -M gen_cf_gmp.cc|grep gmp.h` \"" >>gen_cf_gmp.sh 
 	cat gen_cf_gmp.template >>gen_cf_gmp.sh
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 7b8b77b..afba959 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -439,15 +439,15 @@ libkernel_p.a: ${OBJP} ${DL_LIBSP} ${OBJSP2}
 ## dependencies
 ##
 
-%.dd: %.cc mod2.h 
+%.dd: %.cc |mod2.h
 	echo $(@:.dd=.og) $(@:.dd=.op) $(@:.dd=.dl_o) $(@:.dd=.dl_og) $(@:.dd=.dl_op)" " \\ > $@
 	$(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
 
-%.d: %.c mod2.h 
+%.d: %.c |mod2.h
 	echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@
 	$(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
 
-depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
+depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) |mod2.h
 	cat *.d *.dd >depend
 
 ifeq (depend,$(wildcard depend))
diff --git a/libfac/Makefile.in b/libfac/Makefile.in
index 62faadb..b16e306 100644
--- a/libfac/Makefile.in
+++ b/libfac/Makefile.in
@@ -86,40 +86,40 @@ all: OPTOBJ ${TARGETNAME} libsingfac_g.a
 OPTOBJ:
 	${MKINSTALLDIRS} OPTOBJ
 
-OPTOBJ/%.o: %.cc OPTOBJ
+OPTOBJ/%.o: %.cc |OPTOBJ
 	$(CXX) $(CXXFLAGS) $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.o: charset/%.cc OPTOBJ
+OPTOBJ/%.o: charset/%.cc |OPTOBJ
 	$(CXX) $(CXXFLAGS) $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.o: factor/%.cc OPTOBJ
+OPTOBJ/%.o: factor/%.cc |OPTOBJ
 	$(CXX) $(CXXFLAGS) $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/tmpl_inst.o: factor/tmpl_inst.cc  OPTOBJ
+OPTOBJ/tmpl_inst.o: factor/tmpl_inst.cc
 	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.op: %.cc  OPTOBJ
+OPTOBJ/%.op: %.cc |OPTOBJ
 	$(CXX) -O -pg $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.op: charset/%.cc  OPTOBJ
+OPTOBJ/%.op: charset/%.cc |OPTOBJ
 	$(CXX) -O -pg $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.op: factor/%.cc OPTOBJ
+OPTOBJ/%.op: factor/%.cc |OPTOBJ
 	$(CXX) -O -pg $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/tmpl_inst.op: factor/tmpl_inst.cc  OPTOBJ
+OPTOBJ/tmpl_inst.op: factor/tmpl_inst.cc |OPTOBJ
 	$(CXX) -O -pg $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.og: %.cc  OPTOBJ
+OPTOBJ/%.og: %.cc |OPTOBJ
 	$(CXX) -g $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.og: charset/%.cc  OPTOBJ
+OPTOBJ/%.og: charset/%.cc |OPTOBJ
 	$(CXX) -g $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/%.og: factor/%.cc OPTOBJ
+OPTOBJ/%.og: factor/%.cc |OPTOBJ
 	$(CXX) -g $(CXXTEMPLFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
 
-OPTOBJ/tmpl_inst.og: factor/tmpl_inst.cc  OPTOBJ
+OPTOBJ/tmpl_inst.og: factor/tmpl_inst.cc |OPTOBJ
 	$(CXX) -g $(CPPFLAGS) $(DEFS) -c $< -o $@
 
 libfac:		OPTOBJ libfac.a
diff --git a/omalloc/Makefile.in b/omalloc/Makefile.in
index 4956179..e3994b8 100644
--- a/omalloc/Makefile.in
+++ b/omalloc/Makefile.in
@@ -180,9 +180,9 @@ configure: configure.in
 ##
 install-nolns: install
 
-install-libsingular:
-	$(MKINSTALLDIRS) $(includedir)/singular
-	$(INSTALL) omalloc.h $(includedir)/singular
+#install-libsingular:
+#	$(MKINSTALLDIRS) $(includedir)/singular
+#	$(INSTALL) omalloc.h $(includedir)/singular
 
 install install-libsingular: all
 	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list