Browse Source

Revert "Cope with builds with differing debug options within a second of each"

This reverts commit fc5f6c9de2.

Reverted commit breaks the much more common case of changing the debug
options in subsequent builds without any code changes.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
e505ceb942
1 changed files with 15 additions and 8 deletions
  1. 15
    8
      src/Makefile.housekeeping

+ 15
- 8
src/Makefile.housekeeping View File

@@ -237,7 +237,6 @@ TGT_MAKEROM_FLAGS = $(strip $(MAKEROM_FLAGS_$(TGT_ROM_NAME)) \
237 237
 # the target.
238 238
 #
239 239
 COMMA		:= ,
240
-SPACE		:= $(subst x, ,x)
241 240
 DEBUG_LIST	= $(subst $(COMMA), ,$(DEBUG))
242 241
 DEBUG_OBJ_LEVEL	= $(firstword $(word 2,$(subst :, ,$(1))) 1)
243 242
 DEBUG_OBJ_BASE	= $(word 1,$(subst :, ,$(1))).dbg$(call DEBUG_OBJ_LEVEL,$(1))
@@ -246,8 +245,6 @@ DEBUG_ORIG_OBJ	= $(BIN)/$(word 1,$(subst :, ,$(1))).o
246 245
 DEBUG_OBJS	= $(foreach D,$(DEBUG_LIST),$(call DEBUG_OBJ,$(D)))
247 246
 DEBUG_ORIG_OBJS	= $(foreach D,$(DEBUG_LIST),$(call DEBUG_ORIG_OBJ,$(D)))
248 247
 BLIB_OBJS	= $(DEBUG_OBJS) $(filter-out $(DEBUG_ORIG_OBJS),$(BOBJS))
249
-BLIB_TAG_ELEM	= $(foreach D,$(DEBUG_LIST),$(call DEBUG_OBJ_BASE,$(D)))
250
-BLIB_TAG	= $(subst $(SPACE),-,$(strip blib $(sort $(BLIB_TAG_ELEM))))
251 248
 
252 249
 # Print out all derived information for a given target.
253 250
 #
@@ -271,12 +268,24 @@ $(BIN)/%.info :
271 268
 	@echo
272 269
 	@echo 'Debugging objects    : $(DEBUG_OBJS)'
273 270
 	@echo 'Replaced objects     : $(DEBUG_ORIG_OBJS)'
274
-	@echo 'Build library tag    : $(BLIB_TAG)'
271
+
272
+# List of objects included in the last build of blib.  This is needed
273
+# in order to correctly rebuild blib whenever the list of objects
274
+# changes.
275
+#
276
+BLIB_LIST	= $(BIN)/.blib.list
277
+ifneq ($(shell cat $(BLIB_LIST)),$(BLIB_OBJS))
278
+$(shell echo "$(BLIB_OBJS)" > $(BLIB_LIST))
279
+endif
280
+
281
+$(BLIB_LIST) :
282
+
283
+VERYCLEANUP	+= $(BLIB_LIST)
275 284
 
276 285
 # Library of all objects
277 286
 #
278
-BLIB		= $(BIN)/$(BLIB_TAG).a
279
-$(BLIB) : $(BLIB_OBJS) $(MAKEDEPS)
287
+BLIB		= $(BIN)/blib.a
288
+$(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
280 289
 	$(Q)$(RM) $(BLIB)
281 290
 	$(QM)echo "  [AR] $@"
282 291
 	$(Q)$(AR) r $@ $(BLIB_OBJS)
@@ -421,8 +430,6 @@ SYMTAB	= $(BIN)/symtab
421 430
 $(SYMTAB) : $(BLIB)
422 431
 	$(NM) -o -S $< > $@
423 432
 
424
-CLEANUP += $(BIN)/symtab
425
-
426 433
 symcheck : $(SYMTAB)
427 434
 	$(SYMCHECK) $<
428 435
 

Loading…
Cancel
Save