$NetBSD: patch-tools_Makefile.am,v 1.3 2024/01/26 03:15:50 riastradh Exp $ Fix cross-build. --- tools/Makefile.am.orig 2013-09-30 07:48:22.000000000 +0000 +++ tools/Makefile.am @@ -30,8 +30,13 @@ 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 +tool_make_hash: tool_make_hash.o + $(CC_FOR_BUILD) -o $@ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) tool_make_hash.o +tool_make_hash.o: make_hash.c + $(CC_FOR_BUILD) -o $@ $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c make_hash.c + +encodings.h: encodings.sed $(srcdir)/encodings.dat tool_make_hash + sed -f encodings.sed $(srcdir)/encodings.dat | ./tool_make_hash >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'