mirror of https://github.com/ipxe/ipxe.git
"make xxx DEBUG=yyy,zzz" now working, but the "up to date" message is
getting suppressed. :(pull/1/head
parent
a245c93417
commit
1cdb68d116
|
@ -158,13 +158,6 @@ $(BIN)/NIC : $(AUTO_DEPS)
|
||||||
@perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
|
@perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
|
||||||
CLEANUP += $(BIN)/NIC
|
CLEANUP += $(BIN)/NIC
|
||||||
|
|
||||||
# Library of all objects
|
|
||||||
#
|
|
||||||
$(BLIB) : $(BOBJS)
|
|
||||||
$(AR) r $@ $(BOBJS)
|
|
||||||
$(RANLIB) $@
|
|
||||||
blib : $(BLIB)
|
|
||||||
|
|
||||||
# Analyse a target name (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and
|
# Analyse a target name (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and
|
||||||
# derive the variables:
|
# derive the variables:
|
||||||
#
|
#
|
||||||
|
@ -232,10 +225,9 @@ TGT_MAKEROM_FLAGS = $(strip $(MAKEROM_FLAGS_$(TGT_ROM_NAME)) \
|
||||||
# the target.
|
# the target.
|
||||||
#
|
#
|
||||||
COMMA := ,
|
COMMA := ,
|
||||||
DEBUG_OBJECTS = $(foreach D,$(subst $(COMMA), ,$(DEBUG)),$(BIN)/$(D).dbg.o)
|
DEBUG_OBJS = $(foreach D,$(subst $(COMMA), ,$(DEBUG)),$(BIN)/$(D).dbg.o)
|
||||||
$(foreach OBJ,$(filter-out $(dbg.o_OBJS),$(DEBUG_OBJECTS)), \
|
DEBUG_REPLACE_OBJS = $(foreach D,$(subst $(COMMA), ,$(DEBUG)),$(BIN)/$(D).o)
|
||||||
$(error $(OBJ) is not a valid debug object) \
|
BLIB_OBJS = $(DEBUG_OBJS) $(filter-out $(DEBUG_ORIG_OBJS),$(BOBJS))
|
||||||
)
|
|
||||||
|
|
||||||
# Print out all derived information for a given target.
|
# Print out all derived information for a given target.
|
||||||
#
|
#
|
||||||
|
@ -258,25 +250,33 @@ $(BIN)/%.info :
|
||||||
@echo
|
@echo
|
||||||
@echo 'makerom target flags : $(TGT_MAKEROM_FLAGS)'
|
@echo 'makerom target flags : $(TGT_MAKEROM_FLAGS)'
|
||||||
@echo
|
@echo
|
||||||
@echo 'Debugging objects : $(DEBUG_OBJECTS)'
|
@echo 'Debugging objects : $(DEBUG_OBJS)'
|
||||||
|
@echo 'Replaced objects : $(DEBUG_REPLACE_OBJS)'
|
||||||
|
|
||||||
|
# List of objects included in the last build of blib. This is needed
|
||||||
|
# in order to correctly rebuild blib whenever the list of objects
|
||||||
|
# changes.
|
||||||
|
#
|
||||||
|
BLIB_LIST = $(BIN)/.blib.list
|
||||||
|
.PHONY : always_check_blib_list
|
||||||
|
$(BLIB_LIST) : always_check_blib_list
|
||||||
|
@[ "$(shell cat $@)" = "$(BLIB_OBJS)" ] || echo "$(BLIB_OBJS)" > $@
|
||||||
|
.SECONDARY : $(BLIB_LIST)
|
||||||
|
|
||||||
|
# Library of all objects
|
||||||
|
#
|
||||||
|
BLIB = $(BIN)/blib.a
|
||||||
|
$(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
|
||||||
|
$(AR) r $@ $(BLIB_OBJS)
|
||||||
|
$(RANLIB) $@
|
||||||
|
blib : $(BLIB)
|
||||||
|
|
||||||
# Build an intermediate object file from the objects required for the
|
# Build an intermediate object file from the objects required for the
|
||||||
# specified target.
|
# specified target.
|
||||||
#
|
|
||||||
# If it's a debugging version, force a link to take place by making
|
|
||||||
# this target depend on a phony target, and mark the resulting files
|
|
||||||
# as being older than BLIB (and prevent them from being deleted), so
|
|
||||||
# that any subsequent images will do a fresh link. Otherwise, you
|
|
||||||
# won't get what you expect when you do e.g. "make DEBUG=pci
|
|
||||||
# bin/pnic.dsk ; make bin/pnic.dsk ; make DEBUG=pci bin/pnic.dsk"
|
|
||||||
#
|
#
|
||||||
$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT) \
|
$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
|
||||||
$(DEBUG_OBJECTS) $(if $(DEBUG),force_relink)
|
$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
|
||||||
$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) \
|
-Map $(BIN)/$*.tmp.map
|
||||||
$(DEBUG_OBJECTS) $(BLIB) -o $@ -Map $(BIN)/$*.tmp.map
|
|
||||||
$(if $(DEBUG_OBJECTS),$(TOUCH) -r $(BLIB) -B 2 $@ $(BIN)/$*.tmp.map)
|
|
||||||
.PHONY : force_relink
|
|
||||||
.SECONDARY :
|
|
||||||
|
|
||||||
# Show a linker map for the specified target
|
# Show a linker map for the specified target
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue