commit: b250b3627ca1e074ac789077add83d632bd51d9a
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 26 12:19:16 2026 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jan 26 12:19:16 2026 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b250b362
autogen: automatically update .gitignore gnulib list
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
.gitignore | 12 ++----------
autogen.sh | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2bb5f45a..01bb2a20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,9 +56,10 @@ quse
qwhich
qxpak
-# BEGIN GNULIB
+# BEGIN GNULIB -- keep this at the end of this file
# regenerate using:
# ls autotools/gnulib/*.in.h | sed -e 's/\.in\.h/.h/' | sed -e 's:_:/:'
+# or use autogen.sh
autotools/gnulib/alloca.h
autotools/gnulib/assert.h
autotools/gnulib/byteswap.h
@@ -66,13 +67,11 @@ autotools/gnulib/dirent.h
autotools/gnulib/errno.h
autotools/gnulib/error.h
autotools/gnulib/fcntl.h
-autotools/gnulib/float.h
autotools/gnulib/getopt-cdefs.h
autotools/gnulib/getopt.h
autotools/gnulib/inttypes.h
autotools/gnulib/limits.h
autotools/gnulib/locale.h
-autotools/gnulib/math.h
autotools/gnulib/stdckdint.h
autotools/gnulib/stddef.h
autotools/gnulib/stdint.h
@@ -84,16 +83,9 @@ autotools/gnulib/sys/stat.h
autotools/gnulib/sys/time.h
autotools/gnulib/sys/types.h
autotools/gnulib/time.h
-autotools/gnulib/uchar.h
-autotools/gnulib/unicase.h
-autotools/gnulib/unictype.h
-autotools/gnulib/uninorm.h
autotools/gnulib/unistd.h
-autotools/gnulib/unitypes.h
-autotools/gnulib/uniwidth.h
autotools/gnulib/utime.h
autotools/gnulib/wchar.h
-autotools/gnulib/wctype.h
# manual additions
autotools/gnulib/sys
autotools/gnulib/malloc/scratch_buffer.gl.h
diff --git a/autogen.sh b/autogen.sh
index e5488a85..69f7377e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -60,5 +60,24 @@ v gnulib-tool \
--no-vc-files \
${mods}
+{
+ sed -e '/^# BEGIN GNULIB/,/^# END GNULIB/d' .gitignore
+ cat <<- EOM
+ # BEGIN GNULIB -- keep this at the end of this file
+ # regenerate using:
+ # ls autotools/gnulib/*.in.h | sed -e 's/\.in\.h/.h/' | sed
-e 's:_:/:'
+ # or use autogen.sh
+ EOM
+ ls autotools/gnulib/*.in.h | sed -e 's/\.in\.h/.h/' | sed -e 's:_:/:'
+ cat <<- EOM
+ # manual additions
+ autotools/gnulib/sys
+ autotools/gnulib/malloc/scratch_buffer.gl.h
+ *.dirstamp
+ # END GNULIB
+ EOM
+} > .gitignore.new
+[[ -s .gitignore.new ]] && mv .gitignore.new .gitignore
+
export AUTOMAKE="automake --foreign"
v autoreconf -i -f