default: subdirs
default: $(htmls:%=$(TARGETDIR)/%)
+default: copy-links
ifeq ($(words $(XMLS)),1)
$(TARGETDIR)/$(htmls): $(XMLS)
$(Q)mkdir -p $(dir $@)
$(Q)echo " XSLTPROC $(RELATIVEDIR:%=%/)$(notdir $@)"
$(Q)xsltproc --stringparam www.root "$(WWW_ROOT)" $(XSLTPROCFLAGS) $(BASEDIR)/xsl/course.xsl $< > "$@"
- $(Q)$(MAKE) --no-print-directory copy-links XML=$<
-links.mk: $(XML:%.xml=%.links)
- $(Q)echo 'docbook_links = $(wildcard $(shell cat $^))' > $@
-ifeq ($(MAKECMDGOALS),copy-links)
+links.mk: $(XMLS:%.xml=%.links)
+ $(Q)echo 'docbook_links = $(sort $(wildcard $(shell cat $^)))' > $@
+
-include links.mk
-endif
copy-links: $(docbook_links:%=$(TARGETDIR)/%)
- $(Q)rm links.mk $(XML:%.xml=%.links)
+ $(Q)rm links.mk $(XMLS:%.xml=%.links)
%.links: %.xml
- $(Q)echo " XSLTPROC $@"
+# $(Q)echo " XSLTPROC $@"
$(Q)xsltproc --stringparam www.root "$(WWW_ROOT)" $(XSLTPROCFLAGS) $(BASEDIR)/xsl/getlinks.xsl $< > $@
# For copying other file from source (images, pfd, ...)