2 # This is the developer's makefile, not the user's makefile.
3 # Don't use it unless you know exactly what you do!
7 AUTOCONF = autoconf-2.67
8 AUTOHEADER = autoheader-2.67
9 AUTOMAKE = automake-1.11
10 ACLOCAL = aclocal-1.11
14 MAN2HTML = groff -mandoc -Thtml
19 all : configures config.h.in \
20 srclib/Makefile.gnulib srclib/Makefile.in \
21 include/iconv.h.build.in \
22 lib/aliases.h lib/aliases_sysaix.h lib/aliases_syshpux.h lib/aliases_sysosf1.h lib/aliases_syssolaris.h \
23 lib/aliases_aix.h lib/aliases_aix_sysaix.h \
24 lib/aliases_osf1.h lib/aliases_osf1_sysosf1.h \
27 lib/flags.h lib/translit.h \
28 man/iconv.1.html man/iconv.3.html man/iconv_close.3.html man/iconv_open.3.html force
29 cd libcharset && $(MAKE) -f Makefile.devel all
30 cd preload && $(MAKE) -f Makefile.devel all
33 # Before making a new release:
34 # - check that the encoding lists in README and man/iconv_open.3 are up to date,
35 # - increment the version number in
40 # libcharset/djgpp/README
41 # libcharset/djgpp/fnchange.lst
42 # - update the version info in lib/Makefile.in,
43 # - do "make -f Makefile.devel".
46 CONFIGURES = configure
47 CONFIGURES_IN = configure.ac
49 aclocal.m4 : $(CONFIGURES_IN) srclib/Makefile.gnulib $(wildcard m4/*.m4) $(wildcard srcm4/*.m4)
50 $(ACLOCAL) -I m4 -I srcm4 --output=$@ && touch $@
52 configures : $(CONFIGURES)
54 AUTOCONF_FILES = aclocal.m4 $(wildcard m4/*.m4) $(wildcard srcm4/*.m4)
56 configure : configure.ac $(AUTOCONF_FILES)
59 check-configures : $(CONFIGURES)
60 set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
62 config.h.in : configure.ac $(AUTOCONF_FILES)
86 srclib/Makefile.gnulib : force
87 if test -n "$$GNULIB_TOOL"; then \
88 $$GNULIB_TOOL --lib=libicrt --source-base=srclib --m4-base=srcm4 --makefile-name=Makefile.gnulib --no-libtool --local-dir=gnulib-local --no-vc-files \
89 --import $(GNULIB_MODULES); \
92 srclib/Makefile.in : srclib/Makefile.am srclib/Makefile.gnulib
93 touch build-aux/compile \
94 && $(AUTOMAKE) --gnits srclib/Makefile \
95 && rm -f build-aux/compile
98 include/iconv.h.build.in : include/iconv.h.in include/export.h
99 sed -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' \
100 -e '/_LIBICONV_VERSION/r include/export.h' \
104 lib/aliases.h lib/canonical.h lib/canonical_local.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
105 $(CC) $(CFLAGS) lib/genaliases.c -o genaliases
106 ./genaliases > lib/aliases.gperf 3> canonical.sh 4> canonical_local.sh
108 $(GPERF) -m 10 lib/aliases.gperf > tmp.h
109 $(CP) tmp.h lib/aliases.h
110 sh canonical.sh > lib/canonical.h
111 sh canonical_local.sh > lib/canonical_local.h
112 $(RM) tmp.h canonical.sh canonical_local.sh
114 lib/aliases_sysaix.h lib/canonical_sysaix.h lib/canonical_local_sysaix.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
115 $(CC) $(CFLAGS) -DUSE_AIX_ALIASES lib/genaliases.c -o genaliases
116 ./genaliases > lib/aliases_sysaix.gperf 3> canonical.sh 4> canonical_local.sh
118 $(GPERF) -m 10 lib/aliases_sysaix.gperf > tmp.h
119 $(CP) tmp.h lib/aliases_sysaix.h
120 sh canonical.sh > lib/canonical_sysaix.h
121 sh canonical_local.sh > lib/canonical_local_sysaix.h
122 $(RM) tmp.h canonical.sh canonical_local.sh
124 lib/aliases_syshpux.h lib/canonical_syshpux.h lib/canonical_local_syshpux.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
125 $(CC) $(CFLAGS) -DUSE_HPUX_ALIASES lib/genaliases.c -o genaliases
126 ./genaliases > lib/aliases_syshpux.gperf 3> canonical.sh 4> canonical_local.sh
128 $(GPERF) -m 10 lib/aliases_syshpux.gperf > tmp.h
129 $(CP) tmp.h lib/aliases_syshpux.h
130 sh canonical.sh > lib/canonical_syshpux.h
131 sh canonical_local.sh > lib/canonical_local_syshpux.h
132 $(RM) tmp.h canonical.sh canonical_local.sh
134 lib/aliases_sysosf1.h lib/canonical_sysosf1.h lib/canonical_local_sysosf1.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
135 $(CC) $(CFLAGS) -DUSE_OSF1_ALIASES lib/genaliases.c -o genaliases
136 ./genaliases > lib/aliases_sysosf1.gperf 3> canonical.sh 4> canonical_local.sh
138 $(GPERF) -m 10 lib/aliases_sysosf1.gperf > tmp.h
139 $(CP) tmp.h lib/aliases_sysosf1.h
140 sh canonical.sh > lib/canonical_sysosf1.h
141 sh canonical_local.sh > lib/canonical_local_sysosf1.h
142 $(RM) tmp.h canonical.sh canonical_local.sh
144 lib/aliases_syssolaris.h lib/canonical_syssolaris.h lib/canonical_local_syssolaris.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
145 $(CC) $(CFLAGS) -DUSE_SOLARIS_ALIASES lib/genaliases.c -o genaliases
146 ./genaliases > lib/aliases_syssolaris.gperf 3> canonical.sh 4> canonical_local.sh
148 $(GPERF) -m 10 lib/aliases_syssolaris.gperf > tmp.h
149 $(CP) tmp.h lib/aliases_syssolaris.h
150 sh canonical.sh > lib/canonical_syssolaris.h
151 sh canonical_local.sh > lib/canonical_local_syssolaris.h
152 $(RM) tmp.h canonical.sh canonical_local.sh
154 lib/aliases_aix.h lib/canonical_aix.h : lib/encodings_aix.def lib/genaliases2.c
155 $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
156 ./genaliases aix > lib/aliases_aix.h 3> lib/canonical_aix.h
159 lib/aliases_aix_sysaix.h lib/canonical_aix_sysaix.h : lib/encodings_aix.def lib/genaliases2.c
160 $(CC) $(CFLAGS) -DUSE_AIX -DUSE_AIX_ALIASES lib/genaliases2.c -o genaliases
161 ./genaliases aix > lib/aliases_aix_sysaix.h 3> lib/canonical_aix_sysaix.h
164 lib/aliases_osf1.h lib/canonical_osf1.h : lib/encodings_osf1.def lib/genaliases2.c
165 $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
166 ./genaliases osf1 > lib/aliases_osf1.h 3> lib/canonical_osf1.h
169 lib/aliases_osf1_sysosf1.h lib/canonical_osf1_sysosf1.h : lib/encodings_osf1.def lib/genaliases2.c
170 $(CC) $(CFLAGS) -DUSE_OSF1 -DUSE_OSF1_ALIASES lib/genaliases2.c -o genaliases
171 ./genaliases osf1 > lib/aliases_osf1_sysosf1.h 3> lib/canonical_osf1_sysosf1.h
174 lib/aliases_dos.h lib/canonical_dos.h : lib/encodings_dos.def lib/genaliases2.c
175 $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
176 ./genaliases dos > lib/aliases_dos.h 3> lib/canonical_dos.h
179 lib/aliases_extra.h lib/canonical_extra.h : lib/encodings_extra.def lib/genaliases2.c
180 $(CC) $(CFLAGS) -DUSE_EXTRA lib/genaliases2.c -o genaliases
181 ./genaliases extra > lib/aliases_extra.h 3> lib/canonical_extra.h
185 lib/flags.h : lib/encodings.def lib/encodings_aix.def lib/encodings_osf1.def lib/encodings_dos.def lib/encodings_extra.def lib/converters.h lib/genflags.c
186 $(CC) $(CFLAGS) lib/genflags.c -o genflags
187 ./genflags > lib/flags.h
191 lib/translit.h : lib/translit.def lib/gentranslit.c
192 $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
193 ulimit -s unlimited; ./gentranslit < lib/translit.def > lib/translit.h