]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Include the Rules-* files at 'make' time, not at 'configure' time.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Dec 2024 09:50:58 +0000 (10:50 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Dec 2024 09:50:58 +0000 (10:50 +0100)
* 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.

gettext-runtime/m4/po.m4
gettext-runtime/po/Makefile.in.in

index 0d23782f90f1de6fe061e9fb02a4870d400c5f35..73e0436bd72f3110892b9a30cf6bdbd7862cf891 100644 (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
index 4437db0a50140659038afad48300e5f88131d62e..613e34787a095b1cbe0a92058f85cf0cb8f36bf4 100644 (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