Files
xiaomi-ax3600/tools/gnulib/patches/660-version-stamp.patch
Michael Pratt 1a253a2bb5 tools/gnulib: backport patches for gettext
The latest versions of gettext rely on several changes to gnulib
including both changes to modules and new modules
and some previously gettext specific code being moved to gnulib.

Backport these changes in order to allow updating gettext
while using the local gnulib copy of sources.

Add patch:
 - 640-mem-hash-map.patch
 - 645-next-prime.patch
 - 646-hashcode-string.patch
 - 647-hashkey-string.patch
 - 650-package-version.patch
 - 651-package-version-simplify.patch
 - 652-package-version-simplify-further.patch
 - 653-package-version-warning.patch
 - 660-version-stamp.patch
 - 689-vc-mtime.patch
 - 755-clean-temp-hashkey.patch
 - 795-string-desc-rename-functions.patch
 - 796-vc-mtime-less-read.patch
 - 797-vc-mtime-add-api.patch
 - 798-vc-mtime-add-api.patch
 - 799-vc-mtime-old-git.patch
 - 900-str_startswith-module.patch
 - 901-str_endswith-module.patch

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00

76 lines
2.3 KiB
Diff

From 85599643e2fbf70f7f0bd58831993132ef335705 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Wed, 22 Jan 2025 21:25:27 +0100
Subject: New module 'version-stamp'.
* m4/version-stamp.m4: New file.
* modules/version-stamp: New file.
---
ChangeLog | 6 ++++++
m4/version-stamp.m4 | 35 +++++++++++++++++++++++++++++++++++
modules/version-stamp | 19 +++++++++++++++++++
3 files changed, 60 insertions(+)
create mode 100644 m4/version-stamp.m4
create mode 100644 modules/version-stamp
--- /dev/null
+++ b/m4/version-stamp.m4
@@ -0,0 +1,35 @@
+# version-stamp.m4
+# serial 1
+dnl Copyright (C) 2025 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Manages a stamp file, that keeps track when $(VERSION) was last changed.
+#
+# gl_CONFIG_VERSION_STAMP
+# needs to be invoked near the end of the package's top-level configure.ac,
+# before AC_OUTPUT.
+# It makes sure that during the build,
+# - $(top_srcdir)/.version exists, and
+# - when $(VERSION) is changed, $(top_srcdir)/.version gets modified.
+#
+# $(top_srcdir)/.version is a stamp file. Its contents wouldn't matter,
+# except that for detecting the change, we store the value of $(VERSION)
+# in it (but we could just as well store it in a different file).
+AC_DEFUN([gl_CONFIG_VERSION_STAMP],
+[
+ AC_CONFIG_COMMANDS([version-timestamp],
+ [if test -f "$ac_top_srcdir/.version" \
+ && test `cat "$ac_top_srcdir/.version"` = "$gl_version"; then
+ # The value of $(VERSION) is the same as last time.
+ :
+ else
+ # The value of $(VERSION) has changed. Update the stamp.
+ echo "$gl_version" > "$ac_top_srcdir/.version"
+ fi
+ ],
+ [gl_version="$VERSION"])
+])
--- /dev/null
+++ b/modules/version-stamp
@@ -0,0 +1,19 @@
+Description:
+Optimized rebuilding of artifacts that depend on $(VERSION).
+
+Files:
+m4/version-stamp.m4
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+
+License:
+GPLed build tool
+
+Maintainer:
+Bruno Haible