# 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))
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)
%.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)/%: %