1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

stdbit-h: don’t generate some dummy .o files

On recent GNU and other C23ish platforms, do not compile files
like lib/stdc_bit_ceil.c, as the corresponding .o files contain
nothing useful.
* m4/stdbit_h.m4 (gl_STDBIT_H):
Define the Automake condition GL_HAVE_STDBIT_H.
Quote cache variables in case the cache is bad.
* modules/stdc_bit_ceil, modules/stdc_bit_floor:
* modules/stdc_bit_width, modules/stdc_count_ones:
* modules/stdc_count_zeros, modules/stdc_first_leading_one:
* modules/stdc_first_leading_zero:
* modules/stdc_first_trailing_one:
* modules/stdc_first_trailing_zero, modules/stdc_has_single_bit:
* modules/stdc_leading_ones, modules/stdc_leading_zeros:
* modules/stdc_trailing_ones, modules/stdc_trailing_zeros:
Generate if !GL_HAVE_STDBIT_H, not if GL_GENERATE_STDBIT_H.
This commit is contained in:
Paul Eggert
2026-03-16 15:17:26 -07:00
parent 9030ef73ab
commit 4e11e3d07a
16 changed files with 52 additions and 18 deletions

View File

@@ -14,7 +14,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_bit_ceil])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_bit_ceil.c
endif

View File

@@ -14,7 +14,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_bit_floor])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_bit_floor.c
endif

View File

@@ -15,7 +15,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_bit_width])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_bit_width.c
endif

View File

@@ -13,7 +13,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_count_ones])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_count_ones.c
endif

View File

@@ -14,7 +14,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_count_zeros])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_count_zeros.c
endif

View File

@@ -15,7 +15,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_first_leading_one])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_first_leading_one.c
endif

View File

@@ -15,7 +15,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_first_leading_zero])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_first_leading_zero.c
endif

View File

@@ -15,7 +15,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_first_trailing_one])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_first_trailing_one.c
endif

View File

@@ -15,7 +15,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_first_trailing_zero])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_first_trailing_zero.c
endif

View File

@@ -13,7 +13,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_has_single_bit])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_has_single_bit.c
endif

View File

@@ -14,7 +14,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_leading_ones])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_leading_ones.c
endif

View File

@@ -13,7 +13,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_leading_zeros])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_leading_zeros.c
endif

View File

@@ -14,7 +14,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_trailing_ones])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_trailing_ones.c
endif

View File

@@ -14,7 +14,8 @@ AC_REQUIRE([gl_STDBIT_H])
gl_STDBIT_MODULE_INDICATOR([stdc_trailing_zeros])
Makefile.am:
if GL_GENERATE_STDBIT_H
if GL_HAVE_STDBIT_H
else
lib_SOURCES += stdc_trailing_zeros.c
endif