2013-12-20 21:48:46 +00:00
|
|
|
#
|
|
|
|
# in order for "normal" developers not to have to install asciidoc (which
|
|
|
|
# brings in a couple hundred MB of dependencies) we now include both the
|
|
|
|
# user-manual.txt and a copy of the generated .html file in git
|
|
|
|
#
|
|
|
|
# in order to avoid unnecessary thrash with minor version differences, when
|
|
|
|
# submitting patches to the user manual, only submit the changes to the .txt
|
|
|
|
# file - the maintainer will recreate the .html.git file
|
|
|
|
|
2020-05-06 01:25:57 +00:00
|
|
|
DOCNAMES = user-manual user-manual_es user-manual_fr user-manual_ru user-manual_nl mobile-manual-v2 mobile-manual-v3
|
2014-06-06 17:54:51 +00:00
|
|
|
|
|
|
|
HTMLDOCS = $(patsubst %,$(OUT)%.html,$(DOCNAMES))
|
|
|
|
TEXTDOCS = $(patsubst %,$(OUT)%.text,$(DOCNAMES))
|
|
|
|
PDFDOCS = $(patsubst %,$(OUT)%.pdf,$(DOCNAMES))
|
|
|
|
|
2020-05-06 01:47:44 +00:00
|
|
|
ASCIIDOC = asciidoc
|
2013-02-19 13:56:26 +00:00
|
|
|
A2X = a2x
|
|
|
|
BROWSER = firefox
|
2013-12-09 20:04:41 +00:00
|
|
|
THEME = compact_subsurface
|
2013-12-08 06:14:16 +00:00
|
|
|
PWD = $(realpath .)
|
First try at converting user-manual to AsciiDoc
You can do "make doc" in the main directory to create the html version,
and if you want to play around with it, do "make show" in the
Documentation subdirectory to start firefox on the end result.
It's by no means perfect, but it gives somewhat reasonable results, and
this is enough initial work for people to play around with, I think.
NOTE! You need "asciidoc" installed to do this: it's a python program,
so it should be pretty easy even on non-Linux platforms. And on Linux,
most distributions package it, so you just have to do something like
yum install asciidoc
to get it (replace with apt-get/zypper/whatever).
Asciidoc can generate other output too (man-pages, LaTeX, etc), maybe
people want to play with that part too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-01 23:12:28 +00:00
|
|
|
|
2014-06-06 17:54:51 +00:00
|
|
|
all: $(HTMLEDOCS) $(TEXTDOCS) $(PDFDOCS)
|
First try at converting user-manual to AsciiDoc
You can do "make doc" in the main directory to create the html version,
and if you want to play around with it, do "make show" in the
Documentation subdirectory to start firefox on the end result.
It's by no means perfect, but it gives somewhat reasonable results, and
this is enough initial work for people to play around with, I think.
NOTE! You need "asciidoc" installed to do this: it's a python program,
so it should be pretty easy even on non-Linux platforms. And on Linux,
most distributions package it, so you just have to do something like
yum install asciidoc
to get it (replace with apt-get/zypper/whatever).
Asciidoc can generate other output too (man-pages, LaTeX, etc), maybe
people want to play with that part too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-01 23:12:28 +00:00
|
|
|
|
2014-06-06 17:54:51 +00:00
|
|
|
doc: $(HTMLDOCS)
|
2013-02-19 21:46:49 +00:00
|
|
|
|
2014-06-06 17:54:51 +00:00
|
|
|
$(OUT)%.text: %.txt
|
2013-02-19 14:04:57 +00:00
|
|
|
$(A2X) -f text $<
|
First try at converting user-manual to AsciiDoc
You can do "make doc" in the main directory to create the html version,
and if you want to play around with it, do "make show" in the
Documentation subdirectory to start firefox on the end result.
It's by no means perfect, but it gives somewhat reasonable results, and
this is enough initial work for people to play around with, I think.
NOTE! You need "asciidoc" installed to do this: it's a python program,
so it should be pretty easy even on non-Linux platforms. And on Linux,
most distributions package it, so you just have to do something like
yum install asciidoc
to get it (replace with apt-get/zypper/whatever).
Asciidoc can generate other output too (man-pages, LaTeX, etc), maybe
people want to play with that part too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-01 23:12:28 +00:00
|
|
|
|
2014-06-06 17:54:51 +00:00
|
|
|
$(OUT)%.pdf: %.txt
|
2014-08-05 16:02:46 +00:00
|
|
|
-$(A2X) --dblatex-opts "-P latex.output.revhistory=0" -f pdf $<
|
2013-02-19 13:56:26 +00:00
|
|
|
|
2014-06-06 17:54:51 +00:00
|
|
|
$(OUT)%.html: %.txt
|
2013-12-20 21:48:46 +00:00
|
|
|
@echo "if asciidoc isn't found the html file included in the sources is copied"
|
2015-10-27 22:43:30 +00:00
|
|
|
$(ASCIIDOC) -a toc -a toclevels=3 -a themedir=$(PWD) -a theme=$(THEME) -o $@ $< || \
|
|
|
|
cp $(<:%.txt=%.html.git) $@
|
2013-02-18 21:09:57 +00:00
|
|
|
|
|
|
|
# Alternatively::
|
2013-10-07 00:52:34 +00:00
|
|
|
$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
|
2014-05-25 17:16:43 +00:00
|
|
|
$(A2X) --icons -f xhtml $<
|
2013-02-18 21:09:57 +00:00
|
|
|
|
2013-02-19 14:04:57 +00:00
|
|
|
show: $(HTMLDOC)
|
|
|
|
$(BROWSER) $<
|
2013-02-18 21:09:57 +00:00
|
|
|
|
|
|
|
clean:
|
2014-12-13 11:37:08 +00:00
|
|
|
rm -f *~ *.xml docbook-xsl.css $(HTMLDOCS) $(TEXTDOCS) $(PDFDOCS)
|