library_srcs = ssl.c http.c auth.c library.c compat.c
lib_srcs_gnutls = gnutls.c gnutls_pkcs12.c gnutls_tpm.c
lib_srcs_openssl = openssl.c
+
+POTFILES = $(openconnect_SOURCES) $(lib_srcs_openssl) $(lib_srcs_gnutls) $(library_srcs)
+
if OPENCONNECT_GNUTLS
library_srcs += $(lib_srcs_gnutls)
endif
tx pull -af ; git commit -s -m "Update translations from Transifex" -- po/ ; \
fi
-upload-pot:
- if [ ${abs_top_builddir} != $(abs_top_srcdir) ]; then \
+upload-pot: po/$(PACKAGE).pot
+ @if [ ${abs_top_builddir} != $(abs_top_srcdir) ]; then \
ln -sf ${abs_top_srcdir}/.tx .tx; fi
- @make -C po openconnect.pot && tx push -s
+ @tx push -s
+
+po/$(PACKAGE).pot: $(POTFILES) Makefile
+ @echo "Regenerating $@" ; rm -f $@ && \
+ xgettext --directory=$(top_srcdir) --from-code=UTF-8 \
+ --add-comments --keyword=_ --keyword=N_ \
+ --package-name="@PACKAGE@" --package-version="@VERSION@" \
+ --msgid-bugs-address=openconnect-devel@lists.infradead.org \
+ -o $@ $(POTFILES)
fi ; \
done
-# This is a GNUism but I don't care; it's not a default target.
-POTFILESIN = $(shell grep -v '^\#' $(srcdir)/POTFILES.in)
-POTFILES = $(POTFILESIN:%=$(top_srcdir)/%)
-
-$(PACKAGE).pot: $(POTFILES) Makefile
- rm -f $@ && \
- xgettext --directory=$(top_srcdir) \
- --add-comments --keyword=_ --keyword=N_ \
- --files-from=$(srcdir)/POTFILES.in --from-code=UTF-8 \
- --package-name="@PACKAGE@" --package-version="@VERSION@" \
- --msgid-bugs-address=openconnect-devel@lists.infradead.org -o $@
+# $(PACKAGE).pot is built by a rule in the parent directory Makefile
+# This rule isn't needed but is here for convenience if manually invoked
+.PHONY: $(PACKAGE).pot
+$(PACKAGE).pot:
+ $(MAKE) -C .. po/$@
EXTRA_DIST = $(POFILES) LINGUAS POTFILES.in
DISTCLEANFILES=$(PACKAGE).pot