From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 8BEE91F89C for ; Sun, 22 Jan 2017 02:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751079AbdAVCmY (ORCPT ); Sat, 21 Jan 2017 21:42:24 -0500 Received: from castro.crustytoothpaste.net ([75.10.60.170]:39240 "EHLO castro.crustytoothpaste.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbdAVCmK (ORCPT ); Sat, 21 Jan 2017 21:42:10 -0500 Received: from genre.crustytoothpaste.net (unknown [IPv6:2001:470:b978:101:254c:7dd1:74c7:cde0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by castro.crustytoothpaste.net (Postfix) with ESMTPSA id 3F67A280B3; Sun, 22 Jan 2017 02:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=crustytoothpaste.net; s=default; t=1485052927; bh=3JLJtfCg6s6WCfzo9Ql/bVzDvl46Z2oaciv7hXAJfHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zNobIvoRWDloXrpz5iKVzZtOpVWGNl+aWnGWB0qg6FXTOkw6iXxJdlgs0px7t5dcT zPDCXbyyp/r2BRGGS3M4BY3eVJhios7RPytadNIKODRphxXnonVHi7XrHZOFF+G2Py DTeI/2oUQ8DxY2D54rCf18J2eNrgyEUzrGZV0GtprpWptS4+4fqqB75dGiAWWVf+7o 8NHdN8dGBVym/EajwIGWA2l5vDpj9+zYCz6SHptaR+JjtqMYda1TCdlSh9cfA36oOP CbmKJvee6rKUnVlzjJzufcm9yCg+CPaVtF7E5EWUT1fXvfYn957g3Xceb6exjz3XzP u/8RhzHRjkgYPFDteQsskG00TPhkinBA8RPrhL8hiYxZApDLxiaDsxxn2zVjq1jtcC fpgaQIxdHaE7X8EEWbRUmOY3/Labsvgl1JgvhkCmb2LsYXnnjPrNEWXaWWjsZcnwA5 gdfiJrTI3yyW7+Kz9S1s1BAkWK2HsPs7Rejv6jXPkaLeLh4BGN8 From: "brian m. carlson" To: git@vger.kernel.org Cc: Johannes Schindelin , Jeff King Subject: [PATCH v2 7/7] Makefile: add a knob to enable the use of Asciidoctor Date: Sun, 22 Jan 2017 02:41:56 +0000 Message-Id: <20170122024156.284180-8-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170122024156.284180-1-sandals@crustytoothpaste.net> References: <20170122024156.284180-1-sandals@crustytoothpaste.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org While Git has traditionally built its documentation using AsciiDoc, some people wish to use Asciidoctor for speed or other reasons. Add a Makefile knob, USE_ASCIIDOCTOR, that sets various options in order to produce acceptable output. For HTML output, XHTML5 was chosen, since the AsciiDoc options also produce XHTML, albeit XHTML 1.1. Asciidoctor does not have built-in support for the linkgit macro, but it is available using the Asciidoctor Extensions Lab. Add a macro to enable the use of this extension if it is available. Without it, the linkgit macros are emitted into the output. Signed-off-by: brian m. carlson --- Documentation/Makefile | 12 ++++++++++++ Makefile | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index d95002e62..19c42eb60 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -174,6 +174,18 @@ ifdef GNU_ROFF XMLTO_EXTRA += -m manpage-quote-apos.xsl endif +ifdef USE_ASCIIDOCTOR +ASCIIDOC = asciidoctor +ASCIIDOC_CONF = +ASCIIDOC_HTML = xhtml5 +ASCIIDOC_DOCBOOK = docbook45 +ifdef ASCIIDOCTOR_EXTENSIONS_LAB +ASCIIDOC_EXTRA = -I$(ASCIIDOCTOR_EXTENSIONS_LAB) -rasciidoctor/extensions -rman-inline-macro +endif +ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;' +DBLATEX_COMMON = +endif + SHELL_PATH ?= $(SHELL) # Shell quote; SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) diff --git a/Makefile b/Makefile index 27afd0f37..7ed9d4d4b 100644 --- a/Makefile +++ b/Makefile @@ -250,6 +250,12 @@ all:: # apostrophes to be ASCII so that cut&pasting examples to the shell # will work. # +# Define USE_ASCIIDOCTOR to use Asciidoctor instead of AsciiDoc to build the +# documentation. +# +# Define ASCIIDOCTOR_EXTENSIONS_LAB to point to the location of the Asciidoctor +# Extensions Lab if you have it available. +# # Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl). # # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's