Restore the render system to what it was before pythonhosted changes

This commit is contained in:
Pierre Labastie 2023-01-25 13:01:41 +01:00
parent 4653242e25
commit e3047fdc76
2 changed files with 22 additions and 59 deletions

View File

@ -9,14 +9,10 @@ CHUNK_QUIET = 1
ROOT_ID =
SHELL = /bin/bash
#PYHOSTED = general/prog/python-dependencies/pythonhosted.xml
#ALLXML := $(filter-out $(RENDERTMP)/%, \
# $(filter-out $(PYHOSTED), \
# $(wildcard *.xml */*.xml */*/*.xml */*/*/*.xml */*/*/*/*.xml)))
ALLXML := $(filter-out $(RENDERTMP)/%, \
$(wildcard *.xml */*.xml */*/*.xml */*/*/*.xml */*/*/*/*.xml))
$(wildcard *.xml */*.xml */*/*.xml */*/*/*.xml */*/*/*/*.xml))
ALLXSL := $(filter-out $(RENDERTMP)/%, \
$(wildcard *.xsl */*.xsl */*/*.xsl */*/*/*.xsl */*/*/*/*.xsl))
$(wildcard *.xsl */*.xsl */*/*.xsl */*/*/*.xsl */*/*/*/*.xsl))
ifdef V
Q =
@ -34,12 +30,6 @@ ifneq ($(REV), sysv)
endif
endif
# Let's get the previous REV: it'll be used to see if we should
# rebuild version.ent
PREVREV != if [ -f conditional.ent ]; then \
gawk '/INCLUDE/{ print $$3 }' conditional.ent; \
fi
ifeq ($(REV), sysv)
BASEDIR ?= $(HOME)/public_html/blfs-book
NOCHUNKS_OUTPUT ?= blfs-book.html
@ -57,6 +47,7 @@ else
endif
blfs: html wget-list
help:
@ -109,7 +100,7 @@ all: blfs nochunks
world: all blfs-patch-list dump-commands test-links
html: $(BASEDIR)/index.html
$(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML)
$(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML) version
@echo "Generating chunked XHTML files..."
$(Q)xsltproc --nonet \
--stringparam chunk.quietly $(CHUNK_QUIET) \
@ -143,7 +134,7 @@ $(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML)
done;
nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT)
$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML)
$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML) version
@echo "Generating non-chunked XHTML file..."
$(Q)xsltproc --nonet \
--stringparam rootid "$(ROOT_ID)" \
@ -166,8 +157,7 @@ clean:
$(Q)rm -f $(RENDERTMP)/blfs*
validate: $(RENDERTMP)/$(BLFSFULL)
#$(RENDERTMP)/$(BLFSFULL): $(PYHOSTED) version.ent
$(RENDERTMP)/$(BLFSFULL): version.ent
$(RENDERTMP)/$(BLFSFULL): general.ent packages.ent $(ALLXML) $(ALLXSL) version
$(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
@echo "Adjusting for revision $(REV)..."
@ -186,7 +176,7 @@ $(RENDERTMP)/$(BLFSFULL): version.ent
$(RENDERTMP)/$(BLFSHTML2)
profile-html: $(RENDERTMP)/$(BLFSHTML)
$(RENDERTMP)/$(BLFSHTML): $(RENDERTMP)/$(BLFSFULL)
$(RENDERTMP)/$(BLFSHTML): $(RENDERTMP)/$(BLFSFULL) version
@echo "Generating profiled XML for XHTML..."
$(Q)xsltproc --nonet \
--stringparam profile.condition html \
@ -199,7 +189,7 @@ blfs-patch-list: blfs-patches.sh
$(Q)awk '{if ($$1 == "copy") {sub(/.*\//, "", $$2); print $$2}}' \
blfs-patches.sh > blfs-patch-list
blfs-patches.sh: $(RENDERTMP)/$(BLFSFULL)
blfs-patches.sh: $(RENDERTMP)/$(BLFSFULL) version
@echo "Generating blfs patch script..."
$(Q)xsltproc --nonet \
--output blfs-patches.sh \
@ -207,7 +197,7 @@ blfs-patches.sh: $(RENDERTMP)/$(BLFSFULL)
$(RENDERTMP)/$(BLFSFULL)
wget-list: $(BASEDIR)/wget-list
$(BASEDIR)/wget-list: $(RENDERTMP)/$(BLFSFULL)
$(BASEDIR)/wget-list: $(RENDERTMP)/$(BLFSFULL) version
@echo "Generating wget list for $(REV) at $(BASEDIR)/wget-list ..."
$(Q)mkdir -p $(BASEDIR)
$(Q)xsltproc --nonet \
@ -216,7 +206,7 @@ $(BASEDIR)/wget-list: $(RENDERTMP)/$(BLFSFULL)
$(RENDERTMP)/$(BLFSFULL)
test-links: $(BASEDIR)/test-links
$(BASEDIR)/test-links: $(RENDERTMP)/$(BLFSFULL)
$(BASEDIR)/test-links: $(RENDERTMP)/$(BLFSFULL) version
@echo "Generating test-links file..."
$(Q)mkdir -p $(BASEDIR)
$(Q)xsltproc --nonet \
@ -268,44 +258,16 @@ systemd-units:
fi
dump-commands: $(DUMPDIR)
$(DUMPDIR): $(RENDERTMP)/$(BLFSFULL)
$(DUMPDIR): $(RENDERTMP)/$(BLFSFULL) version
@echo "Dumping book commands..."
$(Q)xsltproc --output $(DUMPDIR)/ \
stylesheets/dump-commands.xsl \
$(RENDERTMP)/$(BLFSFULL)
$(Q)touch $(DUMPDIR)
.PHONY: blfs all world html nochunks tmpdir clean \
validate profile-html blfs-patch-list wget-list \
test-links dump-commands bootscripts systemd-units
.PHONY: blfs all world html nochunks tmpdir clean \
validate profile-html blfs-patch-list wget-list test-links \
dump-commands bootscripts systemd-units version
# make version.ent unconditionally if we have changed REV
ifneq ($(REV), $(PREVREV))
.PHONY: version.ent
endif
version.ent: git-version.sh general.ent packages.ent gnome.ent $(ALLXML) $(ALLXSL) Makefile
$(Q)./$< $(REV) $^
#ALL_PYTHON_DEPS := $(filter-out $(PYHOSTED), \
# $(wildcard general/prog/python-dependencies/*.xml))
#
#PYTHONHOSTED_MODS := requests sphinx_rtd_theme pytest gi-docgen
#
#PYTHONHOSTED_MOD_PAGES := $(addprefix general/prog/python-modules/,\
# $(addsuffix .xml,$(PYTHONHOSTED_MODS)))
#
#$(PYHOSTED): $(ALL_PYTHON_DEPS) \
# $(PYTHONHOSTED_MOD_PAGES) \
# stylesheets/pyhosted-inc.xsl \
# stylesheets/pythonhosted.xsl | version.ent
# @echo Generating pythonhosted.xml; \
# if [ ! -f $@ ]; then \
# cp dummy.xml $(PYHOSTED); \
# fi
# $(Q)xsltproc --xinclude \
# --output temp.xml \
# --stringparam packages "$(PYTHONHOSTED_MODS)" \
# stylesheets/pythonhosted.xsl \
# general/prog/python-modules.xml
# $(Q)mv temp.xml $@
version:
$(Q)./git-version.sh $(REV)

View File

@ -11,8 +11,6 @@ else
exit 1
fi
shift 1
echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent
echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent
@ -29,8 +27,7 @@ fi
export LC_ALL=en_US.utf8
export TZ=America/Chicago
sha=$(git log -s --format=format:"%H" --date=local -1 $*)
commit_date=$(git log -s --format=format:"%cd" --date=local -1 $*)
commit_date=$(git show -s --format=format:"%cd" --date=local)
short_date=$(date --date "$commit_date" "+%Y-%m-%d")
year=$(date --date "$commit_date" "+%Y")
@ -47,9 +44,13 @@ esac
full_date="$month $day$suffix, $year"
sha="$(git describe --abbrev=1 $sha)"
sha="$(git describe --abbrev=1)"
version=$(echo "$sha" | sed 's/-g[^-]*$//')
if [ "$(git diff HEAD | wc -l)" != "0" ]; then
version="$version+"
fi
echo "<!ENTITY year \"$year\">" > version.ent
echo "<!ENTITY version \"$version\">" >> version.ent
echo "<!ENTITY releasedate \"$full_date\">" >> version.ent