Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
9fe1c000
Commit
9fe1c000
authored
15 years ago
by
Sebastian Hahn
Browse files
Options
Downloads
Patches
Plain Diff
Allow generating documentation from asciidoc in the Makefile
parent
3efadcd0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configure.in
+4
-0
4 additions, 0 deletions
configure.in
doc/Makefile.am
+25
-1
25 additions, 1 deletion
doc/Makefile.am
doc/asciidoc-helper.sh
+54
-0
54 additions, 0 deletions
doc/asciidoc-helper.sh
with
83 additions
and
1 deletion
configure.in
+
4
−
0
View file @
9fe1c000
...
...
@@ -109,6 +109,10 @@ AC_PROG_RANLIB
dnl autoconf 2.59 appears not to support AC_PROG_SED
AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
dnl check for asciidoc and a2x
AC_PATH_PROG([ASCIIDOC], [asciidoc], none)
AC_PATH_PROG([A2X], [a2x], none)
AC_PATH_PROG([SHA1SUM], [sha1sum], none)
AC_PATH_PROG([OPENSSL], [openssl], none)
...
...
This diff is collapsed.
Click to expand it.
doc/Makefile.am
+
25
−
1
View file @
9fe1c000
asciidoc_files
=
tor-gencert
html_in
=
$(
asciidoc_files:
=
.html.in
)
man_in
=
$(
asciidoc_files:
=
.1.in
)
EXTRA_DIST
=
HACKING
\
tor-resolve.1 tor-gencert.1
\
$(
html_in
)
$(
man_in
)
$(
asciidoc_files:
=
.1.txt
)
\
tor-osx-dmg-creation.txt tor-rpm-creation.txt
\
tor-win32-mingw-creation.txt torify.1
man_MANS
=
tor.1 tor-resolve.1 tor-gencert.1 torify.1
nodist_man_MANS
=
tor.1 tor-resolve.1 tor-gencert.1 torify.1
$(
asciidoc_files:
=
.1
)
doc_DATA
=
$(
asciidoc_files:
=
.html
)
asciidoc_product
=
$(
nodist_man_MANS
)
$(
doc_DATA
)
SUBDIRS
=
design-paper spec
DIST_SUBDIRS
=
design-paper spec
# Generate the html documentation from asciidoc, but don't do
# machine-specific replacements yet
$(html_in)
:
$(
top_srcdir
)
/doc/asciidoc-helper.sh html @ASCIIDOC@ @SED@
$@
# Generate the manpage from asciidoc, but don't do
# machine-specific replacements yet
$(man_in)
:
$(
top_srcdir
)
/doc/asciidoc-helper.sh man @A2X@ @SED@
$@
# use ../config.status to swap all machine-specific magic strings
# in the asciidoc with their replacements.
$(asciidoc_product)
:
../config.status
--file
=
$@
;
This diff is collapsed.
Click to expand it.
doc/asciidoc-helper.sh
0 → 100755
+
54
−
0
View file @
9fe1c000
#!/bin/sh
# Copyright (c) The Tor Project, Inc.
# See LICENSE for licensing information
# Run this to generate .html.in or .1.in files from asciidoc files.
# Arguments:
# html|man asciidocpath sedpath outputfile
set
-e
if
[
$#
!=
4
]
;
then
exit
1
;
fi
output
=
$4
input
=
`
echo
$output
|
$3
-e
's/html\.in$/1\.txt/g'
-e
's/1\.in$/1\.txt/g'
`
base
=
`
echo
$output
|
$3
-e
's/\.html\.in$//g'
-e
's/\.1\.in$//g'
`
if
[
"
$1
"
=
"html"
]
;
then
if
[
"
$2
"
!=
none
]
;
then
"
$2
"
-d
manpage
-o
$output
$input
;
else
echo
"=================================="
;
echo
;
echo
"The manpage in html form for
$base
will "
;
echo
"NOT be available, because asciidoc doesn't appear to be "
;
echo
"installed!"
;
echo
;
echo
"=================================="
;
fi
elif
[
"
$1
"
=
"man"
]
;
then
if
test
"
$2
"
!=
none
;
then
if
$2
-f
manpage
$input
;
then
mv
$base
.1
$output
;
else
echo
"=================================="
;
echo
;
echo
"a2x is installed, but some required docbook support files are"
;
echo
"missing. Please install docbook-xsl and docbook-xml (Debian)"
;
echo
"or similar."
;
echo
;
echo
"=================================="
;
fi
;
else
echo
"=================================="
;
echo
;
echo
"The manpage for
$base
will NOT be "
;
echo
"available, because a2x doesn't appear to be installed!"
;
echo
;
echo
"=================================="
;
fi
fi
touch
$output
;
\
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment