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.68
8 AUTOHEADER = autoheader-2.68
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)
87 srclib/Makefile.gnulib : force
88 if test -n "$$GNULIB_TOOL"; then \
89 $$GNULIB_TOOL --lib=libicrt --source-base=srclib --m4-base=srcm4 --makefile-name=Makefile.gnulib --no-libtool --local-dir=gnulib-local --no-vc-files \
90 --import $(GNULIB_MODULES); \
93 srclib/Makefile.in : srclib/Makefile.am srclib/Makefile.gnulib
94 touch build-aux/compile \
95 && $(AUTOMAKE) --gnits srclib/Makefile \
96 && rm -f build-aux/compile
99 include/iconv.h.build.in : include/iconv.h.in include/export.h
100 sed -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' \
101 -e '/_LIBICONV_VERSION/r include/export.h' \
105 lib/aliases.h lib/canonical.h lib/canonical_local.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
106 $(CC) $(CFLAGS) lib/genaliases.c -o genaliases
107 ./genaliases > lib/aliases.gperf 3> canonical.sh 4> canonical_local.sh
109 $(GPERF) -m 10 lib/aliases.gperf > tmp.h
110 $(CP) tmp.h lib/aliases.h
111 sh canonical.sh > lib/canonical.h
112 sh canonical_local.sh > lib/canonical_local.h
113 $(RM) tmp.h canonical.sh canonical_local.sh
115 lib/aliases_sysaix.h lib/canonical_sysaix.h lib/canonical_local_sysaix.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
116 $(CC) $(CFLAGS) -DUSE_AIX_ALIASES lib/genaliases.c -o genaliases
117 ./genaliases > lib/aliases_sysaix.gperf 3> canonical.sh 4> canonical_local.sh
119 $(GPERF) -m 10 lib/aliases_sysaix.gperf > tmp.h
120 $(CP) tmp.h lib/aliases_sysaix.h
121 sh canonical.sh > lib/canonical_sysaix.h
122 sh canonical_local.sh > lib/canonical_local_sysaix.h
123 $(RM) tmp.h canonical.sh canonical_local.sh
125 lib/aliases_syshpux.h lib/canonical_syshpux.h lib/canonical_local_syshpux.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
126 $(CC) $(CFLAGS) -DUSE_HPUX_ALIASES lib/genaliases.c -o genaliases
127 ./genaliases > lib/aliases_syshpux.gperf 3> canonical.sh 4> canonical_local.sh
129 $(GPERF) -m 10 lib/aliases_syshpux.gperf > tmp.h
130 $(CP) tmp.h lib/aliases_syshpux.h
131 sh canonical.sh > lib/canonical_syshpux.h
132 sh canonical_local.sh > lib/canonical_local_syshpux.h
133 $(RM) tmp.h canonical.sh canonical_local.sh
135 lib/aliases_sysosf1.h lib/canonical_sysosf1.h lib/canonical_local_sysosf1.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
136 $(CC) $(CFLAGS) -DUSE_OSF1_ALIASES lib/genaliases.c -o genaliases
137 ./genaliases > lib/aliases_sysosf1.gperf 3> canonical.sh 4> canonical_local.sh
139 $(GPERF) -m 10 lib/aliases_sysosf1.gperf > tmp.h
140 $(CP) tmp.h lib/aliases_sysosf1.h
141 sh canonical.sh > lib/canonical_sysosf1.h
142 sh canonical_local.sh > lib/canonical_local_sysosf1.h
143 $(RM) tmp.h canonical.sh canonical_local.sh
145 lib/aliases_syssolaris.h lib/canonical_syssolaris.h lib/canonical_local_syssolaris.h : lib/encodings.def lib/encodings_local.def lib/genaliases.c
146 $(CC) $(CFLAGS) -DUSE_SOLARIS_ALIASES lib/genaliases.c -o genaliases
147 ./genaliases > lib/aliases_syssolaris.gperf 3> canonical.sh 4> canonical_local.sh
149 $(GPERF) -m 10 lib/aliases_syssolaris.gperf > tmp.h
150 $(CP) tmp.h lib/aliases_syssolaris.h
151 sh canonical.sh > lib/canonical_syssolaris.h
152 sh canonical_local.sh > lib/canonical_local_syssolaris.h
153 $(RM) tmp.h canonical.sh canonical_local.sh
155 lib/aliases_aix.h lib/canonical_aix.h : lib/encodings_aix.def lib/genaliases2.c
156 $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
157 ./genaliases aix > lib/aliases_aix.h 3> lib/canonical_aix.h
160 lib/aliases_aix_sysaix.h lib/canonical_aix_sysaix.h : lib/encodings_aix.def lib/genaliases2.c
161 $(CC) $(CFLAGS) -DUSE_AIX -DUSE_AIX_ALIASES lib/genaliases2.c -o genaliases
162 ./genaliases aix > lib/aliases_aix_sysaix.h 3> lib/canonical_aix_sysaix.h
165 lib/aliases_osf1.h lib/canonical_osf1.h : lib/encodings_osf1.def lib/genaliases2.c
166 $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
167 ./genaliases osf1 > lib/aliases_osf1.h 3> lib/canonical_osf1.h
170 lib/aliases_osf1_sysosf1.h lib/canonical_osf1_sysosf1.h : lib/encodings_osf1.def lib/genaliases2.c
171 $(CC) $(CFLAGS) -DUSE_OSF1 -DUSE_OSF1_ALIASES lib/genaliases2.c -o genaliases
172 ./genaliases osf1 > lib/aliases_osf1_sysosf1.h 3> lib/canonical_osf1_sysosf1.h
175 lib/aliases_dos.h lib/canonical_dos.h : lib/encodings_dos.def lib/genaliases2.c
176 $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
177 ./genaliases dos > lib/aliases_dos.h 3> lib/canonical_dos.h
180 lib/aliases_extra.h lib/canonical_extra.h : lib/encodings_extra.def lib/genaliases2.c
181 $(CC) $(CFLAGS) -DUSE_EXTRA lib/genaliases2.c -o genaliases
182 ./genaliases extra > lib/aliases_extra.h 3> lib/canonical_extra.h
186 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
187 $(CC) $(CFLAGS) lib/genflags.c -o genflags
188 ./genflags > lib/flags.h
192 lib/translit.h : lib/translit.def lib/gentranslit.c
193 $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
194 ulimit -s unlimited; ./gentranslit < lib/translit.def > lib/translit.h