]> rtime.felk.cvut.cz Git - edu/xsl.git/commitdiff
Small fixes
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 5 Mar 2009 12:30:27 +0000 (13:30 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 5 Mar 2009 12:30:27 +0000 (13:30 +0100)
Makefile

index d2cf2ea58883a222fca0551b2fb9ea329d71ff42..3f9edfe2720bfddb00ce10cea8a41310b9f7c5e0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,9 @@ RELATIVEDIR=$(patsubst /%,%,$(patsubst $(BASEDIR)%,%,$(shell pwd)))
 
 # BACK_TO_BASE: relative path from the current directory to BASEDIR
 BACK_TO_BASE:=$(shell echo $(RELATIVEDIR)|sed -e 's/[^/]\+/../g')
+ifeq ($(BACK_TO_BASE),)
+BACK_TO_BASE=.
+endif
 
 # $(info BASEDIR=$(BASEDIR))
 # $(info RELATIVEDIR=$(RELATIVEDIR))
@@ -54,7 +57,7 @@ $(TARGETDIR)/%.html: %.xml
 endif
        $(Q)mkdir -p $(dir $@)
        $(Q)echo "  XSLTPROC $(RELATIVEDIR:%=%/)$(notdir $@)"
-       $(Q)xsltproc --stringparam www.root $(WWW_ROOT) $(XSLTPROCFLAGS) $(BASEDIR)/xsl/course.xsl $< > "$@"
+       $(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)
@@ -69,7 +72,7 @@ copy-links: $(docbook_links:%=$(TARGETDIR)/%)
 
 %.links: %.xml
        $(Q)echo "  XSLTPROC $@"
-       $(Q)xsltproc --stringparam www.root $(WWW_ROOT) $(XSLTPROCFLAGS) $(BASEDIR)/xsl/getlinks.xsl $< > $@
+       $(Q)xsltproc --stringparam www.root "$(WWW_ROOT)" $(XSLTPROCFLAGS) $(BASEDIR)/xsl/getlinks.xsl $< > $@
 
 # For copying other file from source (images, pfd, ...)
 $(TARGETDIR)/%: %