Parcourir la 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 il y a 14 ans
Parent
révision
4d73b49d60
1 fichiers modifiés avec 1 ajouts et 5 suppressions
  1. 1
    5
      src/Makefile.housekeeping

+ 1
- 5
src/Makefile.housekeeping Voir le fichier

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

Chargement…
Annuler
Enregistrer