[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py and gnulib-tool.sh disagree on AC_REQUIRE([AM_PROG_CC_C_O
From: |
Collin Funk |
Subject: |
gnulib-tool.py and gnulib-tool.sh disagree on AC_REQUIRE([AM_PROG_CC_C_O]) |
Date: |
Thu, 28 Mar 2024 12:33:12 -0700 |
User-agent: |
Mozilla Thunderbird |
Hi Bruno,
Could you please help me find the correct solution to this issue?
In a few of the test cases there is the following diff in
gnulib-comp.m4:
$ diff -u ./test-oath-toolkit-2.result/liboath/gl/m4/gnulib-comp.m4
tmp700002-result/liboath/gl/m4/gnulib-comp.m4
--- ./test-oath-toolkit-2.result/liboath/gl/m4/gnulib-comp.m4 2024-03-28
12:16:32.375344488 -0700
+++ tmp700002-result/liboath/gl/m4/gnulib-comp.m4 2024-03-28
12:18:09.135468095 -0700
@@ -42,6 +42,7 @@
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_PROG_AR_RANLIB])
+ AC_REQUIRE([AM_PROG_CC_C_O])
# Code from module absolute-header:
# Code from module alignasof:
# Code from module alloca-opt:
This is output in line 6030 of gnulib-tool.sh:
if ! $gnu_make && test -n "$uses_subdirs"; then
echo " AC_REQUIRE([AM_PROG_CC_C_O])"
fi
However, since gnulib-comp.m4 is emitted before lib/Makefile.am and
tests/Makefile.am, I don't think it would be possible for
$uses_subdirs to be set. Therefore this line would never be printed.
This grep shows it only shows up in the tmp* directories from
gnulib-tool.py, which seems to back up my interpretation:
$ grep -r 'AC_REQUIRE(\[AM_PROG_CC_C_O\])' *
tmp699959-result/m4/gnulib-comp.m4: AC_REQUIRE([AM_PROG_CC_C_O])
tmp700002-result/liboath/gl/m4/gnulib-comp.m4: AC_REQUIRE([AM_PROG_CC_C_O])
tmp700100-result/m4/gnulib-comp.m4: AC_REQUIRE([AM_PROG_CC_C_O])
In GLImport.gnulib_comp() we have:
for module in moduletable['main']:
# Test whether there are some source files in subdirectories.
for file in module.getFiles():
if (file.startswith('lib/') and file.endswith('.c')
and file.count('/') > 1):
uses_subdirs = True
break
if not gnu_make and uses_subdirs:
emit += ' AC_REQUIRE([AM_PROG_CC_C_O])\n'
which is why it is printed.
I don't think we *need* this macro but there might be a compatibility
reason we want it that I am not aware of [1].
[1] https://git.savannah.gnu.org/cgit/automake.git/tree/NEWS#n496
Collin
- gnulib-tool.py and gnulib-tool.sh disagree on AC_REQUIRE([AM_PROG_CC_C_O]),
Collin Funk <=