From 2974c4e2b4a9d9ea86373fbca2ed47339dbbb2d7 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Mon, 26 Jul 2010 17:47:03 +0200 Subject: [PATCH] Conditionnal include of depend files depending on the current goal. --- makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index e8864bb4..b16de2e1 100644 --- a/makefile +++ b/makefile @@ -80,11 +80,18 @@ $(PDF): %.pdf: %.tex %.aux %.d: %.sb $(MAKE_SONGBOOK) -s $< -d -o $@ -include $(SONGBOOKS:%.sb=%.d) - %.pdf: %.ly @$(LILYPOND) --output=$(@:%.pdf=%) $< @rm $(@:%.pdf=%.ps) $(CHORDS): $(CHORDS_SRC) $(MAKE_CHORDS) -o $@ + + +ifeq (.pdf,$(suffix $(MAKECMDGOALS))) +include $(MAKECMDGOALS:%.pdf=%.d) +else ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),cleanall) + include $(TARGETS:%=%.d) + endif +endif