Work around variable TARGETS not initialized on first pass

parent 916764ba
......@@ -200,11 +200,10 @@ sync_pre: | $(require_inputdir)
$(and $(call printisbn,$(TARGET)),-or -name "$(call printisbn,$(TARGET))*") \
$(and $(call ebookisbn,$(TARGET)),-or -name "$(call ebookisbn,$(TARGET))*") \
\) -execdir rsync -utv {} $(PROJECTDIR)/ \;;)
ifneq ($(strip $(TARGETS)),$(strip $(PROJECT)))
find $(INPUTDIR)/ -maxdepth 1 -type f \
-name "$(PROJECT)*" \
-execdir rsync -utv {} $(PROJECTDIR)/ \;
endif
$(if $(strip $(filter-out $(TARGETS),$(PROJECT))),
find $(INPUTDIR)/ -maxdepth 1 -type f \
-name "$(PROJECT)*" \
-execdir rsync -utv {} $(PROJECTDIR)/ \;)
require_outputdir := $(or $(strip $(OUTPUTDIR)),fail)
......@@ -216,11 +215,10 @@ sync_post: | $(require_pubdir) $(require_outputdir)
$(and $(call printisbn,$(TARGET)),-or -name "$(call printisbn,$(TARGET))*") \
$(and $(call ebookisbn,$(TARGET)),-or -name "$(call ebookisbn,$(TARGET))*") \
\) -execdir rsync -ct {} $(OUTPUTDIR)/$(OUTPATH)/ \;;)
ifneq ($(strip $(TARGETS)),$(strip $(PROJECT)))
find $(PUBDIR)/-maxdepth 1 -type f \
-name "$(PROJECT)*" \
-execdir rsync -ct {} $(OUTPUTDIR)/ \;
endif
$(if $(strip $(filter-out $(TARGETS),$(PROJECT))),
find $(PUBDIR)/ -maxdepth 1 -type f \
-name "$(PROJECT)*" \
-execdir rsync -ct {} $(OUTPUTDIR)/ \;)
.PHONY: website
website:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment