Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
66948827
Commit
66948827
authored
Nov 05, 2012
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/Makefile: refactoring
The initial sketch did work but was somewhat redundant while lacking the knob conveniently change output directory as well as means to get it cleaned up.
parent
12de346d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
19 deletions
+38
-19
Makefile
doc/Makefile
+38
-19
No files found.
doc/Makefile
View file @
66948827
# build asciidoc books
ifdef
BUILDDIR
DEST
=
-D
"
$(BUILDDIR)
"
endif
ifdef
DEBUG
VERBOSE
=
--verbose
endif
PROJECT
=
mkimage-profiles
TOPLEVEL_DOC
=
mkimage-profiles.asciidoc
HTMLPAGE
=
$
(
TOPLEVEL_DOC:.asciidoc
=
.html
)
TOPLEVEL_DOC
=
$(PROJECT)
.asciidoc
RESOURCE_FILES
=
/etc/asciidoc
A2X
=
a2x
FXC
=
.fop.xconf
.PHONY
:
all clean
L
=
ru
DEPTH
=
3
all
:
$(HTMLPAGE)
# common args (and the source file to process) come last
XSLT_ARGS
=
--stringparam
toc.max.depth
$(DEPTH)
COMMON_ARGS
=
-d
book
-a
lang
=
"
$L
"
$(DEST)
$(VERBOSE)
$(TOPLEVEL_DOC)
HTML_ARGS
=
-a
data-uri
--icons
-r
$(RESOURCE_FILES)
-r
.
\
--xsltproc-opts
=
'
$(XSLT_ARGS)
'
$(COMMON_ARGS)
%.html
:
%.asciidoc
$(A2X)
-d
book
-f
xhtml
-a
lang
=
ru
\
--icons
-r
$(RESOURCE_FILES)
-r
.
\
--xsltproc-opts
=
'--stringparam toc.max.depth 3'
\
$<
.PHONY
:
all prep chunked xhtml pdf clean
chunked
:
$(TOPLEVEL_DOC)
$(A2X)
-d
book
-f
chunked
-a
lang
=
ru
\
--icons
-r
$(RESOURCE_FILES)
-r
.
\
--xsltproc-opts
=
'--stringparam toc.max.depth 3'
\
$<
all
:
chunked xhtml pdf
pdf
:
$(TOPLEVEL_DOC)
$(A2X)
--verbose
--fop
--fop-opts
=
'-c .fop.xconf'
-d
book
-f
pdf
-a
lang
=
ru
\
--xsltproc-opts
=
' \
--stringparam toc.max.depth 3 \
prep
:
@
if
[
-n
"
$(BUILDDIR)
"
]
;
then
mkdir
-p
"
$(BUILDDIR)
"
;
fi
chunked xhtml
:
prep
@
echo
"** building
$@
book"
@
$(A2X)
-f
$@
$(HTML_ARGS)
pdf
:
prep
@
echo
"** building
$@
book"
@
$(A2X)
--xsltproc-opts
=
'
$(XSLT_ARGS)
\
--stringparam title.font.family "DejaVu Sans" \
--stringparam body.font.family "DejaVu Serif" \
--stringparam monospace.font.family "DejaVu Sans Mono"'
\
$<
--fop
--fop-opts
=
'-c
$(FXC)
'
-f
pdf
$(COMMON_ARGS)
clean
:
@
echo
"** cleaning up"
@
if
[
-d
"
$(BUILDDIR)
"
]
;
then
cd
"
$(BUILDDIR)
"
;
fi
;
\
rm
-f
$(PROJECT)
.pdf
$(PROJECT)
.html docbook-xsl.css
;
\
rm
-rf
$(PROJECT)
.chunked/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment