Skip to content
Permalink
Browse files

Revert "Build guide/next/ for next MacPorts release"

Keeping track of all the version numbers will become cumbersome at some
point. Also it adds extra work to remove the audience="" tags after
a release.

I recommend we use normal git branches for this instead.

This reverts commit bf54d37.
  • Loading branch information
raimue committed Apr 11, 2018
1 parent 5507eff commit 1a9b8da8da67c6da8bedded309790d5e0b56a68a
Showing with 7 additions and 25 deletions.
  1. +7 −25 Makefile
@@ -51,24 +51,14 @@ GUIDE_XSL_CHUNK = $(GUIDE)/resources/chunk.xsl
# DocBook HTML stylesheet for the guide.
STYLESHEET = docbook.css

# MacPorts versions
MACPORTS_RELEASED = 2.4 2.4.0 2.4.1 2.4.2
MACPORTS_NEXT = 2.5 2.5.0 2.4.3
.PHONY: all guide guide-chunked guide-dblatex clean validate

gen_audience = $(subst $(eval) ,;,$1)
MACPORTS_RELEASED_AUDIENCE = $(call gen_audience,$(MACPORTS_RELEASED))
MACPORTS_NEXT_AUDIENCE = $(call gen_audience,$(MACPORTS_NEXT))

.PHONY: all guide guide-next guide-chunked guide-chunked-next guide-dblatex clean validate

all: guide guide-next guide-chunked guide-chunked-next
all: guide guide-chunked

# Generate the HTML guide using DocBook from the XML sources
guide: GUIDE_OUTDIR= $(GUIDE_RESULT)
guide-next: GUIDE_OUTDIR = $(GUIDE_RESULT)/next
guide-chunked: GUIDE_OUTDIR = $(GUIDE_RESULT)/chunked
guide-chunked-next: GUIDE_OUTDIR = $(GUIDE_RESULT)/next/chunked
guide-chunked guide-chunked-next: GUIDE_XSL = $(GUIDE_XSL_CHUNK)
guide-chunked: GUIDE_XSL = $(GUIDE_XSL_CHUNK)

$(GUIDE)/resources/xsl:
ifeq ($(UNAME), Linux)
@@ -77,14 +67,12 @@ else
$(LN) -sfh $(DOCBOOK) $(GUIDE)/resources/xsl
endif

guide guide-next guide-chunked guide-chunked-next:: $(GUIDE)/resources/xsl
guide guide-chunked:: $(GUIDE)/resources/xsl
$(MKDIR) -p $(GUIDE_OUTDIR)
$(CP) $(GUIDE)/resources/$(STYLESHEET) $(GUIDE_OUTDIR)/$(STYLESHEET)
$(CP) $(GUIDE)/resources/images/* $(GUIDE_OUTDIR)/
$(CP) $(GUIDE)/resources/*.js $(GUIDE_OUTDIR)/
$(XSLTPROC) --xinclude \
--stringparam profile.audience \
"$(if $(filter %-next,$@),$(MACPORTS_NEXT_AUDIENCE),$(MACPORTS_RELEASED_AUDIENCE))" \
--output $(GUIDE_OUTDIR)/index.html \
$(GUIDE_XSL) $(GUIDE_SRC)/guide.xml
# Convert all sections (h1-h9) to a link so it's easy to link to them.
@@ -93,28 +81,22 @@ guide guide-next guide-chunked guide-chunked-next:: $(GUIDE)/resources/xsl
's|(<h[0-9] [^>]*><a id="([^"]*)"></a>)([^<]*)(</h[0-9]>)|\1<a href="#\2">\3</a>\4|g' \
$(GUIDE_OUTDIR)/index.html

guide-chunked guide-chunked-next::
guide-chunked::
# Add the table of contents to every chunked HTML file.
# If someone knows a better way to do this please change it.
$(TCLSH) toc-for-chunked.tcl $(GUIDE_OUTDIR)

# Generate the guide as a PDF.
guide-dblatex: SUFFIX = pdf
guide-dblatex: $(GUIDE)/resources/xsl
guide-dblatex:
$(MKDIR) -p $(GUIDE_RESULT_DBLATEX)
$(XSLTPROC) --xinclude \
--stringparam profile.audience \
"$(if $(filter %-next,$@),$(MACPORTS_NEXT_AUDIENCE),$(MACPORTS_RELEASED_AUDIENCE))" \
--output $(GUIDE_RESULT_DBLATEX)/guide.xml \
$(GUIDE)/resources/xsl/profiling/profile.xsl \
$(GUIDE_SRC)/guide.xml
$(DBLATEX) \
--fig-path="$(GUIDE)/resources/images" \
--type="$(SUFFIX)" \
--param='toc.section.depth=2' \
--param='doc.section.depth=3' \
--output="$(GUIDE_RESULT_DBLATEX)/macports-guide.$(SUFFIX)" \
$(GUIDE_RESULT_DBLATEX)/guide.xml
$(GUIDE_SRC)/guide.xml

# Remove all temporary files generated by guide:.
clean:

0 comments on commit 1a9b8da

Please sign in to comment.
You can’t perform that action at this time.