Pārlūkot izejas kodu

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

other.
tags/v0.9.3
Michael Brown 17 gadus atpakaļ
vecāks
revīzija
fc5f6c9de2
1 mainītis faili ar 8 papildinājumiem un 15 dzēšanām
  1. 8
    15
      src/Makefile.housekeeping

+ 8
- 15
src/Makefile.housekeeping Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt