diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-11-18 20:39:22 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-11-23 14:16:49 +0300 |
commit | 7f5c98bfa147997d58a60186a84d12a3a602d28c (patch) | |
tree | a9f4a6f3f4ae3232843c0ec3e0ebdd6efe310c5e /Makefile.am | |
parent | 816458fde97a41082796eb8d3323047cc4f87935 (diff) | |
download | libmicrohttpd-7f5c98bfa147997d58a60186a84d12a3a602d28c.tar.gz libmicrohttpd-7f5c98bfa147997d58a60186a84d12a3a602d28c.zip |
Gettext staff moved to 'po' directory. Main 'configure' now do not check for
gettext and related staff.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 78 |
1 files changed, 76 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 1a47fba2..a8eaa2cd 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,6 +1,8 @@ | |||
1 | # This Makefile.am is in the public domain | 1 | # This Makefile.am is in the public domain |
2 | ACLOCAL_AMFLAGS = -I m4 | 2 | ACLOCAL_AMFLAGS = -I m4 |
3 | SUBDIRS = contrib m4 src po . | 3 | SUBDIRS = contrib m4 src . |
4 | DIST_SUBDIRS = $(SUBDIRS) po | ||
5 | EXTRA_PO_DIST = po/ABOUT-NLS $(top_srcdir)/po/configure.ac po/configure | ||
4 | W32COMMON = w32/common/gen_dll_res.ps1 w32/common/microhttpd_dll_res_vc.rc.in w32/common/microhttpd_dll_res_vc.rc \ | 6 | W32COMMON = w32/common/gen_dll_res.ps1 w32/common/microhttpd_dll_res_vc.rc.in w32/common/microhttpd_dll_res_vc.rc \ |
5 | w32/common/MHD_config.h w32/common/vs_dirs.props w32/common/common-build-settings.vcxproj \ | 7 | w32/common/MHD_config.h w32/common/vs_dirs.props w32/common/common-build-settings.vcxproj \ |
6 | w32/common/libmicrohttpd-build-settings.vcxproj w32/common/libmicrohttpd-files.vcxproj w32/common/libmicrohttpd-filters.vcxproj \ | 8 | w32/common/libmicrohttpd-build-settings.vcxproj w32/common/libmicrohttpd-files.vcxproj w32/common/libmicrohttpd-filters.vcxproj \ |
@@ -15,9 +17,9 @@ W32VS2015 = w32/VS2015/libmicrohttpd.vcxproj w32/VS2015/libmicrohttpd.vcxproj.fi | |||
15 | w32/VS2015/simplepost.vcxproj w32/VS2015/largepost.vcxproj \ | 17 | w32/VS2015/simplepost.vcxproj w32/VS2015/largepost.vcxproj \ |
16 | w32/VS2015/libmicrohttpd.sln | 18 | w32/VS2015/libmicrohttpd.sln |
17 | EXTRA_DIST = \ | 19 | EXTRA_DIST = \ |
18 | ABOUT-NLS \ | ||
19 | acinclude.m4 \ | 20 | acinclude.m4 \ |
20 | libmicrohttpd.pc.in \ | 21 | libmicrohttpd.pc.in \ |
22 | $(EXTRA_PO_DIST) \ | ||
21 | $(W32COMMON) $(W32VS2013) $(W32VS2015) | 23 | $(W32COMMON) $(W32VS2013) $(W32VS2015) |
22 | 24 | ||
23 | pkgconfigdir = $(libdir)/pkgconfig | 25 | pkgconfigdir = $(libdir)/pkgconfig |
@@ -26,3 +28,75 @@ pkgconfig_DATA = libmicrohttpd.pc | |||
26 | if BUILD_DOC | 28 | if BUILD_DOC |
27 | SUBDIRS += doc | 29 | SUBDIRS += doc |
28 | endif | 30 | endif |
31 | |||
32 | .PHONY: po-files update-po-files po-files-pre-distdir renew-po-configure.ac update-POTFILES.in | ||
33 | |||
34 | # Do not override automake rule, only add prerequisite | ||
35 | distdir@EMPTY_VAR@: po-files-pre-distdir | ||
36 | |||
37 | # Do not override automake rule, only add prerequisite | ||
38 | distclean-recursive@EMPTY_VAR@: po/Makefile | ||
39 | |||
40 | srcdir_po = $(top_srcdir)/po | ||
41 | |||
42 | # Test target: build main po file | ||
43 | po-files: $(srcdir_po)/libmicrohttpd.pot | ||
44 | |||
45 | # Test target: force update all po files | ||
46 | update-po-files: po-files-pre-distdir Makefile | ||
47 | @$(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.pot-update | ||
48 | |||
49 | # Update po-related files before make distdir | ||
50 | po-files-pre-distdir: update-POTFILES.in renew-po-configure.ac | ||
51 | @$(MAKE) $(AM_MAKEFLAGS) po/Makefile | ||
52 | |||
53 | # Clean in po directory only if po/Makefile was generated to avoid | ||
54 | # useless generation of po/Makefile only for 'clean' target | ||
55 | clean-local: | ||
56 | @ if test -f po/Makefile; then $(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) clean || exit 1; fi; | ||
57 | |||
58 | po/Makefile: $(srcdir_po)/Makefile.in.in $(srcdir_po)/Makevars $(srcdir_po)/POTFILES.in po/config.status | ||
59 | @$(am__cd) po && @SHELL@ ./config.status ./Makefile.in po-directories | ||
60 | |||
61 | # Regenerate po/config.status if this Makefile is changed as configure parameters may be updated | ||
62 | po/config.status: $(srcdir_po)/configure Makefile | ||
63 | @$(MKDIR_P) po && $(am__cd) po && echo "cd po && @SHELL@ ./configure @ac_configure_args@" && \ | ||
64 | @SHELL@ $(abs_top_srcdir)/po/configure @ac_configure_args@ --srcdir=$(abs_top_srcdir)/po \ | ||
65 | --disable-option-checking --no-create --no-recursion | ||
66 | |||
67 | # Next rules actually create files in source tree, not in build tree, but those files should | ||
68 | # stay in source tree and should be distributed in tarball, i.e. should not be created during | ||
69 | # normal builds. | ||
70 | $(srcdir_po)/libmicrohttpd.pot: po/Makefile | ||
71 | @$(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.pot | ||
72 | |||
73 | # This target doesn't depend on po/configure.acT so po/configure.ac (and po/configure) will not be | ||
74 | # forced to regenerate after each run of main configure. | ||
75 | # If po/configure.ac is missing - it will be generated. | ||
76 | $(srcdir_po)/configure.ac: | ||
77 | @$(MAKE) $(AM_MAKEFLAGS) renew-po-configure.ac | ||
78 | |||
79 | # Update po/configure.ac only if po/configure.acT (generated by main configure) is different. | ||
80 | # If po/configure.ac is unchanged then po/configure will not be regenerated | ||
81 | renew-po-configure.ac: | ||
82 | @$(MAKE) $(AM_MAKEFLAGS) po/configure.acT && \ | ||
83 | if ! test -f $(srcdir_po)/configure.ac || \ | ||
84 | ! cmp -s po/configure.acT $(srcdir_po)/configure.ac ; then \ | ||
85 | echo "cp po/configure.acT $(srcdir_po)/configure.ac" && \ | ||
86 | cp po/configure.acT $(srcdir_po)/configure.ac || exit 1; \ | ||
87 | fi | ||
88 | |||
89 | $(srcdir_po)/configure: $(srcdir_po)/configure.ac | ||
90 | @$(am__cd) $(srcdir_po) && echo "Creating po/configure..." && \ | ||
91 | echo "@ACLOCAL@" && @ACLOCAL@ && \ | ||
92 | echo "@AUTOCONF@" && @AUTOCONF@ | ||
93 | |||
94 | # Generate po/POTFILES.in if po/POTFILES.in is missing | ||
95 | $(srcdir_po)/POTFILES.in: | ||
96 | @$(MAKE) $(AM_MAKEFLAGS) update-POTFILES.in | ||
97 | |||
98 | update-POTFILES.in: | ||
99 | @$(am__cd) $(srcdir_po) && echo @ECHO_N@ "Creating po/POTFILES.in... @ECHO_C@" && \ | ||
100 | find '../src/include' ! -name 'include' -prune -name '*.h' ! -name 'mhd_options.h' > POTFILES.in && \ | ||
101 | find '../src/microhttpd' ! -name 'microhttpd' -prune \( -name '*.h' -o -name '*.c' \) ! -name 'test_*' >> POTFILES.in && \ | ||
102 | echo "@ECHO_T@done." || (rm -f POTFILES.in ; echo "@ECHO_T@failed." && false) | ||