@@ -7,12 +7,14 @@ ARTICLES =
77SP_ARTICLES =
88OBSOLETE_HTML =
99
10+ -include GIT-EXCLUDED-PROGRAMS
11+
1012MAN1_TXT += $(filter-out \
13+ $(patsubst % ,% .txt,$(EXCLUDED_PROGRAMS ) ) \
1114 $(addsuffix .txt, $(ARTICLES ) $(SP_ARTICLES ) ) , \
1215 $(wildcard git-* .txt) )
1316MAN1_TXT += git.txt
1417MAN1_TXT += gitk.txt
15- MAN1_TXT += gitremote-helpers.txt
1618MAN1_TXT += gitweb.txt
1719
1820MAN5_TXT += gitattributes.txt
@@ -30,6 +32,7 @@ MAN7_TXT += gitdiffcore.txt
3032MAN7_TXT += giteveryday.txt
3133MAN7_TXT += gitglossary.txt
3234MAN7_TXT += gitnamespaces.txt
35+ MAN7_TXT += gitremote-helpers.txt
3336MAN7_TXT += gitrevisions.txt
3437MAN7_TXT += gitsubmodules.txt
3538MAN7_TXT += gittutorial-2.txt
@@ -331,6 +334,15 @@ mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
331334 show_tool_names can_merge " * " || :' >mergetools-merge.txt && \
332335 date > $@
333336
337+ TRACK_ASCIIDOCFLAGS = $(subst ','\'',$(ASCIIDOC_COMMON ) :$(ASCIIDOC_HTML ) :$(ASCIIDOC_DOCBOOK ) )
338+
339+ GIT-ASCIIDOCFLAGS : FORCE
340+ @FLAGS=' $(TRACK_ASCIIDOCFLAGS)' ; \
341+ if test x" $$ FLAGS" ! = x" ` cat GIT-ASCIIDOCFLAGS 2> /dev/null` " ; then \
342+ echo >&2 " * new asciidoc flags" ; \
343+ echo " $$ FLAGS" > GIT-ASCIIDOCFLAGS; \
344+ fi
345+
334346clean :
335347 $(RM ) * .xml * .xml+ * .html * .html+ * .1 * .5 * .7
336348 $(RM ) * .texi * .texi+ * .texi++ git.info gitman.info
@@ -340,30 +352,31 @@ clean:
340352 $(RM ) SubmittingPatches.txt
341353 $(RM ) $(cmds_txt ) $(mergetools_txt ) * .made
342354 $(RM ) manpage-base-url.xsl
355+ $(RM ) GIT-ASCIIDOCFLAGS
343356
344- $(MAN_HTML ) : % .html : % .txt asciidoc.conf
357+ $(MAN_HTML ) : % .html : % .txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
345358 $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
346359 $(TXT_TO_HTML ) -d manpage -o $@ + $< && \
347360 mv $@ + $@
348361
349- $(OBSOLETE_HTML ) : % .html : % .txto asciidoc.conf
362+ $(OBSOLETE_HTML ) : % .html : % .txto asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
350363 $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
351364 $(TXT_TO_HTML ) -o $@ + $< && \
352365 mv $@ + $@
353366
354367manpage-base-url.xsl : manpage-base-url.xsl.in
355368 $(QUIET_GEN ) sed " s|@@MAN_BASE_URL@@|$( MAN_BASE_URL) |" $< > $@
356369
357- % .1 % .5 % .7 : % .xml manpage-base-url.xsl
370+ % .1 % .5 % .7 : % .xml manpage-base-url.xsl $( wildcard manpage * .xsl)
358371 $(QUIET_XMLTO )$(RM ) $@ && \
359372 $(XMLTO ) -m $(MANPAGE_XSL ) $(XMLTO_EXTRA ) man $<
360373
361- % .xml : % .txt asciidoc.conf
374+ % .xml : % .txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
362375 $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
363376 $(TXT_TO_XML ) -d manpage -o $@ + $< && \
364377 mv $@ + $@
365378
366- user-manual.xml : user-manual.txt user-manual.conf
379+ user-manual.xml : user-manual.txt user-manual.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
367380 $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
368381 $(TXT_TO_XML ) -d book -o $@ + $< && \
369382 mv $@ + $@
@@ -373,7 +386,8 @@ technical/api-index.txt: technical/api-index-skel.txt \
373386 $(QUIET_GEN ) cd technical && ' $(SHELL_PATH_SQ)' ./api-index.sh
374387
375388technical/% .html : ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
376- $(patsubst % ,% .html,$(API_DOCS ) technical/api-index $(TECH_DOCS ) ) : % .html : % .txt asciidoc.conf
389+ $(patsubst % ,% .html,$(API_DOCS ) technical/api-index $(TECH_DOCS ) ) : % .html : % .txt \
390+ asciidoc.conf GIT-ASCIIDOCFLAGS
377391 $(QUIET_ASCIIDOC )$(TXT_TO_HTML ) $* .txt
378392
379393SubmittingPatches.txt : SubmittingPatches
@@ -430,7 +444,7 @@ $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
430444WEBDOC_DEST = /pub/software/scm/git/docs
431445
432446howto/% .html : ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
433- $(patsubst % .txt,% .html,$(wildcard howto/* .txt) ) : % .html : % .txt
447+ $(patsubst % .txt,% .html,$(wildcard howto/* .txt) ) : % .html : % .txt GIT-ASCIIDOCFLAGS
434448 $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
435449 sed -e ' 1,/^$$/d' $< | \
436450 $(TXT_TO_HTML ) - > $@ + && \
0 commit comments