diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2011-01-22 09:27:09 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2011-01-24 10:42:27 -0500 |
commit | 7f9922eac028518fa9f06aaf06c1bd6779b1e4c7 (patch) | |
tree | 381580cc345e11a04744b156aad875ffbd1f0ccf | |
parent | b9ccbf0de88e95aad25e368500a7eab217f6d434 (diff) |
config: substitute bindir in mkfontdir using Autoconf @bindir@
Use the Autoconf recommended way of substituting bindir, see
http://www.gnu.org/software/autoconf/manual/autoconf.html
Use # sign for comment in script.
Only sed is used, drop the cpp terminology.
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rwxr-xr-x | mkfontdir.cpp | 3 | ||||
-rwxr-xr-x | mkfontdir.in | 3 |
4 files changed, 9 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am index b7610ec..a98f2c8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,14 +20,14 @@ # PERFORMANCE OF THIS SOFTWARE. SUBDIRS = man -bin_SCRIPTS = mkfontdir - -.cpp: - $(AM_V_GEN)$(SED) s,BINDIR,`echo @bindir@/mkfontscale | $(SED) s,/[^/]*$$,,`, < $< | $(SED) s/XCOMM/\#/ > $@ -EXTRA_DIST = mkfontdir.cpp +bin_SCRIPTS = mkfontdir CLEANFILES = $(bin_SCRIPTS) -SUFFIXES = .cpp +EXTRA_DIST = $(bin_SCRIPTS:=.in) +DIR_SUBSTS = -e 's|@bindir[@]|$(bindir)|g' + +mkfontdir: mkfontdir.in + $(AM_V_GEN)$(SED) $(DIR_SUBSTS) < $< > $@ MAINTAINERCLEANFILES = ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index 3090eab..a5a26c1 100644 --- a/configure.ac +++ b/configure.ac @@ -36,8 +36,6 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -AC_SUBST([bindir]) - AC_CONFIG_FILES([ Makefile man/Makefile]) diff --git a/mkfontdir.cpp b/mkfontdir.cpp deleted file mode 100755 index 98d8ffa..0000000 --- a/mkfontdir.cpp +++ /dev/null @@ -1,3 +0,0 @@ -XCOMM!/bin/sh - -exec BINDIR/mkfontscale -b -s -l "$@" diff --git a/mkfontdir.in b/mkfontdir.in new file mode 100755 index 0000000..dfb512b --- /dev/null +++ b/mkfontdir.in @@ -0,0 +1,3 @@ +#!/bin/sh + +exec @bindir@/mkfontscale -b -s -l "$@" |