git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: use --unsafe option under Cygwin with asciidoc
@ 2007-05-02 11:49 Jari Aalto
  2007-05-02 13:06 ` Eric Blake
  0 siblings, 1 reply; 6+ messages in thread
From: Jari Aalto @ 2007-05-02 11:49 UTC (permalink / raw)
  To: git

New: variable ASCIIDOC_FLAGS was introduced. It was also added to two
new targets. The old ASCIIDOC_EXTRA is set to --unsafe under Cygwin to
ignore asciidoc error about unsafe include.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 Documentation/Makefile |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 3f92783..399ff12 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -37,6 +37,14 @@ man7dir=$(mandir)/man7
 
 ASCIIDOC=asciidoc
 ASCIIDOC_EXTRA =
+
+ifneq (,$(CYGWIN))
+# Ignore 'include' call errors
+ASCIIDOC_EXTRA = --unsafe
+endif
+
+ASCIIDOC_FLAGS += $(ASCIIDOC_EXTRA)
+
 INSTALL?=install
 DOC_REF = origin/man
 
@@ -112,7 +120,7 @@ clean:
 %.html : %.txt
 	rm -f $@+ $@
 	$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
-		$(ASCIIDOC_EXTRA) -o - $< | \
+		$(ASCIIDOC_FLAGS) -o - $< | \
 		sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
 	mv $@+ $@
 
@@ -122,12 +130,12 @@ clean:
 %.xml : %.txt
 	rm -f $@+ $@
 	$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
-		$(ASCIIDOC_EXTRA) -o - $< | \
+		$(ASCIIDOC_FLAGS) -o - $< | \
 		sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
 	mv $@+ $@
 
 user-manual.xml: user-manual.txt user-manual.conf
-	$(ASCIIDOC) -b docbook -d book $<
+	$(ASCIIDOC) -b docbook -d book $(ASCIIDOC_FLAGS) $<
 
 XSLT = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
 XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
@@ -141,13 +149,13 @@ howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
 	mv $@+ $@
 
 $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
-	$(ASCIIDOC) -b xhtml11 $*.txt
+	$(ASCIIDOC) -b xhtml11 $(ASCIIDOC_FLAGS) $*.txt
 
 WEBDOC_DEST = /pub/software/scm/git/docs
 
 $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
 	rm -f $@+ $@
-	sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+
+	sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 $(ASCIIDOC_FLAGS) - >$@+
 	mv $@+ $@
 
 install-webdoc : html
-- 
1.5.1.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-05-05  9:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 11:49 [PATCH] Makefile: use --unsafe option under Cygwin with asciidoc Jari Aalto
2007-05-02 13:06 ` Eric Blake
2007-05-02 15:32   ` Jari Aalto
2007-05-02 16:56   ` Junio C Hamano
2007-05-05  8:10     ` Junio C Hamano
2007-05-05  9:06       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).