Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/scripts/build-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ set -x

cd src
./autogen.sh
./configure --disable-check-runtime-deps --enable-build-documentation=html
./configure --disable-check-runtime-deps \
--enable-build-documentation=html \
--enable-build-documentation-translation
make -O -j$((1+$(nproc))) manpages
make -O -j$((1+$(nproc))) translateddocs
make -O -j$((1+$(nproc))) docs
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ position.txt
# Ignore temp files
*.swp
*~
# Ignore checkref leftover output (docs/src/checkref)
.checklink.*.tmp
# Ignore po4a temp files
*.failed.po
*-new_??.po
# Ignore stamp files
*.*-stamp
# Ignore VSCode settings
.vscode/settings.json
# autoreconf cache from debian/configure
/autom4te.cache/
14 changes: 1 addition & 13 deletions debian/configure
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,7 @@ elif [ -f /etc/lsb-release ]; then
fi

if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
DOC_DEPENDS="dblatex (>= 0.2.12),\n dvipng,\n fonts-dejavu,\n graphviz,\n groff,\n inkscape,\n librsvg2-bin,\n python3-lxml,\n source-highlight,\n texlive-extra-utils,\n texlive-font-utils,\n texlive-fonts-recommended,\n texlive-lang-cyrillic,\n texlive-lang-european,\n texlive-lang-french,\n texlive-lang-german,\n texlive-lang-polish,\n texlive-lang-spanish,\n texlive-latex-recommended,\n w3c-linkchecker,\n xsltproc"


case $DISTRIB_NAME in
Debian-9)
;; # No xetex in Debian 9 Stretch
*)
# Not quite sure which packages is needed for xetex, but
# texlive-xetex seem like a safe choice. Need xetex to be
# able to build Chinese PDF.
DOC_DEPENDS="$DOC_DEPENDS,\n texlive-xetex"
;;
esac
DOC_DEPENDS="asciidoctor,\n asciidoctor-pdf | ruby-asciidoctor-pdf,\n fonts-dejavu,\n fonts-noto-cjk,\n ghostscript,\n graphviz,\n librsvg2-bin,\n python3-fonttools,\n ruby-rouge,\n w3c-linkchecker"
else
DOC_DEPENDS=''
fi
Expand Down
6 changes: 2 additions & 4 deletions debian/control.top.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ Build-Depends:
@KERNEL_HEADERS@,
@MODUTILS_DEPENDS@,
@EXTRA_BUILD@,
docbook-xsl <!nodoc>,
asciidoc,
ghostscript <!nodoc>,
groff-base <!nodoc>,
imagemagick <!nodoc>,
asciidoc-dblatex <!nodoc>,
asciidoctor <!nodoc>,
libunicode-linebreak-perl <!nodoc>,
autoconf,
automake,
bwidget (>= 1.7),
Expand Down
14 changes: 10 additions & 4 deletions debian/rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export TIME:=$(shell LANG=C date --date='@$(TIMESTAMP)' '+%T')
kernel_version = @KERNEL_VERSION@
configure_realtime_arg = @CONFIGURE_REALTIME_ARG@
ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@
enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@ \
--enable-build-documentation-translation
endif
SRCDIR = $(CURDIR)/src
DESTDIR=$(CURDIR)/debian/tmp
Expand Down Expand Up @@ -123,9 +124,14 @@ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-en
mv debian/linuxcnc-doc-en/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-en/usr/share/doc/linuxcnc

