Package list tigr-glimmer / baaf227
src/c_make.gen: more verbosity, more error checks Etienne Mollier 1 year, 6 months ago
2 changed file(s) with 122 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
00 tigr-glimmer (3.02b-5) UNRELEASED; urgency=medium
11
22 * Team upload.
3 * Reinforce Makefile error checking and increase verbosity; initial version
4 for 3.02b-4 missed at least one point at linking time. Closes: #960294
35
46 -- Etienne Mollier <etienne.mollier@mailoo.org> Wed, 13 May 2020 22:19:56 +0200
57
0 Description: reinforce Makefile error checking
0 Description: reinforce Makefile error checking and increase verbosity
1 Initial version of the patch only reinforced Makefile error checking, but some
2 simili try/catch statement seem to be interferring with proper error
3 detection.
4 .
5 This version increases the verbosity of the build procedure by removing the @
6 commands, excepts for the beautifying `echo` statements. In addition, error
7 checking if further reinforced, and the error handling logic of the "if"
8 statement has been modified to trigger an exit with the error status of the
9 linking command.
110 Author: √Čtienne Mollier <etienne.mollier@mailoo.org>
211 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960294
312 Forwarded: no
4 Last-Update: 2020-05-11
13 Last-Update: 2020-05-13
514 ---
615 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
716 --- tigr-glimmer.orig/src/c_make.gen
1120 $(C_OBJECTS): %.o: %.c
1221 @ echo "@@@@@@@@@@@@@@@@@@@ " $< "@@@@@@@@@@@@@@@@@@@@@";
1322 - @ if [ -e $(notdir $<) ] ; then \
14 + @ set -e ; \
23 + set -e ; \
1524 + if [ -e $(notdir $<) ] ; then \
1625 $(CC) $(CPPFLAGS) $(CDEFS) $(CFLAGS) -c \
1726 $(INC_DIRS) -o $(LOCAL_OBJ)/$*.o $< ; \
2130 $(CXX_OBJECTS_CC): %.o: %.cc
2231 @ echo "@@@@@@@@@@@@@@@@@@@ " $< "@@@@@@@@@@@@@@@@@@@@@";
2332 - @ if [ -e $(notdir $<) ] ; then \
24 + @ set -e ; \
33 + set -e ; \
2534 + if [ -e $(notdir $<) ] ; then \
2635 $(CXX) $(CPPFLAGS) $(CXXDEFS) $(CXXFLAGS) -c \
2736 $(INC_DIRS) -o $(LOCAL_OBJ)/$*.o $< ; \
3140 $(CXX_OBJECTS_C): %.o: %.C
3241 @ echo "@@@@@@@@@@@@@@@@@@@ " $< "@@@@@@@@@@@@@@@@@@@@@";
3342 - @ if [ -e $(notdir $<) ] ; then \
34 + @ set -e ; \
43 + set -e ; \
3544 + if [ -e $(notdir $<) ] ; then \
3645 $(CXX) $(CPPFLAGS) $(CXXDEFS) $(CXXFLAGS) -c \
3746 $(INC_DIRS) -o $(LOCAL_OBJ)/$*.o $< ; \
3847 else \
39 @@ -355,7 +358,8 @@
48 @@ -350,46 +353,56 @@
49
50 $(LIBRARIES):
51 @ echo "################### " $@ "#####################";
52 - @ cd $(LOCAL_OBJ); \
53 + cd $(LOCAL_OBJ) && \
54 $(AR) $(ARFLAGS) $(LOCAL_LIB)/$(notdir $@) $+
4055
4156 $(PROGS):
4257 @ echo "++++++++++++++++++++ " $@ "++++++++++++++++++++++";
4358 - @ if [ -z "$(filter $(CXX_OBJECTS), $(notdir $+))" ] ; then \
44 + @ set -e ; \
59 + set -e ; \
60 + STATUS=0 ; \
4561 + if [ -z "$(filter $(CXX_OBJECTS), $(notdir $+))" ] ; then \
4662 cd $(LOCAL_OBJ); \
47 if $(CC) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \
48 $(LD_DIRS) $(filter-out lib%.a, $+) \
49 @@ -415,6 +419,7 @@
63 - if $(CC) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \
64 - $(LD_DIRS) $(filter-out lib%.a, $+) \
65 - $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) ; then \
66 - true; else rm -f $(LOCAL_BIN)/$(notdir $@); fi; \
67 + $(CC) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \
68 + $(LD_DIRS) $(filter-out lib%.a, $+) \
69 + $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) \
70 + || STATUS=$${?} ; \
71 + if [ $${STATUS} != 0 ] ; then \
72 + rm -f $(LOCAL_BIN)/$(notdir $@); \
73 + exit $${STATUS}; \
74 + fi; \
75 else \
76 cd $(LOCAL_OBJ); \
77 - if $(CXX) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \
78 - $(LD_DIRS) $(filter-out lib%.a, $+) \
79 - $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) ; then \
80 - true; else rm -f $(LOCAL_BIN)/$(notdir $@); fi; \
81 + $(CXX) -o $(LOCAL_BIN)/$(notdir $@) $(LDFLAGS) \
82 + $(LD_DIRS) $(filter-out lib%.a, $+) \
83 + $(patsubst lib%.a, -l%, $(filter lib%.a, $+)) \
84 + || STATUS=$${?} ; \
85 + if [ $${STATUS} != 0 ] ; then \
86 + rm -f $(LOCAL_BIN)/$(notdir $@); \
87 + exit $${STATUS}; \
88 + fi; \
89 fi ;
90
91 #### For making dependencies
92 $(C_DEPS): %.d: %.c
93 - @ if [ -e $(notdir $<) ] ; then \
94 + if [ -e $(notdir $<) ] ; then \
95 $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $(INC_DIRS) $< \
96 | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \
97 fi ;
98
99 $(CXX_DEPS_CC): %.d: %.cc
100 - @ if [ -e $(notdir $<) ] ; then \
101 + if [ -e $(notdir $<) ] ; then \
102 $(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $(INC_DIRS) $< \
103 | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \
104 fi ;
105
106 $(CXX_DEPS_C): %.d: %.C
107 - @ if [ -e $(notdir $<) ] ; then \
108 + if [ -e $(notdir $<) ] ; then \
109 $(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $(INC_DIRS) $< \
110 | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \
111 fi ;
112
113 $(CXX_DEPS_CPP): %.d: %.cpp
114 - @ if [ -e $(notdir $<) ] ; then \
115 + if [ -e $(notdir $<) ] ; then \
116 $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $(INC_DIRS) $< \
117 | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' ; \
118 fi ;
119 @@ -415,6 +428,7 @@
50120 # The following recurses the subdirectories that exist
51121 define dosubdirs
52122 echo "* Make Target is " $(TGT);
54124 for i in $(SUBDIRS);\
55125 do \
56126 if [ -d $$i ]; then \
127 --- tigr-glimmer.orig/src/Makefile
128 +++ tigr-glimmer/src/Makefile
129 @@ -2,27 +2,27 @@
130
131
132 all:
133 - @ TGT=objs
134 - @ $(dosubdirs)
135 - @ TGT=libs
136 - @ $(dosubdirs)
137 - @ TGT=progs
138 - @ $(dosubdirs)
139 + TGT=objs
140 + $(dosubdirs)
141 + TGT=libs
142 + $(dosubdirs)
143 + TGT=progs
144 + $(dosubdirs)
145
146
147 install: all
148 - @ $(dosubdirs)
149 + $(dosubdirs)
150
151 clean:
152 - @ $(dosubdirs)
153 + $(dosubdirs)
154
155
156 tester:
157 - @ $(dosubdirs)
158 + $(dosubdirs)
159
160
161 regression:
162 - @ $(dosubdirs)
163 + $(dosubdirs)
164
165 LOCAL_WORK = $(shell cd ..; pwd)
166 # Include for AS project rules