37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
$NetBSD: patch-tools_Makefile.am,v 1.1 2013/05/10 05:27:39 riastradh Exp $
|
|
|
|
Use CC_FOR_BUILD to compile make_hash.
|
|
|
|
--- tools/Makefile.am.orig 2009-08-25 08:33:34.000000000 +0000
|
|
+++ tools/Makefile.am
|
|
@@ -3,7 +3,9 @@ noinst_PROGRAMS = make_hash
|
|
noinst_HEADERS = encodings.h
|
|
noinst_SCRIPTS = expand_table.pl
|
|
|
|
-make_hash_SOURCES = make_hash.c
|
|
+CLEANFILES = make_hash$(EXEEXT)
|
|
+make_hash$(EXEEXT): make_hash.c
|
|
+ $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/make_hash.c
|
|
|
|
BUILT_SOURCES = $(noinst_HEADERS)
|
|
|
|
@@ -23,15 +25,15 @@ TABLE_SRC = \
|
|
TEX_SKIP.t \
|
|
encodings.dat
|
|
|
|
-EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null
|
|
+EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null make_hash.c
|
|
|
|
all: encodings.h
|
|
|
|
encodings.sed: $(top_builddir)/iconvenc.h
|
|
sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' -e 's/"//g' -e 's/NULL$$//' -e 's/ /\//' -e 's/^\(.*\)$$/s\/\1\//' $(top_builddir)/iconvenc.h >encodings.sed
|
|
|
|
-encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash
|
|
- sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h
|
|
+encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash$(EXEEXT)
|
|
+ sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash$(EXEEXT) >encodings.h
|
|
|
|
# Normally there's no need to regenerate tables, they are copy-and-pasted
|
|
# into the C source manually, but the rules are here. Run `make tables'
|