]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Regenerate <bits/version.h> in maintainer mode
authorJonathan Wakely <jwakely@redhat.com>
Fri, 1 Mar 2024 11:20:51 +0000 (11:20 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 19 Mar 2024 15:20:07 +0000 (15:20 +0000)
This is a generated header but regenerating it requires the manual step
of running 'make -C include update-version' in the libstdc++ build dir.
Make it regenerate automatically when --enable-maintainer-mode is used.

libstdc++-v3/ChangeLog:

* include/Makefile.am [MAINTAINER_MODE]: Add target to
automatically update <bits/version.h>.
* include/Makefile.in: Regenerate.

gcc/ChangeLog:

* doc/install.texi (Prerequisites): Document use of autogen for
libstdc++.

gcc/doc/install.texi
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in

index e3650e0c4f49f676e5f890836b3a8ccd01cebf6c..014ca25aa628d6d140334cf7a7181d585dc75678 100644 (file)
@@ -545,6 +545,8 @@ Necessary to run @samp{make check} for @file{fixinc}.
 Necessary to regenerate the top level @file{Makefile.in} file from
 @file{Makefile.tpl} and @file{Makefile.def}.
 
+Necessary to regenerate the @file{bits/version.h} header for libstdc++.
+
 @item Flex version 2.5.4 (or later)
 
 Necessary when modifying @file{*.l} files.
index 64152351ed0cda9929c1c314c0efff6541e8012b..cb902de36aed638ac3896ed3ea4bf7c16a418f28 100644 (file)
@@ -1480,6 +1480,12 @@ update-version:
        cd ${bits_srcdir} && \
        autogen version.def
 
+if MAINTAINER_MODE
+# Regenerate it automatically in maintainer mode.
+${bits_srcdir}/version.h: ${bits_srcdir}/version.def ${bits_srcdir}/version.tpl
+       $(MAKE) update-version
+endif
+
 # The real deal.
 install-data-local: install-headers
 install-headers:
index 5a965c8e03bfb97be4560057e2f3f3ea6e0aa50d..9357087acb4d88be2849da63f02d98ad4fd3c6ba 100644 (file)
@@ -1954,6 +1954,10 @@ update-version:
        cd ${bits_srcdir} && \
        autogen version.def
 
+# Regenerate it automatically in maintainer mode.
+@MAINTAINER_MODE_TRUE@${bits_srcdir}/version.h: ${bits_srcdir}/version.def ${bits_srcdir}/version.tpl
+@MAINTAINER_MODE_TRUE@ $(MAKE) update-version
+
 # The real deal.
 install-data-local: install-headers
 install-headers: