]> rtime.felk.cvut.cz Git - edu/xsl.git/commitdiff
Linked documents are updated even if the DoxBook .xml is not changed
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 16 Mar 2009 18:50:00 +0000 (19:50 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 16 Mar 2009 18:50:00 +0000 (19:50 +0100)
Makefile

index 3f9edfe2720bfddb00ce10cea8a41310b9f7c5e0..85987c03c33142d64f8160ca501235181ff2a44f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,7 @@ htmls := $(if $(word 2,$(XMLS)),$(XMLS:%.xml=%.html),index.html)
 
 default: subdirs
 default: $(htmls:%=$(TARGETDIR)/%)
+default: copy-links
 
 ifeq ($(words $(XMLS)),1)
 $(TARGETDIR)/$(htmls): $(XMLS)
@@ -58,20 +59,18 @@ endif
        $(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, ...)