Skip to content

Commit 33d0695

Browse files
committed
Updated autoreconf to avoid force
1 parent af78794 commit 33d0695

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

AUTORECONF_prewrapper.sh.template

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
#!/bin/bash
2-
pushd .
3-
SCRIPT_PATH gnulib_tool_py_remove_nmd_makefiles
4-
popd
5-
exec autoreconf "$@"
2+
# This script does a few things, for one we remove the NMD files that gnulib-tool.py couldn't handle before (but maybe now it can)
3+
# We remove the force option that overrides the build-aux etc files, also add symlink if not there, an alternative might me to just recopy the build scripts into place after running the normal
4+
5+
# beware of macro errors may not be real errors https://ae1020.github.io/undefined-macro-pkg-config/
6+
set -e
7+
WLB_ARGS_ARR=("$@")
8+
WLB_LEN=${#WLB_ARGS_ARR[@]}
9+
WLB_FINAL_ARR=()
10+
for (( WLB_INDEX=0; WLB_INDEX<$WLB_LEN; WLB_INDEX++ )); do
11+
WLB_VAL="${WLB_ARGS_ARR[$WLB_INDEX]}"
12+
case $WLB_VAL in
13+
"--force")
14+
;;
15+
"--symlink")
16+
;;
17+
*)
18+
WLB_FINAL_ARR+=($WLB_VAL)
19+
;;
20+
esac
21+
done
22+
WLB_FINAL_ARR+=("--symlink")
23+
24+
#pushd .
25+
#SCRIPT_PATH gnulib_tool_py_remove_nmd_makefiles
26+
#popd
27+
28+
exec autoreconf "${WLB_FINAL_ARR[@]}"

default_config.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ BUNDLE_PATH=[BASE_FOLDER]/gnulib.bundle # if this file exists use it as a bootst
5656
GNU_LIBS_ADDL=()
5757
GNU_LIBS_EXCLUDE= ()
5858
GNU_LIBS_USE_GNULIB_TOOL_PY=1
59+
GNU_LIBS_AUTORECONF_WRAPPER=1 #the wrapper now mostly avoids using --force which bootstraps do by default to avoid overriding the build-aux scripts
5960
GNU_LIBS_USE_GNULIB_TOOL_PY_ADDL_MK_FILES_FIX=()
6061
GNU_LIBS_PATCHES_DEFAULT=( "NOOP_FOR_WINDOWS_CHOWN_CHMOD_GETUSER_GETGROUP" "GNULIB_TOOL_APPLY_PATCHES_BY_FILE" "FTS_MINOR_FIXES" "BUILD_AUX_HANDLE_DOT_A_LIBS" "FIX_SYSSTAT_TIMESPEC_DISABLE_BUG" "WIN_FSUSAGE_FIXES" "WINDOWS_SYMLINK_SUPPORT" "SPAWN_PIPE_FORK_FD_FIXES" "WINDOW_PATH_FIXES" "PHYSMEM_TEST_MAIN_RENAME" "WIN32_POLL_FIXES" "MSVC_PARAMETER_HANDLER_M4_MACRO_FIX" )
6162
GNU_LIBS_PATCHES_ADDL=()

helpers_gnu.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function gnulib_add_addl_modules_to_bootstrap(){
127127
fi
128128
}
129129
function setup_gnulibtool_py_autoconfwrapper(){
130-
if [[ $BLD_CONFIG_GNU_LIBS_USE_GNULIB_TOOL_PY -eq 1 ]]; then
130+
if [[ $BLD_CONFIG_GNU_LIBS_AUTORECONF_WRAPPER -eq 1 ]]; then
131131
local TARGET_FL="${BLD_CONFIG_BUILD_AUX_FOLDER}/AUTORECONF_prewrapper.sh"
132132
#For things like coreutils bootstrap will create the mk files we need to fix before it also then runs autoreconf so we will just use our wrapper for autoreconf, call ourselves, then call autoreconf
133133
if [[ ! -e "$TARGET_FL" ]]; then
@@ -138,11 +138,13 @@ function setup_gnulibtool_py_autoconfwrapper(){
138138
fi
139139
export AUTORECONF="$TARGET_FL"
140140

141-
gnulib_tool_py_remove_nmd_makefiles;
141+
#gnulib_tool_py_remove_nmd_makefiles;
142142
fi
143-
gnulib_ensure_buildaux_scripts_copied; #this has nothing to do wit autoconf but for some readon can get more failures with debug otherwise.
143+
gnulib_ensure_buildaux_scripts_copied; #this has nothing to do wit autoconf but for some reason can get more failures with debug otherwise.
144144
}
145145
function gnulib_tool_py_remove_nmd_makefiles() {
146+
echo "DONT THINK NEEDED ANYMORE" 1>&2
147+
exit 1
146148
#this taken from the normal gnulib_tool process, not sure lib/ will exist yet
147149

148150
#sed_eliminate_NMD='s/@NMD@//;/@!NMD@/d' #this is what is needed for automake subdirs but as that doesn't work with gnulib-tool..py right now no need to worry about it

0 commit comments

Comments
 (0)