Add -lm dependency for gettextlib to fix LTO build
[platform/upstream/gettext.git] / Makefile.am
1 ## Makefile for the toplevel directory of GNU gettext
2 ## Copyright (C) 1995-2015 Free Software Foundation, Inc.
3 ##
4 ## This program is free software: you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 3 of the License, or
7 ## (at your option) any later version.
8 ##
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
13 ##
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 ## Process this file with automake to produce Makefile.in.
18
19 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
20 ACLOCAL_AMFLAGS = -I m4
21
22 SUBDIRS = gnulib-local gettext-runtime gettext-tools
23
24 changelog_etc = \
25   gettext-runtime/ChangeLog.0 \
26   gettext-runtime/doc/ChangeLog.0 \
27   gettext-runtime/intl-csharp/ChangeLog.0 \
28   gettext-runtime/intl-java/ChangeLog.0 \
29   gettext-runtime/libasprintf/ChangeLog.0 \
30   gettext-runtime/m4/ChangeLog.0 \
31   gettext-runtime/man/ChangeLog.0 \
32   gettext-runtime/src/ChangeLog.0 \
33   gettext-runtime/tests/ChangeLog.0 \
34   gettext-tools/ChangeLog.0 \
35   gettext-tools/doc/ChangeLog.0 \
36   gettext-tools/doc/ChangeLog.1 \
37   gettext-tools/examples/ChangeLog.0 \
38   gettext-tools/gnulib-tests/ChangeLog.0 \
39   gettext-tools/libgettextpo/ChangeLog.0 \
40   gettext-tools/libgrep/ChangeLog.0 \
41   gettext-tools/m4/ChangeLog.0 \
42   gettext-tools/man/ChangeLog.0 \
43   gettext-tools/man/ChangeLog.1 \
44   gettext-tools/misc/ChangeLog.0 \
45   gettext-tools/projects/ChangeLog.0 \
46   gettext-tools/src/ChangeLog.0 \
47   gettext-tools/src/ChangeLog.1 \
48   gettext-tools/styles/ChangeLog.0 \
49   gettext-tools/tests/ChangeLog.0 \
50   gettext-tools/tests/ChangeLog.1 \
51   gnulib-local/ChangeLog.0
52
53 EXTRA_DIST = \
54   $(changelog_etc) DEPENDENCIES PACKAGING HACKING ChangeLog.0 autogen.sh \
55   build-aux/ac-help.sed build-aux/moopp build-aux/git-version-gen \
56   m4/fixautomake.m4 m4/woe32-dll.m4 \
57   m4/libtool.m4
58
59 # Additional dependencies for configure, due to the use of autoconf --trace.
60 $(srcdir)/configure: $(srcdir)/gettext-runtime/configure.ac $(srcdir)/gettext-tools/configure.ac 
61
62 # Verify that some files are the same.
63 distcheck-hook:
64         cmp -s gettext-runtime/po/Makefile.in.in gettext-tools/po/Makefile.in.in
65         cmp -s gettext-runtime/po/Rules-quot gettext-tools/po/Rules-quot
66         cmp -s gettext-runtime/po/boldquot.sed gettext-tools/po/boldquot.sed
67         cmp -s gettext-runtime/po/quot.sed gettext-tools/po/quot.sed
68         cmp -s gettext-runtime/po/en@quot.header gettext-tools/po/en@quot.header
69         cmp -s gettext-runtime/po/en@boldquot.header gettext-tools/po/en@boldquot.header
70         cmp -s gettext-runtime/po/insert-header.sin gettext-tools/po/insert-header.sin
71         cmp -s gettext-runtime/po/remove-potcdate.sin gettext-tools/po/remove-potcdate.sin
72         cmp -s gettext-runtime/po/remove-potcdate.sin gettext-tools/examples/po/remove-potcdate.sin
73         cmp -s gettext-runtime/m4/codeset.m4 gettext-tools/gnulib-m4/codeset.m4
74         cmp -s gettext-runtime/m4/extern-inline.m4 gettext-tools/gnulib-m4/extern-inline.m4
75         cmp -s gettext-runtime/m4/fcntl-o.m4 gettext-tools/gnulib-m4/fcntl-o.m4
76         cmp -s gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4
77         cmp -s gettext-runtime/m4/glibc2.m4 gettext-tools/gnulib-m4/glibc2.m4
78         cmp -s gettext-runtime/m4/glibc21.m4 gettext-tools/gnulib-m4/glibc21.m4
79         cmp -s gettext-runtime/m4/iconv.m4 gettext-tools/gnulib-m4/iconv.m4
80         cmp -s gettext-runtime/m4/intdiv0.m4 gettext-tools/gnulib-m4/intdiv0.m4
81         cmp -s gettext-runtime/m4/intl.m4 gettext-tools/gnulib-m4/intl.m4
82         cmp -s gettext-runtime/m4/intldir.m4 gettext-tools/gnulib-m4/intldir.m4
83         cmp -s gettext-runtime/m4/intlmacosx.m4 gettext-tools/gnulib-m4/intlmacosx.m4
84         cmp -s gettext-runtime/m4/intmax.m4 gettext-tools/gnulib-m4/intmax.m4
85         cmp -s gettext-runtime/m4/inttypes-pri.m4 gettext-tools/gnulib-m4/inttypes-pri.m4
86         cmp -s gettext-runtime/m4/inttypes_h.m4 gettext-tools/gnulib-m4/inttypes_h.m4
87         cmp -s gettext-runtime/m4/lcmessage.m4 gettext-tools/gnulib-m4/lcmessage.m4
88         cmp -s gettext-runtime/m4/lock.m4 gettext-tools/gnulib-m4/lock.m4
89         cmp -s gettext-runtime/m4/longlong.m4 gettext-tools/gnulib-m4/longlong.m4
90         cmp -s gettext-runtime/m4/nls.m4 gettext-tools/gnulib-m4/nls.m4
91         cmp -s gettext-runtime/m4/po.m4 gettext-tools/gnulib-m4/po.m4
92         cmp -s gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4
93         cmp -s gettext-runtime/m4/printf-posix.m4 gettext-tools/gnulib-m4/printf-posix.m4
94         cmp -s gettext-runtime/m4/progtest.m4 gettext-tools/gnulib-m4/progtest.m4
95         cmp -s gettext-runtime/m4/size_max.m4 gettext-tools/gnulib-m4/size_max.m4
96         cmp -s gettext-runtime/m4/stdint_h.m4 gettext-tools/gnulib-m4/stdint_h.m4
97         cmp -s gettext-runtime/m4/threadlib.m4 gettext-tools/gnulib-m4/threadlib.m4
98         cmp -s gettext-runtime/m4/uintmax_t.m4 gettext-tools/gnulib-m4/uintmax_t.m4
99         cmp -s gettext-runtime/m4/visibility.m4 gettext-tools/gnulib-m4/visibility.m4
100         cmp -s gettext-runtime/m4/wchar_t.m4 gettext-tools/gnulib-m4/wchar_t.m4
101         cmp -s gettext-runtime/m4/wint_t.m4 gettext-tools/gnulib-m4/wint_t.m4
102         cmp -s gettext-runtime/m4/xsize.m4 gettext-tools/gnulib-m4/xsize.m4
103         cmp -s gettext-runtime/libasprintf/gnulib-m4/intmax_t.m4 gettext-tools/gnulib-m4/intmax_t.m4
104         test "`sed 1,17d gettext-runtime/intl/config.charset | md5sum`" = "`sed 1,17d gettext-tools/gnulib-lib/config.charset | md5sum`"
105         test "`sed 1,16d gettext-runtime/intl/localcharset.h | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/localcharset.h | md5sum`"
106         test "`sed 1,16d gettext-runtime/intl/localcharset.c | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/localcharset.c | md5sum`"
107         test "`sed 1,16d gettext-runtime/intl/localename.c | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/localename.c | md5sum`"
108         test "`sed 1,15d gettext-runtime/intl/lock.h | md5sum`" = "`sed 1,15d gettext-tools/gnulib-lib/glthread/lock.h | md5sum`"
109         test "`sed 1,15d gettext-runtime/intl/lock.c | md5sum`" = "`sed -e 1,15d -e 's,glthread/,,g' gettext-tools/gnulib-lib/glthread/lock.c | md5sum`"
110         test "`sed 1,16d gettext-runtime/intl/verify.h | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/verify.h | md5sum`"
111         cmp -s gettext-runtime/intl/printf-args.h gettext-runtime/libasprintf/printf-args.h
112         cmp -s gettext-runtime/intl/printf-args.c gettext-runtime/libasprintf/printf-args.c
113         cmp -s gettext-runtime/intl/printf-parse.h gettext-runtime/libasprintf/printf-parse.h
114         cmp -s gettext-runtime/intl/printf-parse.c gettext-runtime/libasprintf/printf-parse.c
115         cmp -s gettext-runtime/intl/verify.h gettext-runtime/libasprintf/verify.h
116         test "`sed 1,16d gettext-runtime/intl/ref-add.sin | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/ref-add.sin | md5sum`"
117         test "`sed 1,16d gettext-runtime/intl/ref-del.sin | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/ref-del.sin | md5sum`"
118         test "`sed 1,18d gettext-runtime/intl/relocatable.h | md5sum`" = "`sed 1,18d gettext-tools/gnulib-lib/relocatable.h | md5sum`"
119         test "`sed 1,18d gettext-runtime/intl/relocatable.c | md5sum`" = "`sed 1,18d gettext-tools/gnulib-lib/relocatable.c | md5sum`"
120         cmp -s gettext-runtime/intl/vasnprintf.h gettext-runtime/libasprintf/vasnprintf.h
121         test "`sed 1,16d gettext-runtime/intl/vasnprintf.c | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/vasnprintf.c | md5sum`"
122         cmp -s gettext-runtime/intl/vasnprintf.c gettext-runtime/libasprintf/vasnprintf.c
123         cmp -s gettext-runtime/intl/xsize.h gettext-runtime/libasprintf/xsize.h
124         test "`sed 1,16d gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d gettext-tools/gnulib-lib/xsize.h | md5sum`"
125         cmp -s gettext-runtime/man/help2man gettext-tools/man/help2man
126         cmp -s gettext-runtime/man/x-to-1.in gettext-tools/man/x-to-1.in
127         cmp -s gettext-runtime/libasprintf/texi2html gettext-tools/doc/texi2html
128         cmp -s gettext-tools/examples/hello-java-awt/m4/TestAWT.java gettext-tools/examples/hello-java-swing/m4/TestAWT.java
129         cmp -s gettext-tools/examples/hello-java-awt/m4/TestAWT.class gettext-tools/examples/hello-java-swing/m4/TestAWT.class
130         test "`sed 1,15d gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d gettext-runtime/libasprintf/alloca.in.h | md5sum`"
131
132 # DJGPP port.
133
134 EXTRA_DIST += djgpp/COPYING.DJ djgpp/Makefile.maint djgpp/README.DJ \
135               djgpp/README.in djgpp/README djgpp/config.bat djgpp/config.in \
136               djgpp/config.sed djgpp/config.site djgpp/djpwd.h \
137               djgpp/edtests.bat djgpp/fnchange.in djgpp/fnchange.lst \
138               djgpp/getpwnam.c djgpp/msginit.sed djgpp/tscript.sed \
139               djgpp/unsetenv.c
140
141
142 # OS/2 port.
143
144 EXTRA_DIST += os2/README.OS2 os2/Makefile os2/backward.def os2/configure.awk
145
146
147 # Woe32 support.
148
149 EXTRA_DIST += README.woe32 windows/windres-options windows/gettext.rc
150
151 # Versioning based on Git release tags.
152
153 EXTRA_DIST += $(top_srcdir)/.version
154 BUILT_SOURCES = $(top_srcdir)/.version
155 $(top_srcdir)/.version:
156         echo $(VERSION) > $@-t && mv $@-t $@
157 dist-hook: gen-ChangeLogs
158         echo $(VERSION) > $(distdir)/.tarball-version
159
160 # Generate ChangeLog.
161
162 gen_start_date = 2015-10-13
163 .PHONY: gen-ChangeLogs
164 gen-ChangeLogs:
165         $(AM_V_GEN)if test -d .git; then                                \
166           log_fix="$(srcdir)/build-aux/git-log-fix";                    \
167           test -e "$$log_fix"                                           \
168             && amend_git_log="--amend=$$log_fix"                        \
169             || amend_git_log=;                                          \
170           for d in . gettext-runtime/intl gettext-runtime/po            \
171                 gettext-tools/po; do                                    \
172             test "$$d" = "."                                            \
173               && cldir="$(distdir)"                                     \
174               || cldir="$(distdir)/$$d";                                \
175             $(top_srcdir)/build-aux/gitlog-to-changelog                 \
176               $$amend_git_log --since=$(gen_start_date) -- "$$d"        \
177                 > "$$cldir/cl-t" &&                                     \
178             { rm -f "$$cldir/ChangeLog" &&                              \
179               mv "$$cldir/cl-t" "$$cldir/ChangeLog"; };                 \
180           done;                                                         \
181         fi
182
183 # PO files update.
184
185 maintainer-update-po-local: $(top_builddir)/config.status