diff --git a/AUTORECONF_prewrapper.sh.template b/AUTORECONF_prewrapper.sh.template index f477071..1ec2774 100644 --- a/AUTORECONF_prewrapper.sh.template +++ b/AUTORECONF_prewrapper.sh.template @@ -1,5 +1,28 @@ #!/bin/bash -pushd . -SCRIPT_PATH gnulib_tool_py_remove_nmd_makefiles -popd -exec autoreconf "$@" \ No newline at end of file +# 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[@]}" \ No newline at end of file diff --git a/default_config.ini b/default_config.ini index 83f4985..5b4f35c 100644 --- a/default_config.ini +++ b/default_config.ini @@ -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=() diff --git a/helpers_gnu.sh b/helpers_gnu.sh index c6aeb2b..7730ab3 100644 --- a/helpers_gnu.sh +++ b/helpers_gnu.sh @@ -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 @@ -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