# Remove files for translations created where we do not want Debian packages.
for l in ar es fr ru uk zh_CN; do \
$(RM) -f debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \
# Remove PDF files for translated locales that have no Debian package.
# The authoritative locale list lives in docs/po4a.cfg's [po4a_langs]
# line; only en and de get their own -doc package, every other locale
# in that list has its PDFs dropped from the tmp staging area.
for l in $$(sed -e's/#.*//' docs/po4a.cfg | grep '^\[po4a_langs\]' | cut -d" " -f2-); do \
if [ "$$l" != "de" ]; then \
$(RM) -f debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \
fi; \
done
$(RM) -f debian/tmp/usr/share/doc/linuxcnc/*_es.adoc
else
Expand Down
9 changes: 2 additions & 7 deletions docs/help/tklinuxcnc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

= TkLinuxCNC

// Custom lang highlight
// must come after the doc title, to work around a bug in asciidoc 8.6.6
:ini: {basebackend@docbook:'':ini}
:hal: {basebackend@docbook:'':hal}
:ngc: {basebackend@docbook:'':ngc}

== Menus

Expand Down Expand Up @@ -157,7 +152,7 @@ To change these settings, use the '@' key for Commanded/Actual, and
the '#' key for Absolute/Relative. The default values can be set in
the INI file, e.g.,

[source,{ini}]
[source,ini]
----
[DISPLAY]
POSITION_OFFSET = RELATIVE
Expand All @@ -166,7 +161,7 @@ POSITION_FEEDBACK = ACTUAL

or

[source,{ini}]
[source,ini]
----
[DISPLAY]
POSITION_OFFSET = ABSOLUTE
Expand Down
1 change: 1 addition & 0 deletions docs/html/gcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
tr.odd td { background: #d9d9d9; }
tr.head td, tr.head th { background: black; color: white; }
--></style>
<link rel="stylesheet" href="lcnc-overrides.css"/>
</head>

<body>
Expand Down
6 changes: 6 additions & 0 deletions docs/html/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ p {
margin-top: 0em;
margin-bottom: 0em;
}
summary {
margin-top: 0.65em;
margin-bottom: 0.15em;
font-family: sans-serif;
cursor: pointer;
}
21 changes: 18 additions & 3 deletions docs/html/linuxcnc.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
:target { background: #DEF !important; }
:target { background: #DEF !important; }
body { margin: 1em 5% 1em 5%; }
tt {font-family: "Courier New", Courier, monospace; font-size: 0.95em;}
pre { font-family: monospace !important; }
h1, h2, h3, h4, h5, h6 { font-family: Arial, Helvetica, sans-serif; }
h1, h2 { background: #c0c0f0; padding-left: 0.5em;}
h3, h4, h5, h6 { background: #DEF; padding-left: 0.5em; }
h2 { padding-top: 0.35em; padding-bottom:0.15em;}
h1, h2, h3, h4, h5 { border-bottom: 2px solid #8080c0; color: black; }

@media (max-width: 768px) {
body { margin: 0.5em 2% 0.5em 2%; }
}
div.nav { float: right; background: #ffffff; }
dt { font-weight: bold; }
dt { font-weight: bold; color: #527bbd; margin-top: 0.5em; }
pre { margin-left: 4ex; auto; color: black; padding: 1ex; }
div.float { text-align: center; margin: 2ex; padding: 1ex; }
div.float span.caption { display: block; margin: 1em; }
Expand All @@ -28,8 +35,16 @@ table.tableblock { border-collapse: collapse; margin-left: auto; margin-right: a
.clist { -moz-column-width: 40ex; -moz-column-gap: 4ex }
.nclist { -moz-column-width: 20ex; -moz-column-gap: 4ex }
.nclist li { list-style-type: none; text-indent: -.5ex; }
#toctitle {
font-family: Arial, Helvetica, sans-serif;
color: #527bbd;
font-size: 1.1em;
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.3em;
}
.toc li { list-style-type: none; }
.toc li a { display: block; border: 1px solid transparent; text-indent: -1ex; }
.toc li a { border: 1px solid transparent; text-indent: -1ex; }

/* AsciiDoc stuff */
div.note {
Expand Down
2 changes: 1 addition & 1 deletion docs/man/images/Images_info.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ ASCII art diagrams can be drawn e.g., with link:https://asciiflow.com/[asciiflow
│ │
──┤is-on off├──
└───────────┘
----
----
6 changes: 2 additions & 4 deletions docs/po4a.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[po4a_paths] po/documentation.pot $lang:po/$lang.po

[po4a_alias:AsciiDoc_def] AsciiDoc opt:"--keep 0 --option 'entry=lang' --option 'tablecells'"
[po4a_alias:man_def] man opt:"--keep 0 -o groff_code=translate -o inline=URL -o untranslated=FF,FU"
[po4a_alias:man_def] man opt:"--keep 0 -o groff_code=translate -o inline=URL,MTO -o untranslated=FF,FU,als -o unknown_macros=untranslated"
[po4a_alias:xhtml_def] xhtml opt:"--keep 0"

# Should stay at 0 percent to make sure the imported python script is
Expand Down Expand Up @@ -128,6 +128,7 @@
[type: AsciiDoc_def] src/hal/general-ref.adoc $lang:src/$lang/hal/general-ref.adoc
[type: AsciiDoc_def] src/hal/hal-examples.adoc $lang:src/$lang/hal/hal-examples.adoc
[type: AsciiDoc_def] src/hal/halmodule.adoc $lang:src/$lang/hal/halmodule.adoc
[type: AsciiDoc_def] src/hal/halscope.adoc $lang:src/$lang/hal/halscope.adoc
[type: AsciiDoc_def] src/hal/halshow.adoc $lang:src/$lang/hal/halshow.adoc
[type: AsciiDoc_def] src/hal/haltcl.adoc $lang:src/$lang/hal/haltcl.adoc
[type: AsciiDoc_def] src/hal/halui-examples.adoc $lang:src/$lang/hal/halui-examples.adoc
Expand Down Expand Up @@ -360,9 +361,6 @@
[type: AsciiDoc_def] src/plasma/plasma-cnc-primer.adoc $lang:src/$lang/plasma/plasma-cnc-primer.adoc
[type: AsciiDoc_def] src/plasma/qtplasmac.adoc $lang:src/$lang/plasma/qtplasmac.adoc
[type: AsciiDoc_def] src/remap/remap.adoc $lang:src/$lang/remap/remap.adoc
[type: AsciiDoc_def] src/source-highlight/hal-demo.adoc $lang:src/$lang/source-highlight/hal-demo.adoc
[type: AsciiDoc_def] src/source-highlight/ini-demo.adoc $lang:src/$lang/source-highlight/ini-demo.adoc
[type: AsciiDoc_def] src/source-highlight/ngc-demo.adoc $lang:src/$lang/source-highlight/ngc-demo.adoc
[type: AsciiDoc_def] src/tooldatabase/tooldatabase.adoc $lang:src/$lang/tooldatabase/tooldatabase.adoc
[type: AsciiDoc_def] src/user/starting-linuxcnc.adoc $lang:src/$lang/user/starting-linuxcnc.adoc
[type: AsciiDoc_def] src/user/user-concepts.adoc $lang:src/$lang/user/user-concepts.adoc
Expand Down
1 change: 1 addition & 0 deletions docs/src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ vi/*
zh_CN/*
index_*.tmpl
man/man1/linuxcnc.1.adoc
rouge-*.css
Loading
Loading