Commit 4fc024b7fbbf0db4bfc5c4434715963158ad03c4
1 parent
3b71cf33
Add a target that installs help files.
Showing
1 changed file
with
18 additions
and
0 deletions
src/Makefile.am
| ... | ... | @@ -52,6 +52,24 @@ EXTRA_DIST = $(scripts) |
| 52 | 52 | scriptsdir = $(bindir) |
| 53 | 53 | scripts_DATA = $(scripts) |
| 54 | 54 | |
| 55 | +# Things to install | |
| 56 | +install-data-local: help-install | |
| 57 | + | |
| 58 | +# Install help files | |
| 59 | +help-install: | |
| 60 | + @$(mkinstalldirs) $(DESTDIR)$(datadir)/help && \ | |
| 61 | + for file in $(top_srcdir)/doc/source/reference_manual/c*.rst ; do \ | |
| 62 | + filename="$${file##*/}" ; \ | |
| 63 | + basename="$${filename%%.*}" ; \ | |
| 64 | + helpname="$$basename.txt" ; \ | |
| 65 | + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/help/$$helpname" ; \ | |
| 66 | + $(INSTALL_DATA) "$$file" $(DESTDIR)$(datadir)/help/"$$helpname" ; \ | |
| 67 | + sed -i.bak -e 's/``//g' -e 's/`//g' -e 's/:ref://g' -e 's/:doc://g' \ | |
| 68 | + -e 's/.. note::/Note/g' -e '1d' \ | |
| 69 | + $(DESTDIR)$(datadir)/help/"$$helpname" ; \ | |
| 70 | + rm -rf $(DESTDIR)$(datadir)/help/"$$helpname".bak ; \ | |
| 71 | + done | |
| 72 | + | |
| 55 | 73 | # Add hook rule to make scripts executable |
| 56 | 74 | install-data-hook: |
| 57 | 75 | @list='$(scripts_DATA)';\ | ... | ... |