Browse Source

[build] Avoid unnecessary "rm" and "touch" in dependency generation

Speed up dependency generation by omitting the totally unnecessary
"rm" and "touch" commands.  This reduces the time taken to generate
dependencies by around 6%.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
4d73b49d60
1 changed files with 1 additions and 5 deletions
  1. 1
    5
      src/Makefile.housekeeping

+ 1
- 5
src/Makefile.housekeeping View File

466
 
466
 
467
 	@$(ECHO) "  [DEPS] $(1)"
467
 	@$(ECHO) "  [DEPS] $(1)"
468
 	@$(MKDIR) -p $(dir $(2))
468
 	@$(MKDIR) -p $(dir $(2))
469
-	@$(RM) $(2)
470
-	@$(TOUCH) $(2)
471
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
469
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
472
 		-Wno-error -M $(1) -MG -MP | \
470
 		-Wno-error -M $(1) -MG -MP | \
473
-		sed 's/\.o\s*:/_DEPS =/' >> $(2)
471
+		sed 's/\.o\s*:/_DEPS =/' > $(2)
474
 	@$(ECHO_E) '\n$$(BIN)/$(4).o :' \
472
 	@$(ECHO_E) '\n$$(BIN)/$(4).o :' \
475
 		 '$(1) $$(MAKEDEPS) $$(POST_O_DEPS) $$($(4)_DEPS)' \
473
 		 '$(1) $$(MAKEDEPS) $$(POST_O_DEPS) $$($(4)_DEPS)' \
476
 		 '\n\t$$(QM)$(ECHO) "  [BUILD] $$@"' \
474
 		 '\n\t$$(QM)$(ECHO) "  [BUILD] $$@"' \
815
 
813
 
816
 	@$(ECHO) "  [MEDIADEPS] $(1)"
814
 	@$(ECHO) "  [MEDIADEPS] $(1)"
817
 	@$(MKDIR) -p $(dir $(2))
815
 	@$(MKDIR) -p $(dir $(2))
818
-	@$(RM) $(2)
819
-	@$(TOUCH) $(2)
820
 	@$(ECHO_E) '$$(BIN)/%.$(1) : $$(BIN)/%.$(1).zbin' \
816
 	@$(ECHO_E) '$$(BIN)/%.$(1) : $$(BIN)/%.$(1).zbin' \
821
 		  '\n\t$$(QM)$(ECHO) "  [FINISH] $$@"' \
817
 		  '\n\t$$(QM)$(ECHO) "  [FINISH] $$@"' \
822
 		  '\n\t$$(Q)$$(CP) $$< $$@' \
818
 		  '\n\t$$(Q)$$(CP) $$< $$@' \

Loading…
Cancel
Save