From 2f9028b54762e628ffc8ed847bef46d1cbf70047 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 26 Apr 2017 10:28:37 -0600 Subject: [PATCH] Remove all remaining references to setenv.h and setenv.bat. --- .gitignore | 2 -- Documentation/NuttxPortingGuide.html | 28 ++++-------------- Makefile.unix | 2 -- Makefile.win | 2 -- README.txt | 24 ++++------------ arch/avr/src/avr/Kconfig | 11 ------- configs/nucleo-144/README.txt | 4 +-- configs/nucleo-f4x1re/README.txt | 12 ++++---- configs/nucleo-l476rg/README.txt | 12 ++++---- tools/configure.c | 43 ---------------------------- tools/configure.sh | 24 +--------------- 11 files changed, 26 insertions(+), 138 deletions(-) diff --git a/.gitignore b/.gitignore index 42240bd35d..fd06298905 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,6 @@ core /.config.old /.version /Make.defs -/setenv.sh -/setenv.bat /nuttx /nuttx.* /nuttx-* diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 2e20d72ac9..0923a1786b 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -742,12 +742,10 @@ | `-- (board-specific source files) |-- <config1-dir> | |-- Make.defs -| |-- defconfig -| `-- setenv.sh +| `-- defconfig |-- <config2-dir> | |-- Make.defs -| |-- defconfig -| `-- setenv.sh +| `-- defconfig | ... `-- (other board-specific configuration sub-directories)/ @@ -780,7 +778,7 @@ The configs/<board-name>/ sub-directory holds all of the files that are necessary to configure NuttX for the particular board. A board may have various different configurations using the common source files. - Each board configuration is described by three files: Make.defs, defconfig, and setenv.sh. + Each board configuration is described by two files: Make.defs and defconfig. Typically, each set of configuration files is retained in a separate configuration sub-directory (<config1-dir>, <config2-dir>, .. in the above diagram). @@ -836,15 +834,6 @@ most C files in the system. -
  • -

    - setenv.sh: This is a script that can be included that will be installed at - the top level of the directory structure and can be sourced to set any - necessary environment variables. - You will most likely have to customize the default setenv.sh script in order - for it to work correctly in your environment. -

    -
  • 2.5.3 Supported Boards

    @@ -1364,7 +1353,6 @@ tools/

    @@ -1464,7 +1452,6 @@ tools/version.h -v 6.1 .version

    @@ -1477,15 +1464,12 @@ make That directory also holds:

    -The setenv.sh contains Linux/Cygwin environmental settings that are needed for the build. +Environment Variables. The specific environmental definitions are unique for each board but should include, as a minimum, updates to the PATH variable to include the full path to the architecture-specific toolchain identified in Make.defs. -The setenv.sh only needs to be source'ed at the beginning of a session. -The system can be re-made subsequently by just typing make.

    First Time Make. diff --git a/Makefile.unix b/Makefile.unix index d816947a38..b7bf86b805 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -558,8 +558,6 @@ ifeq ($(CONFIG_BUILD_2PASS),y) $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean endif $(call DELFILE, Make.defs) - $(call DELFILE, setenv.sh) - $(call DELFILE, setenv.bat) $(call DELFILE, .config) $(call DELFILE, .config.old) diff --git a/Makefile.win b/Makefile.win index feb94d5eb3..e1d9bc1278 100644 --- a/Makefile.win +++ b/Makefile.win @@ -536,8 +536,6 @@ ifeq ($(CONFIG_BUILD_2PASS),y) $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean endif $(call DELFILE, Make.defs) - $(call DELFILE, setenv.sh) - $(call DELFILE, setenv.bat) $(call DELFILE, .config) $(call DELFILE, .config.old) diff --git a/README.txt b/README.txt index de771d53c7..f06800339f 100644 --- a/README.txt +++ b/README.txt @@ -550,13 +550,6 @@ Instantiating "Canned" Configurations and link code. You may need to modify this file to match the specific needs of your toolchain. - Copy configs///setenv.sh to ${TOPDIR}/setenv.sh - - setenv.sh is an optional convenience file that I use to set - the PATH variable to the toolchain binaries. You may chose to - use setenv.sh or not. If you use it, then it may need to be - modified to include the path to your toolchain binaries. - Copy configs///defconfig to ${TOPDIR}/.config The defconfig file holds the actual build configuration. This @@ -928,10 +921,8 @@ Cross-Development Toolchains That README file contains suggestions and information about appropriate tools and development environments for use with your board. - In any case, the script, setenv.sh that was deposited in the top- - level directory when NuttX was configured should be edited to set - the path to where you installed the toolchain. The use of setenv.sh - is optional but can save a lot of confusion in the future. + In any case, the PATH environment variable will need to be updated to + include the loction where the build can find the toolchain binaries. NuttX Buildroot Toolchain ------------------------- @@ -1009,12 +1000,11 @@ Building NuttX builds in-place in the source tree. You do not need to create any special build directories. Assuming that your Make.defs is setup - properly for your tool chain and that setenv.sh contains the path to where - your cross-development tools are installed, the following steps are all that - are required to build NuttX: + properly for your tool chain and that PATH environment variable contains + the path to where your cross-development tools are installed, the + following steps are all that are required to build NuttX: cd ${TOPDIR} - . ./setenv.sh make At least one configuration (eagle100) requires additional command line @@ -1186,10 +1176,6 @@ Native Windows Build (2) it still lacks some of the creature-comforts of the more mature environments. - There is an alternative to the setenv.sh script available for the Windows - native environment: tools/configure.bat. See tools/README.txt for additional - information. - Installing GNUWin32 ------------------- diff --git a/arch/avr/src/avr/Kconfig b/arch/avr/src/avr/Kconfig index 2ddfa4e194..ef55b1d620 100644 --- a/arch/avr/src/avr/Kconfig +++ b/arch/avr/src/avr/Kconfig @@ -19,9 +19,6 @@ config AVR_WINAVR_TOOLCHAIN For Cygwin development environment on Windows machines, you can use WinAVR: http://sourceforge.net/projects/winavr/files/ - It is assumed in some places that WinAVR is installed at - C:/WinAVR. Edit the setenv.sh file if this is not the case. - WARNING: There is an incompatible version of cygwin.dll in the WinAVR/bin directory! Make sure that the path to the correct cygwin.dll file precedes the path to the WinAVR @@ -49,10 +46,6 @@ config AVR_CROSSPACK_TOOLCHAIN For OS X, the AVR CrossPack toolchain is supported: http://www.obdev.at/products/crosspack/index.html - It is assumed that /usr/local/CrossPack-AVR/bin is on the - user's path. Edit the setenv.sh file if this is not the - case. - config AVR_BUILDROOT_TOOLCHAIN bool "Buildroot" ---help--- @@ -60,10 +53,6 @@ config AVR_BUILDROOT_TOOLCHAIN http://sourceforge.net/projects/nuttx/files/buildroot/. See the following section for details on building this toolchain. - It is assumed in some places that buildroot toolchain is - available at ../buildroot/build_avr. Edit the setenv.sh - file if this is not the case. - endchoice # Toolchain menu "Atmel AVR Toolchain options" diff --git a/configs/nucleo-144/README.txt b/configs/nucleo-144/README.txt index cb6d65692f..db816dd5c6 100644 --- a/configs/nucleo-144/README.txt +++ b/configs/nucleo-144/README.txt @@ -173,8 +173,8 @@ Development Environment All testing has been conducted using the GNU toolchain from ARM for Linux. found here https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 - If you change the default toolchain, then you may also have to modify the PATH in - the setenv.h file if your make cannot find the tools. + If you change the default toolchain, then you may also have to modify the + PATH environment variable to include the path to the toolchain binaries. IDEs ==== diff --git a/configs/nucleo-f4x1re/README.txt b/configs/nucleo-f4x1re/README.txt index f22b3c6e19..e74a2ecb7d 100644 --- a/configs/nucleo-f4x1re/README.txt +++ b/configs/nucleo-f4x1re/README.txt @@ -140,8 +140,8 @@ GNU Toolchain Options CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE=y : Raisonance RIDE7 under Windows CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=n : NuttX buildroot under Linux or Cygwin (default) - If you change the default toolchain, then you may also have to modify the PATH in - the setenv.h file if your make cannot find the tools. + If you change the default toolchain, then you may also have to modify the + PATH environment variable to include the path to the toolchain binaries. NOTE: There are several limitations to using a Windows based toolchain in a Cygwin environment. The three biggest are: @@ -280,8 +280,8 @@ NuttX EABI "buildroot" Toolchain 7. make - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly built binaries. + 8. Make sure that the PATH variable includes the path to the newly built + binaries. See the file configs/README.txt in the buildroot source tree. That has more details PLUS some special instructions that you will need to follow if you are @@ -322,8 +322,8 @@ NXFLAT Toolchain 7. make - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly builtNXFLAT binaries. + 8. Make sure that the PATH variable includes the path to the newly built + NXFLAT binaries. mbed ==== diff --git a/configs/nucleo-l476rg/README.txt b/configs/nucleo-l476rg/README.txt index 497035e4a8..f216b93cf7 100644 --- a/configs/nucleo-l476rg/README.txt +++ b/configs/nucleo-l476rg/README.txt @@ -116,8 +116,8 @@ GNU Toolchain Options CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE=y : Raisonance RIDE7 under Windows CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=n : NuttX buildroot under Linux or Cygwin (default) - If you change the default toolchain, then you may also have to modify the PATH in - the setenv.h file if your make cannot find the tools. + If you change the default toolchain, then you may also have to modify the + PATH environment variable to include the path to the toolchain binaries. NOTE: There are several limitations to using a Windows based toolchain in a Cygwin environment. The three biggest are: @@ -262,8 +262,8 @@ NuttX EABI "buildroot" Toolchain 7. make - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly built binaries. + 8. Make sure that the PATH variable includes the path to the newly built + binaries. See the file configs/README.txt in the buildroot source tree. That has more details PLUS some special instructions that you will need to follow if you are @@ -304,8 +304,8 @@ NXFLAT Toolchain 7. make - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly builtNXFLAT binaries. + 8. Make sure that the PATH variable includes the path to the newly built + NXFLAT binaries. mbed ==== diff --git a/tools/configure.c b/tools/configure.c index fcf0407e48..8a40981d2b 100644 --- a/tools/configure.c +++ b/tools/configure.c @@ -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 diff --git a/tools/configure.sh b/tools/configure.sh index 3ee734d6e9..41e9223771 100755 --- a/tools/configure.sh +++ b/tools/configure.sh @@ -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 ; }