Jean-Noël Avila <jn.avila@xxxxxxx> writes: > +ifdef MAN_FILTER > +MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)) > +else > MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT) > +MAN_FILTER = $(MAN_TXT) > +endif OK. > OBSOLETE_HTML += everyday.html > OBSOLETE_HTML += git-remote-helpers.html > -DOC_HTML = $(MAN_HTML) $(OBSOLETE_HTML) > > ARTICLES += howto-index > ARTICLES += git-tools > @@ -81,11 +86,13 @@ TECH_DOCS += technical/trivial-merge > SP_ARTICLES += $(TECH_DOCS) > SP_ARTICLES += technical/api-index > > -DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) > +SP_ARTICLES_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) I'd call that $(ARTICLES_HTML); SP_ARTICLES are those pages that want to become regular articles but singled out because they need special handling to format. > +HTML_FILTER ?= $(SP_ARTICLES_HTML) $(OBSOLETE_HTML) > +DOC_HTML = $(MAN_HTML) $(filter $(HTML_FILTER),$(SP_ARTICLES_HTML) $(OBSOLETE_HTML)) > -DOC_MAN1 = $(patsubst %.txt,%.1,$(MAN1_TXT)) > -DOC_MAN5 = $(patsubst %.txt,%.5,$(MAN5_TXT)) > -DOC_MAN7 = $(patsubst %.txt,%.7,$(MAN7_TXT)) > +DOC_MAN1 = $(patsubst %.txt,%.1,$(filter $(MAN_FILTER), $(MAN1_TXT))) > +DOC_MAN5 = $(patsubst %.txt,%.5,$(filter $(MAN_FILTER), $(MAN5_TXT))) > +DOC_MAN7 = $(patsubst %.txt,%.7,$(filter $(MAN_FILTER), $(MAN7_TXT))) Makes sense; s/, /,/, though.