diff --git a/BLFS/Makefile b/BLFS/Makefile index 0793109..bcf1da7 100644 --- a/BLFS/Makefile +++ b/BLFS/Makefile @@ -5,6 +5,16 @@ # $Id$ +ifeq ($(REV),) + REV = sysv +endif + +ifneq ($(REV),sysv) + ifneq ($(REV),systemd) + $(error The REV variable is $(REV), but can only be 'sysv' or 'systemd') + endif +endif + ifdef V Q = else @@ -97,10 +107,16 @@ $(XSLDIR)/specialCases.xsl: $(TOPDIR)/gen-special.sh $(BLFS_FULL) $(Q)$(TOPDIR)/gen-special.sh $(BLFS_FULL) $@ $(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL) - @echo "Validating the book..." $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP) - $(Q)xmllint --nonet --noent --xinclude --postvalid \ - -o $@ $(BLFS_XML)/index.xml + @echo "Adjusting for revision $(REV)..." + $(Q)xsltproc --nonet --xinclude \ + --stringparam profile.revision $(REV) \ + --output $(RENDERTMP)/blfs-prof.xml \ + $(BLFS_XML)/stylesheets/lfs-xsl/profile.xsl \ + $(BLFS_XML)/index.xml + @echo "Validating the book..." + $(Q)xmllint --nonet --noent --postvalid \ + -o $@ $(RENDERTMP)/blfs-prof.xml all: update $(BOOK_XML) diff --git a/BLFS/gen-special.sh b/BLFS/gen-special.sh index 916ea6d..4d83dce 100755 --- a/BLFS/gen-special.sh +++ b/BLFS/gen-special.sh @@ -34,7 +34,7 @@ BLFS_DIR=$3 if test -z "${BLFS_DIR}"; then BLFS_DIR=$(cd $(dirname ${BLFS_XML})/.. ; pwd);fi # Packages whose version does not begin with a number -EXCEPTIONS=$(grep 'ENTITY.*version[ ]*"[^0-9"&.].*[0-9]' $BLFS_XML | +EXCEPTIONS=$(grep 'ENTITY.*version[ ]*"[^0-9"&.].*[0-9]' ${BLFS_DIR}/packages.ent | sed 's@^[^"]*"\([^"]*\)".*@\1@') # Non-versioned packages: