commit 7ca83d316e14d0f6ef6f3aeac55ababedc9beaf6 parent eecdde2511e14c34173c9ac39cb5d8e600182f92 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Fri, 10 Jun 2022 10:53:27 +0300 Makefiles: automatically build POTFILES.in Added very simple automated solution to rebuild POTFILES.in when needed and use only library files for it. Diffstat:
| M | Makefile.am | | | 4 | ++++ |
| M | src/microhttpd/Makefile.am | | | 10 | ++++++++++ |
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Makefile.am b/Makefile.am @@ -126,6 +126,10 @@ dist-po: po/Makefile echo "cd po && $(MAKE) $(AM_MAKEFLAGS) distdir='$$rel_distsubdir' distdir" && \ $(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) distdir="$$rel_distsubdir" distdir +$(top_srcdir)/po/POTFILES.in: $(top_srcdir)/src/microhttpd/Makefile.am + @echo "cd src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) update-po-POTFILES.in" && \ + $(am__cd) src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) update-po-POTFILES.in + EXTRA_DIST += $(am__po_configure_deps) $(top_srcdir)/po/po-configure.ac.in $(top_srcdir)/po-configure DISTCLEANFILES += config.main.log po-config.log diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am @@ -270,6 +270,15 @@ endif TESTS = $(check_PROGRAMS) +update-po-POTFILES.in: $(top_srcdir)/po/POTFILES.in + +$(top_srcdir)/po/POTFILES.in: $(srcdir)/Makefile.am + @echo "Creating $@" + @echo src/include/microhttpd.h > $@ && \ + for src in $(am__libmicrohttpd_la_SOURCES_DIST) ; do \ + echo "$(subdir)/$$src" >> $@ ; \ + done + test_start_stop_SOURCES = \ test_start_stop.c test_start_stop_LDADD = \ @@ -520,3 +529,4 @@ test_set_panic_SOURCES = \ test_set_panic_LDADD = \ libmicrohttpd.la +.PHONY: update-po-POTFILES.in