From 8290027e067ffd0a3f37eeafbd27121e2884cea4 Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Sat, 22 Jan 2011 09:27:09 -0500 Subject: mkfontdir: config: substitute bindir in mkfontdir using Autoconf @bindir@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Gaetan Nadon --- Makefile.am | 11 +++++------ configure.ac | 3 --- mkfontdir.cpp | 3 --- mkfontdir.in | 3 +++ 4 files changed, 8 insertions(+), 12 deletions(-) delete mode 100755 mkfontdir.cpp create mode 100755 mkfontdir.in diff --git a/Makefile.am b/Makefile.am index 40f6fd5..170b7ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,13 +23,12 @@ SUBDIRS = man bin_PROGRAMS = mkfontscale bin_SCRIPTS = mkfontdir -.cpp: - $(AM_V_GEN)$(SED) s,BINDIR,`echo @bindir@/mkfontscale | $(SED) s,/[^/]*$$,,`, < $< | $(SED) s/XCOMM/\#/ > $@ - -SUFFIXES = .cpp - -EXTRA_DIST = mkfontdir.cpp CLEANFILES = $(bin_SCRIPTS) +EXTRA_DIST = $(bin_SCRIPTS:=.in) +DIR_SUBSTS = -e 's|@bindir[@]|$(bindir)|g' + +mkfontdir: mkfontdir.in + $(AM_V_GEN)$(SED) $(DIR_SUBSTS) < $< > $@ AM_CPPFLAGS = @MKFONTSCALE_CFLAGS@ @X11_CFLAGS@ -D_BSD_SOURCE AM_CFLAGS = $(CWARNFLAGS) diff --git a/configure.ac b/configure.ac index 50d4822..ee427ed 100644 --- a/configure.ac +++ b/configure.ac @@ -61,9 +61,6 @@ PKG_CHECK_MODULES(X11, [xproto >= 7.0.25]) dnl Allow checking code with lint, sparse, etc. XORG_WITH_LINT -dnl From mkfontdir/configure.ac -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 "$@" -- cgit v1.2.3