diff --git a/debian/changelog b/debian/changelog index 7c365ef..f2db42d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ tigr-glimmer (3.02b-5) UNRELEASED; urgency=medium * Team upload. + * Reinforce Makefile error checking and increase verbosity; initial version + for 3.02b-4 missed at least one point at linking time. Closes: #960294 -- Etienne Mollier Wed, 13 May 2020 22:19:56 +0200 diff --git a/debian/patches/make-errs.patch b/debian/patches/make-errs.patch index a510369..ec2753c 100644 --- a/debian/patches/make-errs.patch +++ b/debian/patches/make-errs.patch @@ -1,8 +1,17 @@ -Description: reinforce Makefile error checking +Description: reinforce Makefile error checking and increase verbosity + Initial version of the patch only reinforced Makefile error checking, but some + simili try/catch statement seem to be interferring with proper error + detection. + . + This version increases the verbosity of the build procedure by removing the @ + commands, excepts for the beautifying `echo` statements. In addition, error + checking if further reinforced, and the error handling logic of the "if" + statement has been modified to trigger an exit with the error status of the + linking command. Author: Étienne Mollier Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960294 Forwarded: no -Last-Update: 2020-05-11 +Last-Update: 2020-05-13 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- tigr-glimmer.orig/src/c_make.gen @@ -12,7 +21,7 @@ $(C_OBJECTS): %.o: %.c @ echo "@@@@@@@@@@@@@@@@@@@ " $< "@@@@@@@@@@@@@@@@@@@@@"; - @ if [ -e $(notdir $<) ] ; then \ -+ @ set -e ; \ ++ set -e ; \ + if [ -e $(notdir $<) ] ; then \ $(CC) $(CPPFLAGS) $(CDEFS) $(CFLAGS) -c \ $(INC_DIRS) -o $(LOCAL_OBJ)/$*.o $< ; \ @@ -22,7 +31,7 @@ $(CXX_OBJECTS_CC): %.o: %.cc @ echo "@@@@@@@@@@@@@@@@@@@ " $< "@@@@@@@@@@@@@@@@@@@@@"; - @ if [ -e $(notdir $<) ] ; then \ -+ @ set -e ; \ ++ set -e ; \ + if [ -e $(notdir $<) ] ; then \ $(CXX) $(CPPFLAGS) $(CXXDEFS) $(CXXFLAGS) -c \ $(INC_DIRS) -o $(LOCAL_OBJ)/$*.o $< ; \ @@ -32,22 +41,83 @@ $(CXX_OBJECTS_C): %.o: %.C @ echo "@@@@@@@@@@@@@@@@@@@ " $< "@@@@@@@@@@@@@@@@@@@@@"; - @ if [ -e $(notdir $<) ] ; then \ -+ @ set -e ; \ ++ set -e ; \ + if [ -e $(notdir $<) ] ; then \ $(CXX) $(CPPFLAGS) $(CXXDEFS) $(CXXFLAGS) -c \ $(INC_DIRS) -o $(LOCAL_OBJ)/$*.o $< ; \ else \ -@@ -355,7 +358,8 @@ +@@ -350,46 +353,56 @@ + + $(LIBRARIES): + @ echo "################### " $@ "#####################"; +- @ cd $(LOCAL_OBJ); \ ++ cd $(LOCAL_OBJ) && \ + $(AR) $(ARFLAGS) $(LOCAL_LIB)/$(notdir $@) $+ $(PROGS): @ echo "++++++++++++++++++++ " $@ "++++++++++++++++++++++"; - @ if [ -z "$(filter $(CXX_OBJECTS), $(notdir $+))" ] ; then \ -+ @ set -e ; \ ++ set -e ; \ ++ STATUS=0 ; \ + if [ -z "$(filter $(CXX_OBJECTS), $(notdir $+))" ] ; then \ cd $(LOCAL_OBJ); \ - if $(CC) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \ - $(LD_DIRS) $(filter-out lib%.a, $+) \ -@@ -415,6 +419,7 @@ +- if $(CC) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \ +- $(LD_DIRS) $(filter-out lib%.a, $+) \ +- $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) ; then \ +- true; else rm -f $(LOCAL_BIN)/$(notdir $@); fi; \ ++ $(CC) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \ ++ $(LD_DIRS) $(filter-out lib%.a, $+) \ ++ $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) \ ++ || STATUS=$${?} ; \ ++ if [ $${STATUS} != 0 ] ; then \ ++ rm -f $(LOCAL_BIN)/$(notdir $@); \ ++ exit $${STATUS}; \ ++ fi; \ + else \ + cd $(LOCAL_OBJ); \ +- if $(CXX) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \ +- $(LD_DIRS) $(filter-out lib%.a, $+) \ +- $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) ; then \ +- true; else rm -f $(LOCAL_BIN)/$(notdir $@); fi; \ ++ $(CXX) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \ ++ $(LD_DIRS) $(filter-out lib%.a, $+) \ ++ $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) \ ++ || STATUS=$${?} ; \ ++ if [ $${STATUS} != 0 ] ; then \ ++ rm -f $(LOCAL_BIN)/$(notdir $@); \ ++ exit $${STATUS}; \ ++ fi; \ + fi ; + + #### For making dependencies + $(C_DEPS): %.d: %.c +- @ if [ -e $(notdir $<) ] ; then \ ++ if [ -e $(notdir $<) ] ; then \ + $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $(INC_DIRS) $< \ + | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \ + fi ; + + $(CXX_DEPS_CC): %.d: %.cc +- @ if [ -e $(notdir $<) ] ; then \ ++ if [ -e $(notdir $<) ] ; then \ + $(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $(INC_DIRS) $< \ + | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \ + fi ; + + $(CXX_DEPS_C): %.d: %.C +- @ if [ -e $(notdir $<) ] ; then \ ++ if [ -e $(notdir $<) ] ; then \ + $(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $(INC_DIRS) $< \ + | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \ + fi ; + + $(CXX_DEPS_CPP): %.d: %.cpp +- @ if [ -e $(notdir $<) ] ; then \ ++ if [ -e $(notdir $<) ] ; then \ + $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $(INC_DIRS) $< \ + | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \ + fi ; +@@ -415,6 +428,7 @@ # The following recurses the subdirectories that exist define dosubdirs echo "* Make Target is " $(TGT); @@ -55,3 +125,43 @@ for i in $(SUBDIRS);\ do \ if [ -d $$i ]; then \ +--- tigr-glimmer.orig/src/Makefile ++++ tigr-glimmer/src/Makefile +@@ -2,27 +2,27 @@ + + + all: +- @ TGT=objs +- @ $(dosubdirs) +- @ TGT=libs +- @ $(dosubdirs) +- @ TGT=progs +- @ $(dosubdirs) ++ TGT=objs ++ $(dosubdirs) ++ TGT=libs ++ $(dosubdirs) ++ TGT=progs ++ $(dosubdirs) + + + install: all +- @ $(dosubdirs) ++ $(dosubdirs) + + clean: +- @ $(dosubdirs) ++ $(dosubdirs) + + + tester: +- @ $(dosubdirs) ++ $(dosubdirs) + + + regression: +- @ $(dosubdirs) ++ $(dosubdirs) + + LOCAL_WORK = $(shell cd ..; pwd) + # Include for AS project rules