Skip to content

Commit

Permalink
Revert "Build guide/next/ for next MacPorts release"
Browse files Browse the repository at this point in the history
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 1a9b8da
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions Makefile
Expand Up @@ -51,24 +51,14 @@ GUIDE_XSL_CHUNK = $(GUIDE)/resources/chunk.xsl
# DocBook HTML stylesheet for the guide. # DocBook HTML stylesheet for the guide.
STYLESHEET = docbook.css STYLESHEET = docbook.css


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


gen_audience = $(subst $(eval) ,;,$1) all: guide guide-chunked
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


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


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


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


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


# Generate the guide as a PDF. # Generate the guide as a PDF.
guide-dblatex: SUFFIX = pdf guide-dblatex: SUFFIX = pdf
guide-dblatex: $(GUIDE)/resources/xsl guide-dblatex:
$(MKDIR) -p $(GUIDE_RESULT_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) \ $(DBLATEX) \
--fig-path="$(GUIDE)/resources/images" \ --fig-path="$(GUIDE)/resources/images" \
--type="$(SUFFIX)" \ --type="$(SUFFIX)" \
--param='toc.section.depth=2' \ --param='toc.section.depth=2' \
--param='doc.section.depth=3' \ --param='doc.section.depth=3' \
--output="$(GUIDE_RESULT_DBLATEX)/macports-guide.$(SUFFIX)" \ --output="$(GUIDE_RESULT_DBLATEX)/macports-guide.$(SUFFIX)" \
$(GUIDE_RESULT_DBLATEX)/guide.xml $(GUIDE_SRC)/guide.xml


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

0 comments on commit 1a9b8da

Please sign in to comment.