From: Chris Koeritz Date: Tue, 14 Jun 2022 22:59:15 +0000 (-0400) Subject: updates for less shelly behavior X-Git-Tag: 2.140.136^2~34 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=24cc3eb21befb743dfebaea4048e7082bb14a740;p=feisty_meow.git updates for less shelly behavior took out a few things that were previously generated everytime a build was performed, in fact, they were done per each makefile, potentially consuming a huge amount of windoze's spoons. windoze is just NOT good at running lots of little programs, and prefers the big blobby ones. so we're trying to cut down on the shelling out done by feisty builds by offloading them to the regeneration process. --- diff --git a/nucleus/tools/dependency_tool/CMakeLists.txt b/nucleus/tools/dependency_tool/CMakeLists.txt new file mode 100644 index 00000000..667c9481 --- /dev/null +++ b/nucleus/tools/dependency_tool/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.20) +project(makedep) +add_executable(makedep makedep.cpp) diff --git a/production/feisty_meow_config.ini b/production/feisty_meow_config.ini index 55781f81..022d4fc9 100644 --- a/production/feisty_meow_config.ini +++ b/production/feisty_meow_config.ini @@ -3,7 +3,7 @@ # specifies the version of the code that is being constructed here. major=2 minor=140 -revision=135 +revision=183 build=420 # specifies the remainder of the version record info. diff --git a/scripts/clam/cpp/preconditions.sh b/scripts/clam/cpp/preconditions.sh index 771f5a30..08d0222d 100644 --- a/scripts/clam/cpp/preconditions.sh +++ b/scripts/clam/cpp/preconditions.sh @@ -33,7 +33,7 @@ if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi # set versions on any extras that were specified in the makefile. if [ ! -z "$EXTRA_VERSIONS" ]; then for i in $EXTRA_VERSIONS; do - $CLAM_BINARIES/version_stamper$EXE_END $i $PARAMETER_FILE + $CLAM_BINARIES/version_stamper$EXE_ENDING $i $PARAMETER_FILE done fi @@ -54,8 +54,8 @@ if [ ! -z "$TEST_MAKEFILE" ]; then #??, STATIC_LIBRARY_DIR - #echo "compiler=$COMPILER" - #echo "OP_SYSTEM=$OP_SYSTEM" + #echo "compiler=$CLAM_COMPILER" + #echo "OPERATING_SYSTEM=$OPERATING_SYSTEM" #echo "checking for all local libs: $LOCAL_LIBS_USED" failed_check= diff --git a/scripts/clam/cpp/rules.def b/scripts/clam/cpp/rules.def index f18f1236..05b1f987 100644 --- a/scripts/clam/cpp/rules.def +++ b/scripts/clam/cpp/rules.def @@ -25,7 +25,7 @@ ifneq "$(NO_COMPILE)" "" endif # implement special bits for gnu on unix. -ifeq "$(COMPILER)" "GNU_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_LINUX" ifneq "$(USE_XWIN)" "" DEFINITIONS += __XWINDOWS__ __X__ LIBS_USED += Xm Xt X11 Xft Xp @@ -66,7 +66,7 @@ LIBS_USED += Xmu endif # some special code for gnu compiler on windows. -ifeq "$(COMPILER)" "GNU_WINDOWS" +ifeq "$(CLAM_COMPILER)" "GNU_WINDOWS" ifneq "$(USE_SSL)" "" LIBS_USED += ssl crypto @@ -103,7 +103,7 @@ endif ############################################################################### -ifeq "$(COMPILER)" "GNU_DARWIN" +ifeq "$(CLAM_COMPILER)" "GNU_DARWIN" # finds the crypto code on macos. HEADER_SEARCH_PATH += /usr/local/opt/openssl/include LIBRARY_SEARCH_PATH += /usr/local/opt/openssl/lib/ @@ -174,7 +174,7 @@ OBJECTS = $(TEMP_OBJ4) ACTUAL_OBJECTS = $(OBJECTS) $(EXTRA_OBJECTS) # Updates the search path for the compiler and local libraries. -BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS) +BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(FEISTY_MEOW_CPP_HEADERS) $(SEARCH_DIRS) HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR) LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \ @@ -187,8 +187,8 @@ COMPILER_FLAGS += $(HEADER_SEARCH_PATH:%=-I%) $(DEFINITIONS:%=-D%) $(UNDEFINITIO # The load flags are updated by looking for code libraries in the directories # to search and by adding all of the code libraries that are used. LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%) -ifeq "$(OP_SYSTEM)" "UNIX" - ifneq "$(COMPILER)" "GNU_DARWIN" +ifeq "$(OPERATING_SYSTEM)" "UNIX" + ifneq "$(CLAM_COMPILER)" "GNU_DARWIN" LOAD_FLAG_PREFIX += -Xlinker --start-group LOAD_FLAG_SUFFIX += -Xlinker --end-group endif @@ -209,8 +209,8 @@ EXE_CPPS = $(EXE_TEMP_3:%.exe=%.cpp) MULTI_BUILD_CMD = $(CC) $(COMPILER_FLAGS) -c `cat $(BUILD_LIST_FILE)` $(OBJECT_NAME_FLAG)$(OBJECT_DIR)/ ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" - VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc + ifneq "$(CLAM_VERSION_RC_ROOT)" "" + VERSION_TARGET = $(CLAM_VERSION_RC_ROOT)_version.rc endif endif @@ -355,7 +355,7 @@ $(STATIC_LIBRARY_DIR)/%.library: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LO $(HIDER)echo Building Static Library [$(notdir $@)] @echo $@ >$(DIRTY_FILE) $(CATCHER)$(LIBRARY_TOOL) $(LIBRARIAN_FLAGS) $(CREATE_LIBRARY_FLAG)$@ $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) - ifneq "$(OP_SYSTEM)" "UNIX" + ifneq "$(OPERATING_SYSTEM)" "UNIX" $(HIDER)ranlib $@ $(HIDER)rm -f $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) $(HIDER)ln -s $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) @@ -388,10 +388,10 @@ $(DYNAMIC_LIBRARY_DIR)/%.dll: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL echo about to run link tool. $(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_RESX_FLAGS) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) echo ran link tool. - ifeq "$(COMPILER_VERSION)" "8" + ifeq "$(CLAM_COMPILER_VERSION)" "8" $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "2" endif - ifeq "$(COMPILER_VERSION)" "10" + ifeq "$(CLAM_COMPILER_VERSION)" "10" $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "2" endif ifneq "$(VCPP_VISTA_ICON)" "" @@ -405,7 +405,7 @@ endif ifeq "$(NO_COMPILE)" "" $(DYNAMIC_LIBRARY_DIR)/%.so: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE) - ifeq "$(COMPILER:%_LINUX=LINUX)" "LINUX" + ifeq "$(CLAM_COMPILER:%_LINUX=LINUX)" "LINUX" $(HIDER)echo Shared [$@] @echo $@ >$(DIRTY_FILE) $(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ $(LOAD_FLAG_PREFIX) -shared -Wl,-soname,$*.so $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)%) $(LOAD_FLAG_SUFFIX) @@ -456,10 +456,10 @@ endif #no_compile # handles creating version resource files if this project has a version.ini. ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" + ifneq "$(CLAM_VERSION_RC_ROOT)" "" # only redo the version resource if it or version.ini is out of date. %_version.rc: version.ini $(PARAMETER_FILE) - $(CATCHER)$(CLAM_BINARIES)/version_stamper$(EXE_END) . $(FEISTY_MEOW_GENERATED_STORE)/versions $(PARAMETER_FILE) + $(CATCHER)$(CLAM_BINARIES)/version_stamper$(EXE_ENDING) . $(FEISTY_MEOW_GENERATED_STORE)/versions $(PARAMETER_FILE) endif endif @@ -474,8 +474,6 @@ ifeq "$(TYPE)" "hierarchy" endif ifneq "$(CLEAN)" "" NO_DEPS = t - # no dependencies get left when we are cleaning up. -# $(shell rm -f $(DEPS_FILE)) endif ifneq "$(NO_COMPILE)" "" # non compiling projects do not need dependencies. @@ -527,17 +525,17 @@ else else # lax dependencies means create if missing or if parm file changed. $(DEPS_FILE): $(PARAMETER_FILE) endif # !lax dependencies. - ifneq "$(VERSION_RC_ROOT)" "" + ifneq "$(CLAM_VERSION_RC_ROOT)" "" ifeq "$(OMIT_VERSIONS)" "" - $(DEPS_FILE): $(VERSION_RC_ROOT)_version.rc + $(DEPS_FILE): $(CLAM_VERSION_RC_ROOT)_version.rc endif endif @echo Dependencies [$(notdir $@)] -$(HIDESH)$(CLAM_SCRIPTS)/cpp/preconditions.sh @touch $@ # @echo dep adds: $(DEPENDENCY_ADDITIONS) - @$(CLAM_BINARIES)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) -# $(CATCHER)$(CLAM_BINARIES)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) + @$(CLAM_BINARIES)/makedep$(EXE_ENDING) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) +# $(CATCHER)$(CLAM_BINARIES)/makedep$(EXE_ENDING) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) @echo $@ >$(SUBMAKE_FLAG) endif # non-compile. else # cleaning. @@ -581,7 +579,7 @@ pre_compilation: ############################################################################ # calls the script for copying the final products to the library directory. -# we don't bother reporting errors from touch since there will sometimes +# we do not bother reporting errors from touch since there will sometimes # not be any objects in the final directory. post_compilation: $(HIDESH)$(CLAM_SCRIPTS)/cpp/postconditions.sh diff --git a/scripts/clam/cpp/variables.def b/scripts/clam/cpp/variables.def index cf14aa5a..358e41a4 100644 --- a/scripts/clam/cpp/variables.def +++ b/scripts/clam/cpp/variables.def @@ -25,45 +25,45 @@ include variables.def ############################################################################### -# BASE_CPU is a flag that distinguishes the type of processor, if necessary. -export BASE_CPU -#BASE_CPU := m68k = motorola 68000 series | m68340 = motorola 68340 -# | x86 = intel x86 | ppc = power pc | arm = ARM core - -# set the CPU to a default if it has not been set previously. -ifeq "$(BASE_CPU)" "" - BASE_CPU := $(shell machine 2>/dev/null || arch 2>/dev/null || uname -m 2>/dev/null || echo i686) -endif - -# COMPILER is a flag that specifies the compiler that will be used to build -# code. It is mainly used within CLAM itself for determining the proper -# compiler flags. -export COMPILER -#COMPILER := GNU_LINUX | GNU_ARM_LINUX | GNU_DARWIN | GNU_WINDOWS - -# choose a default compiler if none was specified. -ifeq "$(COMPILER)" "" - ifeq "$(OP_SYSTEM)" "UNIX" - ifeq "$(OS_SUBCLASS)" "darwin" - COMPILER := GNU_DARWIN - else - COMPILER := GNU_LINUX - endif - endif - ifeq "$(OP_SYSTEM)" "WIN32" - COMPILER := GNU_WINDOWS - endif - ifeq "$(COMPILER)" "" - # if we get into this case, we have no idea how to set the default - # compiler. you may need to change the above logic for guessing it - # anyhow. but we will go with our favorite default. - COMPILER := GNU_LINUX - endif -endif - -# COMPILER_VERSION specifies the version of a particular compiler, if this is +## # CLAM_BASE_CPU is a flag that distinguishes the type of processor, if necessary. +## export CLAM_BASE_CPU +## #CLAM_BASE_CPU := m68k = motorola 68000 series | m68340 = motorola 68340 +## # | x86 = intel x86 | ppc = power pc | arm = ARM core +## +## # set the CPU to a default if it has not been set previously. +## ifeq "$(CLAM_BASE_CPU)" "" +## CLAM_BASE_CPU := $(shell machine 2>/dev/null || arch 2>/dev/null || uname -m 2>/dev/null || echo i686) +## endif + +## # CLAM_COMPILER is a flag that specifies the compiler that will be used to build +## # code. It is mainly used within CLAM itself for determining the proper +## # compiler flags. +## export CLAM_COMPILER +## #CLAM_COMPILER := GNU_LINUX | GNU_ARM_LINUX | GNU_DARWIN | GNU_WINDOWS +## +## # choose a default compiler if none was specified. +## ifeq "$(CLAM_COMPILER)" "" +## ifeq "$(OPERATING_SYSTEM)" "UNIX" +## ifeq "$(CLAM_OS_SUBCLASS)" "darwin" +## CLAM_COMPILER := GNU_DARWIN +## else +## CLAM_COMPILER := GNU_LINUX +## endif +## endif +## ifeq "$(OPERATING_SYSTEM)" "WIN32" +## CLAM_COMPILER := GNU_WINDOWS +## endif +## ifeq "$(CLAM_COMPILER)" "" +## # if we get into this case, we have no idea how to set the default +## # compiler. you may need to change the above logic for guessing it +## # anyhow. but we will go with our favorite default. +## CLAM_COMPILER := GNU_LINUX +## endif +## endif + +# CLAM_COMPILER_VERSION specifies the version of a particular compiler, if this is # needed to distinguish how the code is built. -export COMPILER_VERSION +export CLAM_COMPILER_VERSION ############################################################################### @@ -176,9 +176,9 @@ export OUTPUT_ROOT = $(CLAM_TMP)/objects # "CPU_BUILD_DIR" distinguishes object directories by including the CPU # name and the type of build. ifneq "$(DEBUG)" "" - CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)dbg + CPU_BUILD_DIR = $(CLAM_BASE_CPU)_$(PLATFORM_ADD_IN)dbg else - CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel + CPU_BUILD_DIR = $(CLAM_BASE_CPU)_$(PLATFORM_ADD_IN)rel endif # "BASE_OUTPUT_PATH" is the parent directory of objects for this type of @@ -186,7 +186,7 @@ endif export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR) # special case when doing arm-linux builds -ifeq "$(COMPILER)" "GNU_ARM_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_ARM_LINUX" export TARGETS_STORE = $(FEISTY_MEOW_APEX)/$(CPU_BUILD_DIR) # special output directory for firmware does not include CPU name because # the repository already include the CPU name @@ -210,18 +210,18 @@ export STATIC_LIBRARY_DIR = $(TARGETS_STORE) # the binaries are added to access the system_helper.h file. HEADER_SEARCH_PATH = $(FEISTY_MEOW_GENERATED_STORE)/versions $(FEISTY_MEOW_BINARIES) -# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found. -ifeq "$(HOOPLE_HEADERS)" "" -#seems like some of this is redundant with earlier 3rdparty exploring. - LOCUS_LIBRARY_HEADERS = $(shell bash -c '\ - if [ -d "$(FEISTY_MEOW_APEX)/nucleus" ]; then \ - echo "$(FEISTY_MEOW_APEX)/nucleus" "$(FEISTY_MEOW_APEX)/octopi" "$(FEISTY_MEOW_APEX)/graphiq" ; \ - else \ - echo ""; \ - fi | tr "\\\\" / | sed -e "s/\([a-zA-Z]\):\/\([^ ]*\)/\/cygdrive\/\1\/\2/g" ') - # above assumes cygwin support for windows! was assuming msys support. - HOOPLE_HEADERS := $(shell $(FIND) $(LOCUS_LIBRARY_HEADERS) -mindepth 1 -maxdepth 1 -type d ) -endif +## # "FEISTY_MEOW_CPP_HEADERS" are locations where the HOOPLE headers can be found. +## ifeq "$(FEISTY_MEOW_CPP_HEADERS)" "" +## #seems like some of this is redundant with earlier 3rdparty exploring. +## LOCUS_LIBRARY_HEADERS = $(shell bash -c '\ +## if [ -d "$(FEISTY_MEOW_APEX)/nucleus" ]; then \ +## echo "$(FEISTY_MEOW_APEX)/nucleus" "$(FEISTY_MEOW_APEX)/octopi" "$(FEISTY_MEOW_APEX)/graphiq" ; \ +## else \ +## echo ""; \ +## fi | tr "\\\\" / | sed -e "s/\([a-zA-Z]\):\/\([^ ]*\)/\/cygdrive\/\1\/\2/g" ') +## # above assumes cygwin support for windows! was assuming msys support. +## FEISTY_MEOW_CPP_HEADERS := $(shell $(FIND) $(LOCUS_LIBRARY_HEADERS) -mindepth 1 -maxdepth 1 -type d ) +## endif # "LOCAL_HEADERS" are overrides that go first in the header search path. LOCAL_HEADERS = $(THIRD_PARTY_DIR) @@ -382,9 +382,12 @@ LIBRARY_PATH_FLAG = -L # The name of the library creator tool. #LIBRARY_TOOL = -# the root name of the version file. This is currently irrelevant on -# non-windoze platforms. -VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/rc_name.sh) +ifeq "$(OPERATING_SYSTEM)" "WIN32" + # the root name of the version file. This is currently irrelevant on + # non-windoze platforms. + #CLAM_VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/rc_name.sh) + #hmmm: also currently irrelevant since we are only doing static builds. +endif ifneq "$(CONSOLE_MODE)" "" # this definition can be used to signal different behavior when the app is @@ -405,8 +408,8 @@ DYNLIB_ENDING = .so # Compiler Dependent Flags # -# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. -export COMPILER_ROOT_DIR +## # "CLAM_COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. +## export CLAM_COMPILER_ROOT_DIR # "COMPILER_HEADER_DIR" is where the compiler headers are. export COMPILER_HEADER_DIR # "COMPILER_LIBRARY_DIR" is where archived libraries are. @@ -431,24 +434,24 @@ endif # compiler specific section below. ############################################################################ -ifeq "$(COMPILER)" "GNU_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_LINUX" # Unix GNU compiler... CC = g++ - COMPILER_ROOT_DIR = / +# CLAM_COMPILER_ROOT_DIR = / PLATFORM_ADD_IN = linux_ - ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) +# ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) + export CLAM_COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(CLAM_COMPILER) $(CLAM_COMPILER_ROOT_DIR) ) DEFINITIONS += _FILE_OFFSET_BITS=64 DEPENDENCY_DEFINITIONS += NO_VERSION - DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/x86_64-linux-gnu/$(COMPILER_VERION)/include -X/usr/include/x86_64-linux-gnu -X/usr/include/i386-linux-gnu + DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(CLAM_COMPILER_VERSION) -X/usr/include/c++/$(CLAM_COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/x86_64-linux-gnu/$(COMPILER_VERION)/include -X/usr/include/x86_64-linux-gnu -X/usr/include/i386-linux-gnu # "USE_XWIN" specifies that this project needs X window system support. #USE_XWIN = - ifeq "x86_64" "$(ARCHITECTURE)" + ifeq "x86_64" "$(CLAM_BASE_CPU)" COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64 else COMPILER_LIBRARY_DIR = /lib /usr/lib /usr/local/lib @@ -515,13 +518,16 @@ endif ############################################################################ -ifeq "$(COMPILER)" "GNU_ARM_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_ARM_LINUX" # ARM-linux GNU compiler... - COMPILER_ROOT_DIR = /usr/local/arm-linux - CC = $(COMPILER_ROOT_DIR)/bin/g++ + +## CLAM_COMPILER_ROOT_DIR = /usr/local/arm-linux +#hmmm: the above is the one we may need to integrate into build_variables.sh + + CC = $(CLAM_COMPILER_ROOT_DIR)/bin/g++ PLATFORM_ADD_IN = linux_ - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) + export CLAM_COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(CLAM_COMPILER) $(CLAM_COMPILER_ROOT_DIR) ) SNAPGEAR_ROOT_DIR = $(HOME)/snapgear @@ -529,10 +535,10 @@ ifeq "$(COMPILER)" "GNU_ARM_LINUX" COMPILER_HEADER_DIR = $(SNAPGEAR_ROOT_DIR)/linux-2.4.x/include # COMPILER_HEADER_DIR += $(SNAPGEAR_ROOT_DIR)/include - COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/lib + COMPILER_HEADER_DIR += $(CLAM_COMPILER_ROOT_DIR)/include $(CLAM_COMPILER_ROOT_DIR)/lib COMPILER_HEADER_DIR += /usr/local/lib/gcc-lib/arm-linux/3.3.2/include - COMPILER_LIBRARY_DIR = $(SNAPGEAR_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/lib/be + COMPILER_LIBRARY_DIR = $(SNAPGEAR_ROOT_DIR)/lib $(CLAM_COMPILER_ROOT_DIR)/lib/be DEFINITIONS += linux __linux__ unix UNIX __UNIX__ __LINUX__ @@ -541,12 +547,12 @@ ifeq "$(COMPILER)" "GNU_ARM_LINUX" COMPILER_FLAGS += -Wall -Werror endif - LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/ar + LIBRARY_TOOL = $(CLAM_COMPILER_ROOT_DIR)/bin/ar LIB_PREFIX = lib CREATE_LIBRARY_FLAG += -r # space on end is significant. - LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/g++ + LINK_TOOL = $(CLAM_COMPILER_ROOT_DIR)/bin/g++ LINKER_OUTPUT_FLAG = -o EXE_FLAGS = -mbig-endian LOAD_FLAG_PREFIX += -v -mbig-endian @@ -561,24 +567,25 @@ endif ############################################################################ -ifeq "$(COMPILER)" "GNU_WINDOWS" +ifeq "$(CLAM_COMPILER)" "GNU_WINDOWS" # GNU compiler for MS Windoze... CC = g++ - COMPILER_ROOT_DIR = / - ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) -#hmmm: below fixes nothing! argh! -# ARCHITECTURE = i386 +## CLAM_COMPILER_ROOT_DIR = / + +## ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) +##hmmm: below fixes nothing! argh! +## ARCHITECTURE = i386 - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) + export CLAM_COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(CLAM_COMPILER) $(CLAM_COMPILER_ROOT_DIR) ) -# RC := $(COMPILER_ROOT_DIR)/bin/windres +# RC := $(CLAM_COMPILER_ROOT_DIR)/bin/windres PLATFORM_ADD_IN = w32_ - COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/include/c++/3.4.2 -#$(COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include -###$(COMPILER_ROOT_DIR)/usr/include/mingw $(COMPILER_ROOT_DIR)/usr/include $(COMPILER_ROOT_DIR)/usr/include/w32api $(COMPILER_ROOT_DIR)/usr/include/extras + COMPILER_HEADER_DIR = $(CLAM_COMPILER_ROOT_DIR)/include $(CLAM_COMPILER_ROOT_DIR)/include/c++/3.4.2 +#$(CLAM_COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include +###$(CLAM_COMPILER_ROOT_DIR)/usr/include/mingw $(CLAM_COMPILER_ROOT_DIR)/usr/include $(CLAM_COMPILER_ROOT_DIR)/usr/include/w32api $(CLAM_COMPILER_ROOT_DIR)/usr/include/extras - COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib + COMPILER_LIBRARY_DIR = $(CLAM_COMPILER_ROOT_DIR)/lib DEFINITIONS += __GNU_WINDOWS__ _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32 ###NOOOOOO __USE_W32_SOCKETS #__cplusplus @@ -603,19 +610,19 @@ endif ############################################################################ -ifeq "$(COMPILER)" "GNU_DARWIN" +ifeq "$(CLAM_COMPILER)" "GNU_DARWIN" # Darwin kernel GNU compiler... really more general macos (MacOS) here these days. CC = g++ - COMPILER_ROOT_DIR = / +## CLAM_COMPILER_ROOT_DIR = / PLATFORM_ADD_IN = darwin - ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) +## ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) + export CLAM_COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(CLAM_COMPILER) $(CLAM_COMPILER_ROOT_DIR) ) DEFINITIONS += _FILE_OFFSET_BITS=64 DEPENDENCY_DEFINITIONS += NO_VERSION -# DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include +# DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(CLAM_COMPILER_VERSION) -X/usr/include/c++/$(CLAM_COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(CLAM_COMPILER_VERSION)/include DEPENDENCY_ADDITIONS = -X/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include COMPILER_HEADER_DIR := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include @@ -683,7 +690,7 @@ endif # these activities are done after the compiler specific stuff. # add a definition for programs to be able to differentiate the versions. -DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION) +DEFINITIONS += CLAM_COMPILER_VERSION=$(CLAM_COMPILER_VERSION) # set a variable that scripts can use to get most of the definitions. export VARIABLE_DEFINITION_SET := $(DEFINITIONS) diff --git a/scripts/clam/target_runner.sh b/scripts/clam/target_runner.sh index 553463f0..c61bbc05 100644 --- a/scripts/clam/target_runner.sh +++ b/scripts/clam/target_runner.sh @@ -23,7 +23,7 @@ if [ ! -z "${RUN_TARGETS}" -a ! -z "${RUN_ALL_TESTS}" ]; then total_exitval=0; for program_name in ${RUN_TARGETS}; do base=$(basename $program_name); - if [ "$OP_SYSTEM" == "WIN32" ]; then + if [ "$OPERATING_SYSTEM" == "WIN32" ]; then # extra step to force win32 applications to stay held in our grip, # since they will float off and appear to have stopped when # run by cygwin. but by grabbing the i/o stream, we know it's diff --git a/scripts/clam/variables.def b/scripts/clam/variables.def index 03f17772..be48c32e 100644 --- a/scripts/clam/variables.def +++ b/scripts/clam/variables.def @@ -11,53 +11,53 @@ ############################################################################### -# OP_SYSTEM is a flag that specifies the operating system under which -# the makefile system is executing. -export OP_SYSTEM -#OP_SYSTEM := UNIX = unix | OS2 = ibm os/2 | SYSV = v unix | DOS = pc dos -# | WIN32 = ms-win32 / NT. - -# OS_SUBCLASS is a finer differentiation of the OP_SYSTEM. currently only -# the darwin subclass for unix is considered. -export OS_SUBCLASS -#OS_SUBCLASS := darwin | - -# set the default operating system when none is specified. -ifeq "$(OP_SYSTEM)" "" -#is there a nice way to join the greps? - IS_UNIX := $(shell uname | grep -i linux) - ifeq "$(IS_UNIX)" "" - IS_UNIX := $(shell uname | grep -i unix) - ifeq "$(IS_UNIX)" "" - IS_UNIX := $(shell uname | grep -i darwin) - ifneq "$(IS_UNIX)" "" - # pick the subclass now that we know this is darwin. - OS_SUBCLASS := darwin - endif - endif - endif - IS_DOS := $(shell uname | grep -i cygwin) - ifeq "$(IS_DOS)" "" - IS_DOS := $(shell uname | grep -i ming) - endif - ifneq "$(IS_UNIX)" "" - OP_SYSTEM := UNIX - else - ifneq "$(IS_DOS)" "" - OP_SYSTEM := WIN32 - else - # we do not have other comparisons yet, so we will assume unix. fix this - # if it is not your default operating system. - OP_SYSTEM := UNIX - endif - endif -endif - -# now set a special ending for EXE files, which differs between the OSes. -export EXE_END -ifeq "$(OP_SYSTEM)" "WIN32" - EXE_END := .exe -endif +## # OPERATING_SYSTEM is a flag that specifies the operating system under which +## # the makefile system is executing. +## export OPERATING_SYSTEM +## #OPERATING_SYSTEM := UNIX = unix | OS2 = ibm os/2 | SYSV = v unix | DOS = pc dos +## # | WIN32 = ms-win32 / NT. + +## # CLAM_OS_SUBCLASS is a finer differentiation of the OPERATING_SYSTEM. currently only +## # the darwin subclass for unix is considered. +## export CLAM_OS_SUBCLASS +## #CLAM_OS_SUBCLASS := darwin | + +## # set the default operating system when none is specified. +## ifeq "$(OPERATING_SYSTEM)" "" +## #is there a nice way to join the greps? +## CLAM_ON_UNIX := $(shell uname | grep -i linux) +## ifeq "$(CLAM_ON_UNIX)" "" +## CLAM_ON_UNIX := $(shell uname | grep -i unix) +## ifeq "$(CLAM_ON_UNIX)" "" +## CLAM_ON_UNIX := $(shell uname | grep -i darwin) +## ifneq "$(CLAM_ON_UNIX)" "" +## # pick the subclass now that we know this is darwin. +## CLAM_OS_SUBCLASS := darwin +## endif +## endif +## endif +## CLAM_ON_DOS := $(shell uname | grep -i cygwin) +## ifeq "$(CLAM_ON_DOS)" "" +## CLAM_ON_DOS := $(shell uname | grep -i ming) +## endif +## ifneq "$(CLAM_ON_UNIX)" "" +## OPERATING_SYSTEM := UNIX +## else +## ifneq "$(CLAM_ON_DOS)" "" +## OPERATING_SYSTEM := WIN32 +## else +## # we do not have other comparisons yet, so we will assume unix. fix this +## # if it is not your default operating system. +## OPERATING_SYSTEM := UNIX +## endif +## endif +##endif + +## # now set a special ending for EXE files, which differs between the OSes. +## export EXE_ENDING +## ifeq "$(OPERATING_SYSTEM)" "WIN32" +## EXE_ENDING := .exe +## endif ############################################################################### diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 8fdb80d5..d2b0bdaa 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -427,12 +427,12 @@ if [ -z "$skip_all" ]; then DOSSYHOME="$(cygpath -am "$HOME")" fi - if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then - # unless this flag is set, in which case we force dos slashes. - echo "$1" | sed -e "s?^$HOME?$DOSSYHOME?g" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' - else +# if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then +# # unless this flag is set, in which case we force dos slashes. +# echo "$1" | sed -e "s?^$HOME?$DOSSYHOME?g" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' +# else echo "$1" | sed -e "s?^$HOME?$DOSSYHOME?g" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' - fi +# fi } # # switches from an X:/ form to a /cygdrive/X/path form. this is only useful diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index 2db3e06e..43f386c6 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -90,10 +90,67 @@ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "[FEISTY_MEOW_APEX is $FEISTY_MEOW_APEX]" fi -#if [ "$OPERATING_SYSTEM" == "WIN32" ]; then -# # harsh on the paths and make them use backwards slashes. -# export SERIOUS_SLASH_TREATMENT=true -#fi +# set some extra variables that clam uses. + +# CLAM_ON_UNIX or CLAM_ON_DOS might get defined here. +# we also can set OS_SUBCLASS if we detect darwin. +if [ $OPERATING_SYSTEM == UNIX ]; then + export CLAM_ON_UNIX=$(uname) + if [[ $CLAM_ON_UNIX =~ .*[Dd]arwin.* ]]; then + # pick the subclass now that we know this is darwin. + export CLAM_OS_SUBCLASS=darwin + fi +elif [ $OPERATING_SYSTEM == WIN32 ]; then + export CLAM_ON_DOS=$(uname) +else + echo "Unknown operating system--clam will not build well here." +fi + +# CLAM_BASE_CPU is a flag that distinguishes the type of processor, if necessary. +export CLAM_BASE_CPU="$(machine 2>/dev/null || arch 2>/dev/null || uname -m 2>/dev/null || echo i686)" + +# "FEISTY_MEOW_CPP_HEADERS" are folders where our C and C++ header files can be found. +# we'll compute the set of folders as best we can below. +if [ -d "$FEISTY_MEOW_APEX/nucleus" ]; then + # just assumes we're at home and know our header locations under the feisty meow hierarchy. + export LOCUS_LIBRARY_HEADERS="$FEISTY_MEOW_APEX/nucleus $FEISTY_MEOW_APEX/octopi $FEISTY_MEOW_APEX/graphiq" +else + export LOCUS_LIBRARY_HEADERS= +fi + ####blech! maybe not needed now? was involved above. | tr "\\\\" / | sed -e "s/\([a-zA-Z]\):\/\([^ ]*\)/\/cygdrive\/\1\/\2/g" ') +export FEISTY_MEOW_CPP_HEADERS=$(find $LOCUS_LIBRARY_HEADERS -mindepth 1 -maxdepth 1 -type d | grep -v "\.settings" ) + +# the root name of the version file. This is currently irrelevant on +# non-windoze platforms. +export CLAM_VERSION_RC_ROOT=$(bash $CLAM_SCRIPTS/cpp/rc_name.sh) + +# CLAM_COMPILER is the C/C++ compiler application that builds our code. +# The variable is mainly used within CLAM itself for determining the proper +# compiler flags. +export CLAM_COMPILER +if [ "$OPERATING_SYSTEM" == UNIX ]; then + if [ "$CLAM_OS_SUBCLASS" == darwin ]; then + CLAM_COMPILER=GNU_DARWIN + else + CLAM_COMPILER=GNU_LINUX + fi +elif [ "$OPERATING_SYSTEM" == WIN32 ]; then + CLAM_COMPILER=GNU_WINDOWS +fi +if [ -z "$CLAM_COMPILER" ]; then + # if we get into this case, we have no idea how to set the default compiler. + # so... pick a fun default. + CLAM_COMPILER=GNU_LINUX +fi + +# "CLAM_COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. +# it is generally the top of the OS, although some variants may need this +# modified (e.g., gnu arm linux, but we haven't built on that in a bit). +export CLAM_COMPILER_ROOT_DIR="/" + +# CLAM_COMPILER_VERSION specifies the version of the particular compiler we're using. +# this is sometimes needed to distinguish how the code is built or where headers/libraries are found. +export CLAM_COMPILER_VERSION=$(bash $CLAM_SCRIPTS/cpp/get_version.sh $CLAM_COMPILER $CLAM_COMPILER_ROOT_DIR ) # new BUILD_TOP variable points at the utter top-most level of any files # in the building hierarchy. diff --git a/scripts/generator/produce_feisty_meow.sh b/scripts/generator/produce_feisty_meow.sh index fb7a0654..3985f095 100644 --- a/scripts/generator/produce_feisty_meow.sh +++ b/scripts/generator/produce_feisty_meow.sh @@ -88,7 +88,7 @@ function update_system_helper_header() fi # set the cygwin root path if we're on cygwin. - whichable cygpath + whichable cygpath &>/dev/null if [ $? -eq 0 ]; then # found cygpath, so run it now to get the dossy path of the root ('/' folder). found_root="$(cygpath -w -m /)" diff --git a/testkit/library/helper_methods.sh b/testkit/library/helper_methods.sh index 7be57812..1bdb6294 100644 --- a/testkit/library/helper_methods.sh +++ b/testkit/library/helper_methods.sh @@ -294,12 +294,12 @@ function test_fuse_mount() # switches from a /X/path form to an X:/ form. this also processes cygwin paths. function unix_to_dos_path() { # we usually remove dos slashes in favor of forward slashes. - if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then - # unless this flag is set, in which case we force dos slashes. - echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' - else +# if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then +# # unless this flag is set, in which case we force dos slashes. +# echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' +# else echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' - fi +# fi } # switches from an X:/ form to an /X/path form.