From: Darrick J. Wong Date: Tue, 1 Apr 2025 14:44:12 +0000 (-0700) Subject: Makefile: inject package name/version/bugreport into pot file X-Git-Tag: v6.14.0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5913c6f9f0e93c68d7ca0625443099bd9102b89;p=thirdparty%2Fxfsprogs-dev.git Makefile: inject package name/version/bugreport into pot file Inject the package name and version ("xfsprogs") and the bug reporting URL into the generated gettext .pot file. This isn't strictly necessary, it's more just polish. Signed-off-by: Darrick J. Wong Reviewed-by: Andrey Albershteyn Reviewed-by: Bill O'Donnell --- diff --git a/configure.ac b/configure.ac index f039bc91..71596711 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([include/libxfs.h]) AC_PREFIX_DEFAULT(/usr) +AC_SUBST(PACKAGE_BUGREPORT) # Default CFLAGS if nobody specifies anything else if test "${CFLAGS+set}" != "set"; then diff --git a/include/builddefs.in b/include/builddefs.in index fe2a7824..04b4e088 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -42,6 +42,7 @@ PKG_GROUP = @pkg_group@ PKG_RELEASE = @pkg_release@ PKG_VERSION = @pkg_version@ PKG_DISTRIBUTION= @pkg_distribution@ +PKG_BUGREPORT = @PACKAGE_BUGREPORT@ prefix = @prefix@ exec_prefix = @exec_prefix@ diff --git a/include/buildrules b/include/buildrules index 6b76abce..ae047ac4 100644 --- a/include/buildrules +++ b/include/buildrules @@ -85,9 +85,17 @@ endif endif ifdef POTHEAD +XGETTEXT_FLAGS=\ + --language=C \ + --keyword=_ \ + --keyword=N_ \ + --package-name=$(PKG_NAME) \ + --package-version=$(PKG_VERSION) \ + --msgid-bugs-address=$(PKG_BUGREPORT) + $(POTHEAD): $(XGETTEXTFILES) @echo " [GETTXT] $@" - $(Q)$(XGETTEXT) --language=C --keyword=_ --keyword=N_ -o $@ $(XGETTEXTFILES) + $(Q)$(XGETTEXT) $(XGETTEXT_FLAGS) -o $@ $(XGETTEXTFILES) # Update translations update-po: $(POTHEAD) $(wildcard $(TOPDIR)/po/*.po)