summarylogtreecommitdiffstats
path: root/tools.patch
blob: 89b17ec6b7829f19595ff4b554c05d848f439dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff -ruN enca-1.19/tools/Makefile.am patched/tools/Makefile.am
--- enca-1.19/tools/Makefile.am	2016-01-04 19:12:05.000000000 +0100
+++ patched/tools/Makefile.am	2020-05-23 19:25:02.733333268 +0200
@@ -30,7 +30,11 @@
 	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
+	@if test "$(EXEEXT)" == ".exe"; then \
+	  sed -f encodings.sed $(srcdir)/encodings.dat | $(target_alias)-wine ./make_hash.exe >encodings.h; \
+	else \
+	  sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h; \
+	fi
 
 # 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'