Skip to content

Commit

Permalink
Updated autoreconf to avoid force
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchcapper committed Nov 29, 2024
1 parent af78794 commit 33d0695
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
31 changes: 27 additions & 4 deletions AUTORECONF_prewrapper.sh.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
#!/bin/bash
pushd .
SCRIPT_PATH gnulib_tool_py_remove_nmd_makefiles
popd
exec autoreconf "$@"
# 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)
# 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

# beware of macro errors may not be real errors https://ae1020.github.io/undefined-macro-pkg-config/
set -e
WLB_ARGS_ARR=("$@")
WLB_LEN=${#WLB_ARGS_ARR[@]}
WLB_FINAL_ARR=()
for (( WLB_INDEX=0; WLB_INDEX<$WLB_LEN; WLB_INDEX++ )); do
WLB_VAL="${WLB_ARGS_ARR[$WLB_INDEX]}"
case $WLB_VAL in
"--force")
;;
"--symlink")
;;
*)
WLB_FINAL_ARR+=($WLB_VAL)
;;
esac
done
WLB_FINAL_ARR+=("--symlink")

#pushd .
#SCRIPT_PATH gnulib_tool_py_remove_nmd_makefiles
#popd

exec autoreconf "${WLB_FINAL_ARR[@]}"
1 change: 1 addition & 0 deletions default_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ BUNDLE_PATH=[BASE_FOLDER]/gnulib.bundle # if this file exists use it as a bootst
GNU_LIBS_ADDL=()
GNU_LIBS_EXCLUDE= ()
GNU_LIBS_USE_GNULIB_TOOL_PY=1
GNU_LIBS_AUTORECONF_WRAPPER=1 #the wrapper now mostly avoids using --force which bootstraps do by default to avoid overriding the build-aux scripts
GNU_LIBS_USE_GNULIB_TOOL_PY_ADDL_MK_FILES_FIX=()
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" )
GNU_LIBS_PATCHES_ADDL=()
Expand Down
8 changes: 5 additions & 3 deletions helpers_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function gnulib_add_addl_modules_to_bootstrap(){
fi
}
function setup_gnulibtool_py_autoconfwrapper(){
if [[ $BLD_CONFIG_GNU_LIBS_USE_GNULIB_TOOL_PY -eq 1 ]]; then
if [[ $BLD_CONFIG_GNU_LIBS_AUTORECONF_WRAPPER -eq 1 ]]; then
local TARGET_FL="${BLD_CONFIG_BUILD_AUX_FOLDER}/AUTORECONF_prewrapper.sh"
#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
if [[ ! -e "$TARGET_FL" ]]; then
Expand All @@ -138,11 +138,13 @@ function setup_gnulibtool_py_autoconfwrapper(){
fi
export AUTORECONF="$TARGET_FL"

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

#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
Expand Down

0 comments on commit 33d0695

Please sign in to comment.