2 # This is the developer's makefile, not the user's makefile.
3 # Don't use it unless you know exactly what you do!
10 MAN2HTML = groff -mandoc -Thtml
15 all : configures lib/config.h.msvc include/iconv.h.msvc-static include/iconv.h.msvc-shared lib/aliases.h lib/aliases_aix.h lib/aliases_osf1.h lib/aliases_dos.h lib/flags.h lib/translit.h man/iconv.1.html man/iconv.3.html man/iconv_close.3.html man/iconv_open.3.html force
16 cd libcharset && $(MAKE) -f Makefile.devel all
19 # Before making a new release:
20 # - check that the encoding lists in README and man/iconv_open.3 are up to date,
21 # - increment the version number in
27 # libcharset/djgpp/README
28 # libcharset/djgpp/fnchange.lst
29 # - update the version info in lib/Makefile.in,
30 # - do "make -f Makefile.devel".
33 CONFIGURES = configure
34 CONFIGURES_IN = configure.in
37 ACLOCAL = $(CLISP_DIR)/src/autoconf/aclocal.m4
38 ACSELECT = $(CLISP_DIR)/src/autoconf/acselect
39 OTHERMACROS = libcharset/m4/libtool.m4 autoconf/eilseq.m4 autoconf/mbstate_t.m4
41 autoconf/aclocal.m4 : $(ACLOCAL)
42 ($(ACSELECT) `cat $(CONFIGURES_IN) | grep '^[A-Z][A-Z]_' | sed 's,[^A-Z_].*$$,,g' | sort | uniq` < $(ACLOCAL) ; cat $(OTHERMACROS) | sed -e 's,AC_CANONICAL_HOST,CL_CANONICAL_HOST,g' -e 's,AC_PROG_RANLIB,CL_PROG_RANLIB,g' -e 's,AC_PROG_LN_S,CL_PROG_LN_S,g') > autoconf/aclocal.m4
44 configures : $(CONFIGURES)
46 AUTOCONF_FILES = autoconf/aclocal.m4 autoconf/autoconf.m4f
48 configure : configure.in $(AUTOCONF_FILES)
49 autoconf/autoconf -A autoconf -l autoconf
51 check-configures : $(CONFIGURES)
52 set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
55 lib/config.h.msvc : lib/config.h.in
56 sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < $< > $@
58 include/iconv.h.msvc-static : include/iconv.h.in
59 sed -e 's/@ICONV_CONST@/const/g' < $< > $@
61 include/iconv.h.msvc-shared : include/iconv.h.in windows/dllexport.h
62 sed -e 's/@ICONV_CONST@/const/g' -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' -e '/_LIBICONV_VERSION/r windows/dllexport.h' < $< > $@
65 # We use "-7" to make a smaller table, but use "unsigned char" array indices
66 # to avoid gcc warning.
67 lib/aliases.h : lib/aliases.gperf
68 $(GPERF) -t -L ANSI-C -H aliases_hash -N aliases_lookup -7 -C -k '1,3-11,$$' -i 1 lib/aliases.gperf | sed -e 's/\[str/\[(unsigned char) str/' > tmp.h
69 $(CP) tmp.h lib/aliases.h
72 lib/aliases.gperf : lib/encodings.def lib/encodings_local.def lib/genaliases.c
73 $(CC) $(CFLAGS) lib/genaliases.c -o genaliases
74 ./genaliases > lib/aliases.gperf
77 lib/aliases_aix.h : lib/encodings_aix.def lib/genaliases2.c
78 $(CC) $(CFLAGS) -DUSE_AIX lib/genaliases2.c -o genaliases
79 ./genaliases > lib/aliases_aix.h
82 lib/aliases_osf1.h : lib/encodings_osf1.def lib/genaliases2.c
83 $(CC) $(CFLAGS) -DUSE_OSF1 lib/genaliases2.c -o genaliases
84 ./genaliases > lib/aliases_osf1.h
87 lib/aliases_dos.h : lib/encodings_dos.def lib/genaliases2.c
88 $(CC) $(CFLAGS) -DUSE_DOS lib/genaliases2.c -o genaliases
89 ./genaliases > lib/aliases_dos.h
93 lib/flags.h : lib/encodings.def lib/encodings_aix.def lib/encodings_osf1.def lib/encodings_dos.def lib/converters.h lib/genflags.c
94 $(CC) $(CFLAGS) lib/genflags.c -o genflags
95 ./genflags > lib/flags.h
99 lib/translit.h : lib/translit.def lib/gentranslit.c
100 $(CC) $(CFLAGS) lib/gentranslit.c -o gentranslit
101 ./gentranslit < lib/translit.def > lib/translit.h