build: Include the Rules-* files at 'make' time, not at 'configure' time.

* gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS): Don't splice in the Rules-* files
here.
* gettext-runtime/po/Makefile.in.in: Collect and include the Rules-* files
explicitly.
This commit is contained in:
Bruno Haible 2024-12-07 10:50:58 +01:00
parent 8c4f925b61
commit 093af64345
2 changed files with 13 additions and 8 deletions

View File

@ -129,14 +129,6 @@ changequote([,])dnl
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
cat "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
if test -f "$f"; then
case "$f" in
*.orig | *.bak | *~) ;;
*) cat "$f" >> "$ac_dir/Makefile" ;;
esac
fi
done
fi
;;
esac

View File

@ -550,6 +550,19 @@ $(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
# Include all the Rules-* extensions. Documented in
# <https://www.gnu.org/software/gettext/manual/html_node/po_002fRules_002d_002a.html>
RULES_FILES != cd $(srcdir) \
&& for file in Rules-*; do \
if test -f "$$file"; then \
case "$$file" in \
*.orig | *.bak | *~) ;; \
*) echo $(srcdir)/"$$file" ;; \
esac; \
fi; \
done
include $(RULES_FILES)
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
# because execution permission bits may not work on the current file system.
# Use @SHELL@, which is the shell determined by autoconf for the use by its