aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am58
1 files changed, 23 insertions, 35 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8ac9fad..9c83eee 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -7,21 +7,20 @@ include $(top_srcdir)/bootstrap.am
# code.
# It generates Troff manpage markup and acts as a Troff
# preprocessor to manpage templates.
-dist_bin_SCRIPTS = tedoc.tes
-
-# Name of tedoc.tes after installation, taking --program-prefix
-# into account.
-TEDOC_INSTALLED = \
- $(bindir)/`echo tedoc.tes | @SED@ '$(transform)'`
+bin_SCRIPTS = tedoc.tes
+CLEANFILES = tedoc.tes
+dist_noinst_SCRIPTS = tedoc.tes.in
%.in : %.template tedoc.tes @top_srcdir@/src/*.c
- $(SCITECO_FULL) -m -- @srcdir@/tedoc.tes \
+ $(SCITECO_FULL) -m -- tedoc.tes \
-C $@ $< @top_srcdir@/src/*.c
# grosciteco is a troff postprocessor similar to grotty
# which can be used to produce SciTECO-friendly output
# (woman pages).
-dist_bin_SCRIPTS += grosciteco.tes
+bin_SCRIPTS += grosciteco.tes
+CLEANFILES += grosciteco.tes
+dist_noinst_SCRIPTS += grosciteco.tes.in
# grosciteco, like many other postprocessors, works
# best with its own macro package.
# Unfortunately, there is no way to query the built-in
@@ -32,34 +31,23 @@ dist_bin_SCRIPTS += grosciteco.tes
# the directory via `groff -M`.
dist_scitecodata_DATA = sciteco.tmac
-# Name of grosciteco.tes after installation, taking --program-prefix
-# into account.
-GROSCITECO_INSTALLED = \
- $(bindir)/`echo grosciteco.tes | @SED@ '$(transform)'`
-
-# Fix up the hash-bang line of installed SciTECO scripts upon
-# installation to refer to the installed sciteco binary.
-# This takes --program-prefix into account.
-# This wouldn't work on Windows since SciTECO cannot open
-# the /mingw64 paths.
-#
-# FIXME: This will patch the hash-bang line repeatedly.
-# Perhaps it would be better to do that using a preprocessing
-# step before installation - see the known problems that this
-# is causing on FreeBSD/Poudriere.
-if !WIN32
-install-exec-hook:
- $(SCITECO_FULL) -e "<%i^[ :Q[^A^E\\i]:; @EB'^EN[^A^E\\i]' \
- 0,^Q::@FR'#!^EM^Xsciteco'#!$(SCITECO_INSTALLED)'> \
- :EX" \
- $(DESTDIR)$(GROSCITECO_INSTALLED) \
- $(DESTDIR)$(TEDOC_INSTALLED)
-endif
+# Fix up the hash-bang line of installed SciTECO scripts.
+# This takes --prefix and --program-prefix into account.
+# On the other hand, since this is run at build time,
+# it breaks bindir-overwriting at `make install` time,
+# which could only be made to work with an install-exec-hook.
+# Patching installed scripts however broke the FreeBSD port
+# builds with Poudriere where BINMODE=555 is set.
+# It was therefore decided to sacrifice the rarely used
+# `make install bindir=...` and appease the FreeBSD port
+# committers instead.
+%.tes : %.tes.in
+ $(SCITECO_FULL) -qioe "0,^Q::@FR'#\!^EM^Xsciteco'#\!$(SCITECO_INSTALLED)'" <$< >$@
womendir = $(scitecolibdir)/women
women_DATA = grosciteco.tes.1.woman grosciteco.tes.1.woman.tec
-CLEANFILES = grosciteco.tes.1
+CLEANFILES += grosciteco.tes.1
EXTRA_DIST = grosciteco.tes.1.in
women_DATA += tedoc.tes.1.woman tedoc.tes.1.woman.tec
@@ -86,15 +74,15 @@ CLEANFILES += $(women_DATA)
%.woman : % sciteco.tmac grosciteco.tes
@GROFF@ @GROFF_FLAGS@ -wall -Z -Tutf8 -t -man -M@srcdir@ -msciteco $< | \
- $(SCITECO_FULL) -im -- @srcdir@/grosciteco.tes $@
+ $(SCITECO_FULL) -im -- grosciteco.tes $@
tutorial.woman : tutorial.ms sciteco.tmac grosciteco.tes
@GROFF@ @GROFF_FLAGS@ -wall -Z -Tutf8 -t -ms -M@srcdir@ -msciteco $< | \
- $(SCITECO_FULL) -im -- @srcdir@/grosciteco.tes $@
+ $(SCITECO_FULL) -im -- grosciteco.tes $@
man_MANS = grosciteco.tes.1 tedoc.tes.1 sciteco.1 sciteco.7
-dist_noinst_SCRIPTS = htbl.tes
+dist_noinst_SCRIPTS += htbl.tes
if BUILD_HTMLDOCS
html_DATA = grosciteco.tes.1.html tedoc.tes.1.html \