Skip to content

Commit 652e88c

Browse files
authored
Merge pull request #1718 from LinuxCNC/2.8-pdf-index
make a pretty index.html for the PDF docs
2 parents 7b6e6f1 + 14477fe commit 652e88c

4 files changed

Lines changed: 36 additions & 2 deletions

File tree

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# generated when building pdf docs
2+
index.html

docs/src/Submakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,10 @@ ifeq ($(BUILD_DOCS_HTML),yes)
434434
docs: htmldocs
435435
install-doc: install-doc-html
436436
endif
437+
437438
pdfdocs: $(PDF_TARGETS)
439+
../scripts/make-docs-pdf-index
440+
438441
htmldocs: .htmldoc-stamp checkref
439442

440443
.htmldoc-stamp: copy_asciidoc_files $(HTML_TARGETS) .html-images-stamp

scripts/make-docs-pdf-index

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
#
3+
# Make a pretty(?) index page of the PDF docs.
4+
#
5+
6+
set -e
7+
8+
# Assume we're running in src/, we can't call `git rev-parse
9+
# --show-toplevel` because when building from dsc we don't have a
10+
# git repo.
11+
TOPLEVEL=${PWD}/..
12+
cd ${TOPLEVEL}/docs
13+
14+
TITLE="LinuxCNC PDF docs ($(cat ${TOPLEVEL}/VERSION))"
15+
16+
rm -f index.html
17+
18+
echo "<html>" >> index.html
19+
echo "<head><title>${TITLE}</title></head>" >> index.html
20+
echo "<body><h1>${TITLE}</h1><p>" >> index.html
21+
22+
for F in $(ls -1 *.pdf | sort); do
23+
echo " <a href=\"${F}\">$F</a><br>" >> index.html
24+
done
25+
26+
echo "</body>" >> index.html
27+
echo "</html>" >> index.html

src/configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,8 @@ then
14441444
AC_MSG_RESULT([found])
14451445
else
14461446
AC_MSG_RESULT(no)
1447-
AC_MSG_ERROR([Python pango and cairo modules not found!\ninstall with "sudo apt-get install python3-gi"])
1447+
AC_MSG_WARN([Python pango and cairo modules not found!])
1448+
AC_MSG_ERROR([install with "sudo apt-get install python3-gi"])
14481449
fi
14491450

14501451
else
@@ -1453,7 +1454,8 @@ else
14531454
AC_MSG_RESULT([found])
14541455
else
14551456
AC_MSG_RESULT(no)
1456-
AC_MSG_ERROR([Python pango and cairo modules not found!\ninstall with "sudo apt-get install python-gtk2"])
1457+
AC_MSG_WARN([Python pango and cairo modules not found!])
1458+
AC_MSG_ERROR([install with "sudo apt-get install python-gtk2"])
14571459
fi
14581460
fi
14591461
fi

0 commit comments

Comments
 (0)