Merge "Remove asciidoc build in the Documentation folder"

This commit is contained in:
Shawn Pearce 2015-04-10 22:08:14 +00:00 committed by Gerrit Code Review
commit 2dfcb93f38
5 changed files with 0 additions and 145 deletions

View File

@ -1 +0,0 @@
*.html

View File

@ -1,50 +0,0 @@
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ASCIIDOC ?= asciidoc
ASCIIDOC_EXTRA ?=
ASCIIDOC_VER ?= 8.6.3
all: html
clean:
rm -f *.html
ASCIIDOC_EXE := $(shell which $(ASCIIDOC))
ifeq ($(wildcard $(ASCIIDOC_EXE)),)
$(error $(ASCIIDOC) must be available)
else
ASCIIDOC_OK := $(shell expr `asciidoc --version | cut -f2 -d' '` \>= $(ASCIIDOC_VER))
ifeq ($(ASCIIDOC_OK),0)
$(error $(ASCIIDOC) version $(ASCIIDOC_VER) or higher is required)
endif
endif
DOC_HTML := $(patsubst %.txt,%.html,$(wildcard *.txt))
REVISION := $(shell git describe HEAD | sed s/^v//)
html: $(DOC_HTML)
$(DOC_HTML): %.html : %.txt
@echo "FORMAT $@"
@rm -f $@+ $@
@$(ASCIIDOC) -a toc \
-a data-uri \
-a 'revision=$(REVISION)' \
-a 'newline=\n' \
-b xhtml11 \
-f asciidoc.conf \
$(ASCIIDOC_EXTRA) \
-o $@+ $<
@mv $@+ $@

View File

@ -1,29 +0,0 @@
[attributes]
asterisk=&#42;
plus=&#43;
caret=&#94;
startsb=&#91;
endsb=&#93;
tilde=&#126;
[specialsections]
GERRIT=gerrituplink
[gerrituplink]
<hr style="
height: 2px;
color: silver;
margin-top: 1.2em;
margin-bottom: 0.5em;
">
[macros]
(?u)^(?P<name>get)::(?P<target>\S*?)$=#
[get-blockmacro]
<a id="{target}" onmousedown="javascript:
var i = document.URL.lastIndexOf('/Documentation/');
var url = document.URL.substring(0, i) + '{target}';
document.getElementById('{target}').href = url;">
GET {target} HTTP/1.0
</a>

View File

@ -1 +0,0 @@
gerrit*

View File

@ -1,64 +0,0 @@
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
A2X ?= a2x
all: man
clean:
@rm -f gerrit-*
CMD_CORE_SSH_CMD := \
cmd-ban-commit.txt \
cmd-create-account.txt \
cmd-create-group.txt \
cmd-create-project.txt \
cmd-flush-caches.txt \
cmd-gc.txt \
cmd-gsql.txt \
cmd-ls-groups.txt \
cmd-ls-projects.txt \
cmd-ls-user-refs.txt \
cmd-query.txt \
cmd-rename-group.txt \
cmd-review.txt \
cmd-set-account.txt \
cmd-set-members.txt \
cmd-set-project-parent.txt \
cmd-set-project.txt \
cmd-set-reviewers.txt \
cmd-show-caches.txt \
cmd-show-connections.txt \
cmd-show-queue.txt \
cmd-stream-events.txt \
cmd-test-submit-rule.txt \
cmd-version.txt
GERRIT_CORE_SSH_CMD := $(patsubst cmd-%,gerrit-%,$(CMD_CORE_SSH_CMD))
DOC_MAN := $(patsubst %.txt,%.1,$(GERRIT_CORE_SSH_CMD))
man: $(GERRIT_CORE_SSH_CMD) $(DOC_MAN)
$(GERRIT_CORE_SSH_CMD) : gerrit-%.txt : ../cmd-%.txt
@cp $< $@
$(DOC_MAN) : %.1 : %.txt
@echo "creating man page for $@ ..."
@rm -f $@
@$(eval TITLE := $(join $(basename $<),\(1\)))
@$(eval SEPERATOR := $(shell echo $(TITLE) | sed 's/./=/g'))
@sed -i -re '1s/^.*$//$(TITLE)/' $<
@sed -i -re '2s/^=.*/$(SEPERATOR)/' $<
@sed -i -re '6s/^gerrit\s+(\w)/gerrit-\1/' $<
@$(A2X) --doctype manpage --format manpage $<