Remove all remaining references to setenv.h and setenv.bat.

This commit is contained in:
Gregory Nutt
2017-04-26 10:28:37 -06:00
parent 9aac1dd44d
commit 2f9028b547
11 changed files with 26 additions and 138 deletions
-43
View File
@@ -87,8 +87,6 @@ static char *g_verstring = "0.0"; /* Version String */
static char *g_srcdefconfig = NULL; /* Source defconfig file */
static char *g_srcmakedefs = NULL; /* Source Make.defs file */
static char *g_srcsetenvsh = NULL; /* Source setenv.sh file (optional) */
static char *g_srcsetenvbat = NULL; /* Source setenv.bat file (optional) */
static bool g_winnative = false; /* True: Windows native configuration */
static bool g_needapppath = true; /* Need to add app path to the .config file */
@@ -634,29 +632,6 @@ static void check_configuration(void)
}
g_srcmakedefs = strdup(g_buffer);
/* Windows native configurations may provide setenv.bat; POSIX
* configurations may provide a setenv.sh.
*/
if (g_winnative)
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.bat", g_configpath, g_delim);
debug("check_configuration: Checking %s\n", g_buffer);
if (verify_file(g_buffer))
{
g_srcsetenvbat = strdup(g_buffer);
}
}
else
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.sh", g_configpath, g_delim);
debug("check_configuration: Checking %s\n", g_buffer);
if (verify_file(g_buffer))
{
g_srcsetenvsh = strdup(g_buffer);
}
}
}
static void copy_file(const char *srcpath, const char *destpath, mode_t mode)
@@ -756,24 +731,6 @@ static void configure(void)
debug("configure: Copying from %s to %s\n", g_srcmakedefs, g_buffer);
copy_file(g_srcmakedefs, g_buffer, 0644);
/* Copy the setenv.sh file if have one and need one */
if (g_srcsetenvsh)
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.sh", g_topdir, g_delim);
debug("configure: Copying from %s to %s\n", g_srcsetenvsh, g_buffer);
copy_file(g_srcsetenvsh, g_buffer, 0755);
}
/* Copy the setenv.bat file if have one and need one */
if (g_srcsetenvbat)
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.bat", g_topdir, g_delim);
debug("configure: Copying from %s to %s\n", g_srcsetenvbat, g_buffer);
copy_file(g_srcsetenvbat, g_buffer, 0644);
}
/* If we did not use the CONFIG_APPS_DIR that was in the defconfig config file,
* then append the correct application information to the tail of the .config
* file
+1 -23
View File
@@ -108,22 +108,6 @@ if [ ! -r "${src_makedefs}" ]; then
exit 4
fi
src_setenv="${configpath}/setenv.sh"
unset have_setenv
if [ -r "${src_setenv}" ]; then
dest_setenv=${TOPDIR}/setenv.sh
have_setenv=y
else
src_setenv="${configpath}/setenv.bat"
if [ -r "${src_setenv}" ]; then
dest_setenv=${TOPDIR}/setenv.bat
have_setenv=y
else
unset src_setenv
fi
fi
src_config="${configpath}/defconfig"
dest_config="${TOPDIR}/.config"
@@ -134,8 +118,7 @@ fi
# Extract values needed from the defconfig file. We need:
# (1) The CONFIG_WINDOWS_NATIVE setting to know it this is target for a
# native Windows (meaning that we want setenv.bat vs setenv.sh and we need
# to use backslashes in the CONFIG_APPS_DIR setting).
# native Windows
# (2) The CONFIG_APPS_DIR setting to see if there is a configured location for the
# application directory. This can be overridden from the command line.
@@ -191,11 +174,6 @@ fi
install -m 644 "${src_makedefs}" "${dest_makedefs}" || \
{ echo "Failed to copy \"${src_makedefs}\"" ; exit 7 ; }
if [ "X${have_setenv}" = "Xy" ]; then
install "${src_setenv}" "${dest_setenv}" || \
{ echo "Failed to copy ${src_setenv}" ; exit 8 ; }
chmod 755 "${dest_setenv}"
fi
install -m 644 "${src_config}" "${dest_config}" || \
{ echo "Failed to copy \"${src_config}\"" ; exit 9 ; }