diff --git a/Makefile b/Makefile index fd47ff75..ba43b81c 100644 --- a/Makefile +++ b/Makefile @@ -134,22 +134,13 @@ endif # libraries. ICG_EXE := ${TRICK_HOME}/bin/trick-ICG -################################################################################ -# Formating Variables -################################################################################ - -# Appends a newline to the -w / --print-directories leaving message for make. -# This helps break up directory traversal into blocks. -MAKE_TRAVERSAL_NEWLINE := | sed '/^make.*: Leaving directory/a\ ' - ################################################################################ # RULES ################################################################################ # DEFAULT TARGET # 1 Build Trick-core and Trick Data-products. all: no_dp dp - @ echo -e "\e[32mTrick has been successfully compiled.\e[34m" - @date + @ echo ; echo "Trick compilation complete:" ; date ifeq ($(USE_JAVA), 1) all: java @@ -158,11 +149,10 @@ endif #------------------------------------------------------------------------------- # 1.1 Build Trick-core no_dp: $(TRICK_LIB) $(TRICK_SWIG_LIB) - @ echo -e "\e[32mTrick libraries compiled:\e[34m" ; date ; echo -e "\e[0m" + @ echo ; echo "Trick libs compiled:" ; date # 1.1.1 Build libTrick.a $(TRICK_LIB): $(SIM_SERV_DIRS) $(UTILS_DIRS) | $(TRICK_LIB_DIR) - @ echo -e "\e[34m[---Building $@---]\e[0m" ar crs $@ $(SIM_SERV_OBJS) $(UTILS_OBJS) ifeq ($(USE_ER7_UTILS), 1) @@ -170,27 +160,23 @@ ER7_UTILS_LIB = $(TRICK_LIB_DIR)/liber7_utils.a no_dp: $(ER7_UTILS_LIB) $(ER7_UTILS_LIB): $(ER7_UTILS_DIRS) | $(TRICK_LIB_DIR) - @ echo -e "\e[34m[---Building $@---]\e[0m" ar crs $@ $(ER7_UTILS_OBJS) endif # 1.1.1.1 Compile the objects in the specified sim_services directories. .PHONY: $(SIM_SERV_DIRS) $(SIM_SERV_DIRS): icg_sim_serv $(TRICK_LIB_DIR) - @ echo -e "\e[34m[---Building $@---]\e[0m" @ $(MAKE) -C $@ trick # 1.1.1.2 Compile the objects in the specified utils directories. .PHONY: $(UTILS_DIRS) $(UTILS_DIRS): icg_sim_serv - @ echo -e "\e[34m[---Building $@---]\e[0m" @ $(MAKE) -C $@ trick # 1.1.1.3 Compile the objects in the specified er7_utils directories. .PHONY: $(ER7_UTILS_DIRS) $(ER7_UTILS_DIRS): TRICK_CXXFLAGS += -Wno-unused-parameter $(ER7_UTILS_DIRS): make_er7_makefiles icg_sim_serv - @ echo -e "\e[34m[---Building $@---]\e[0m" @ $(MAKE) -C $@ trick .PHONY: make_er7_makefiles @@ -207,12 +193,10 @@ endif # header files. .PHONY: icg_sim_serv icg_sim_serv: $(ICG_EXE) - @ echo -e "\e[34m[---Generating Interface Code---]\e[0m" ${TRICK_HOME}/bin/trick-ICG -s -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh # 1.1.1.4.1 Build the Interface Code Generator (ICG) executable. $(ICG_EXE) : - @ echo -e "\e[34m[---Building Interface Code Generator---]\e[0m" $(MAKE) -C trick_source/codegen/Interface_Code_Gen # 1.1.1.5 Create Trick Library directory. @@ -221,25 +205,21 @@ $(TRICK_LIB_DIR): # 1.1.2 Build libTrick_pyip.a (Swig Lib) $(TRICK_SWIG_LIB): $(SWIG_DIRS) | $(TRICK_LIB_DIR) - @ echo -e "\e[34m[---Building $@---]\e[0m" ar crs $@ $(SWIG_OBJS) .PHONY: $(SWIG_DIRS) $(SWIG_DIRS): icg_sim_serv $(TRICK_LIB_DIR) - @ echo -e "\e[34m[---Building $@---]\e[0m" @ $(MAKE) -C $@ trick #------------------------------------------------------------------------------- # 1.2 Build Trick's Data-products Applications. .PHONY: dp dp: ${TRICK_HOME}/trick_source/trick_utils/units - @ echo -e "\e[34m[---Building Data-Products Applications---]\e[0m" @ $(MAKE) -C ${TRICK_HOME}/trick_source/data_products #------------------------------------------------------------------------------- # 1.3 Build Trick's Java Tools java: - @ echo -e "\e[34m[---Building Java Tools---]\e[0m" @ $(MAKE) -C ${TRICK_HOME}/trick_source/java .PHONY: javadoc @@ -270,9 +250,7 @@ premade: ################################################################################ # This target runs Trick's Unit-tests and simulation-tests. test: unit_test sim_test - @ echo -e "\n\e[32m#####################################" - @ echo -e "\e[32mAll unit tests completed sucessfully.\e[0m" - @ echo -e "\e[32m#####################################\n" + @ echo "All tests completed sucessfully" .PHONY: $(UNIT_TEST_DIRS) $(UNIT_TEST_DIRS): @@ -291,45 +269,43 @@ sim_test: # CLEAN Targets ################################################################################ + clean: clean_sim_serv clean_utils clean_swig clean_dp clean_ICG clean_java @/bin/rm -rf $(TRICK_BIN_DIR) @/bin/rm -rf $(TRICK_LIB_DIR) - @echo -e "\e[32mTrick has been successfully cleaned." - - ifeq ($(USE_ER7_UTILS), 1) clean: clean_er7_utils endif clean_sim_serv: @for i in $(SIM_SERV_DIRS) ; do \ - $(MAKE) -C $$i real_clean $(MAKE_TRAVERSAL_NEWLINE); \ + $(MAKE) -C $$i real_clean ; \ done - @ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/mains real_clean $(MAKE_TRAVERSAL_NEWLINE) + @ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/mains real_clean clean_er7_utils: make_er7_makefiles @for i in $(ER7_UTILS_DIRS) ; do \ - $(MAKE) -C $$i real_clean $ $(MAKE_TRAVERSAL_NEWLINE); \ + $(MAKE) -C $$i real_clean ; \ rm $$i/Makefile; \ done clean_utils: @for i in $(UTILS_DIRS) ; do \ - $(MAKE) -C $$i real_clean $(MAKE_TRAVERSAL_NEWLINE); \ + $(MAKE) -C $$i real_clean ; \ done clean_swig: @for i in $(SWIG_DIRS) ; do \ - $(MAKE) -C $$i real_clean $(MAKE_TRAVERSAL_NEWLINE); \ + $(MAKE) -C $$i real_clean ; \ done ifeq ($(USE_ER7_UTILS), 1) -clean_swig: make_er7_makefiles +clean_swig: make_er7_makefiles endif clean_ICG : - @ $(MAKE) -C ${TRICK_HOME}/trick_source/codegen/Interface_Code_Gen clean $(MAKE_TRAVERSAL_NEWLINE) + $(MAKE) -C ${TRICK_HOME}/trick_source/codegen/Interface_Code_Gen clean clean_unit_test: @/bin/rm -rf ${TRICK_HOME}/trick_test/*.xml @@ -338,13 +314,14 @@ clean_unit_test: done clean_doxygen: - @ $(MAKE) -C ${TRICK_HOME}/doxygen clean $(MAKE_TRAVERSAL_NEWLINE) + @ $(MAKE) -C ${TRICK_HOME}/doxygen clean + clean_dp: - @ $(MAKE) clean -C ${TRICK_HOME}/trick_source/data_products $(MAKE_TRAVERSAL_NEWLINE) + @ $(MAKE) clean -C ${TRICK_HOME}/trick_source/data_products clean_java: - @ $(MAKE) -C ${TRICK_HOME}/trick_source/java clean $(MAKE_TRAVERSAL_NEWLINE) + @ $(MAKE) -C ${TRICK_HOME}/trick_source/java clean # FIXME: Seems to me that the for loop below should be removed and that the diff --git a/share/trick/makefiles/Makefile.tricklib b/share/trick/makefiles/Makefile.tricklib index 557df298..f9162d69 100644 --- a/share/trick/makefiles/Makefile.tricklib +++ b/share/trick/makefiles/Makefile.tricklib @@ -160,7 +160,10 @@ $(L_OBJS) : $(OBJ_DIR)/%.lex.o : $(SRC_DIR)%.lex.c $(SRC_DIR)%.tab.h | $(OBJ_DI $(Y_OBJS) : $(OBJ_DIR)/%.tab.o : $(SRC_DIR)%.tab.c | $(OBJ_DIR) $(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${> $(DEPTEMPFILE) @@ -171,15 +174,15 @@ depend: io_clean: $(RM) -rf io_src -clean: - $(RM) -rf $(OBJ_DIR) $(L_C) $(Y_C) $(Y_H) - real_clean: clean io_clean $(RM) -rf xml *~ *.bak core + @ echo "Directory is really clean!" + +clean: + $(RM) -rf $(OBJ_DIR) $(L_C) $(Y_C) $(Y_H) help : @ echo -e "\n\ - Source Directory Make Options:\n\ make - Compiles are source files\n\ \n\ @@ -191,3 +194,4 @@ Source Directory Make Options:\n\ \n\ make real_clean - Deletes xml/, io_src/,\n\ and object_${TRICK_HOST_CPU}/ directories\n" + diff --git a/trick_source/data_products/DPX/APPS/GXPLOT/makefile b/trick_source/data_products/DPX/APPS/GXPLOT/makefile index 76dbe09d..ab5b828a 100644 --- a/trick_source/data_products/DPX/APPS/GXPLOT/makefile +++ b/trick_source/data_products/DPX/APPS/GXPLOT/makefile @@ -55,6 +55,7 @@ OBJECT_FILES = $(C_OBJECT_FILES) $(CXX_OBJECT_FILES) all: ${TRICK_HOME}/bin/trick-gxplot ${TRICK_HOME}/bin/trick-gxplot: ${LIBDIR}/libDPM.a ${LIBDIR}/libDPC.a ${LIBDIR}/libDPV.a $(OBJECT_FILES) + @echo "===== Making gxplot =====" ${CPP} ${CFLAGS} ${INCDIRS} -o $@ $(OBJECT_FILES) $(ALL_LIBS) ${XLIBS} ${LIBRTDEF} ${CONTROLLER_LIBS} -lDPV $(C_OBJECT_FILES) : $(OBJDIR)/%.o : %.c diff --git a/trick_source/data_products/DPX/APPS/makefile b/trick_source/data_products/DPX/APPS/makefile index be50f36c..3290457b 100644 --- a/trick_source/data_products/DPX/APPS/makefile +++ b/trick_source/data_products/DPX/APPS/makefile @@ -10,15 +10,15 @@ apps: fxplot endif fxplot: - @$(MAKE) -C FXPLOT + $(MAKE) -C FXPLOT gxflot: - @$(MAKE) -C GXPLOT + $(MAKE) -C GXPLOT clean: - @$(MAKE) -C FXPLOT clean - @$(MAKE) -C GXPLOT clean + $(MAKE) -C FXPLOT clean + $(MAKE) -C GXPLOT clean spotless: clean - @$(MAKE) -C FXPLOT spotless - @$(MAKE) -C GXPLOT spotless + $(MAKE) -C FXPLOT spotless + $(MAKE) -C GXPLOT spotless diff --git a/trick_source/data_products/DPX/DPC/makefile b/trick_source/data_products/DPX/DPC/makefile index caffc7bb..f7a4a88c 100644 --- a/trick_source/data_products/DPX/DPC/makefile +++ b/trick_source/data_products/DPX/DPC/makefile @@ -57,3 +57,4 @@ clean: spotless: clean ${RM} ${LIBDIR}/${LIBNAME} + diff --git a/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile b/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile index 31bf4e3f..d784228f 100644 --- a/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile +++ b/trick_source/data_products/DPX/TESTING/DPC_TEST/makefile @@ -142,6 +142,7 @@ depend: @ echo "Appended dependencies to $(MAKEFILE)" clean: + @echo "===== Cleaning DPC_TEST Directory =====" ${RM} *~ ${RM} *.o diff --git a/trick_source/data_products/DPX/TESTING/TCDS/makefile b/trick_source/data_products/DPX/TESTING/TCDS/makefile index 72a2957e..cc767736 100644 --- a/trick_source/data_products/DPX/TESTING/TCDS/makefile +++ b/trick_source/data_products/DPX/TESTING/TCDS/makefile @@ -131,6 +131,7 @@ clean: spotless: clean ${RM} tcdstest + # Dependencies ####################################################################### diff --git a/trick_source/data_products/DPX/TESTING/UDS/makefile b/trick_source/data_products/DPX/TESTING/UDS/makefile index 9191e667..c3144d8c 100644 --- a/trick_source/data_products/DPX/TESTING/UDS/makefile +++ b/trick_source/data_products/DPX/TESTING/UDS/makefile @@ -131,6 +131,7 @@ clean: spotless: clean ${RM} udstest + # Dependencies ####################################################################### diff --git a/trick_source/data_products/DPX/TESTING/makefile b/trick_source/data_products/DPX/TESTING/makefile index d8817e4b..8293411f 100644 --- a/trick_source/data_products/DPX/TESTING/makefile +++ b/trick_source/data_products/DPX/TESTING/makefile @@ -25,9 +25,9 @@ clean: $(MAKE) -C UDS clean spotless: - @ $(MAKE) -C DPC_TEST spotless - @ $(MAKE) -C DPM_TEST spotless - @ $(MAKE) -C DS_exercisor spotless - @ $(MAKE) -C DS spotless - @ $(MAKE) -C TCDS spotless - @ $(MAKE) -C UDS spotless + $(MAKE) -C DPC_TEST spotless + $(MAKE) -C DPM_TEST spotless + $(MAKE) -C DS_exercisor spotless + $(MAKE) -C DS spotless + $(MAKE) -C TCDS spotless + $(MAKE) -C UDS spotless diff --git a/trick_source/data_products/DPX/makefile b/trick_source/data_products/DPX/makefile index ac4182e0..8692c8b9 100644 --- a/trick_source/data_products/DPX/makefile +++ b/trick_source/data_products/DPX/makefile @@ -23,23 +23,21 @@ all: $(LIBDIRS) $(APPDIRS) always_make: docs: always_make - @ echo -e "\e[34m[---Making Documentation---]\e[0m" + @echo "===== Making DOCS =====" doxygen DPX.doxygen testing: $(LIBDIRS) - @ echo -e "\e[34m[---Building TESTING---]\e[0m" + @echo "===== Making TESTING =====" $(MAKE) -C TESTING - @ echo "" $(LIBDIRS): - @ echo -e "\e[34m[---Building $@---]\e[0m" + @ echo ; echo "==: Compile $@" @ $(MAKE) -C $@ - @ echo "" $(APPDIRS): $(LIBDIRS) - @ echo -e "\e[34m[---Building $@---]\e[0m" + @echo "===== Making APPS =====" + @ echo ; echo "==: Compile $@" @ $(MAKE) -C $@ - @ echo "" clean: @ for i in $(LIBDIRS) ; do \ @@ -48,12 +46,11 @@ clean: @ for i in $(APPDIRS) ; do \ $(MAKE) -C $$i clean ; \ done - - @ $(MAKE) -C TESTING spotless - @ $(MAKE) -C APPS spotless - - ${RM} DOCS + ${RM} -rf DOCS ${RM} ${LIBDIR} + $(MAKE) -C TESTING spotless + $(MAKE) -C APPS spotless + $(MAKE) -C XML clean ${RM} *~ ${RM} *.o diff --git a/trick_source/data_products/EQParse/makefile b/trick_source/data_products/EQParse/makefile index ee7c8335..6a5cc3bd 100644 --- a/trick_source/data_products/EQParse/makefile +++ b/trick_source/data_products/EQParse/makefile @@ -94,7 +94,7 @@ depend: clean: rm -rf $(OBJ_DIR) - rm -f $(LIBDIR)/$(LIBNAME) + rm -f $(LIBDIR)/$(LIBNAME) real_clean: clean diff --git a/trick_source/data_products/Log/makefile b/trick_source/data_products/Log/makefile index 104d17fe..f4a209a2 100644 --- a/trick_source/data_products/Log/makefile +++ b/trick_source/data_products/Log/makefile @@ -66,7 +66,7 @@ $(LIBDIR)/$(LIBNAME): $(CPP_OBJECTS) | $(LIBDIR) clean: rm -rf $(OBJ_DIR) - rm -f $(LIBDIR)/$(LIBNAME) + rm -f $(LIBDIR)/$(LIBNAME) real_clean: clean diff --git a/trick_source/data_products/makefile b/trick_source/data_products/makefile index 11232fb1..85b39c45 100644 --- a/trick_source/data_products/makefile +++ b/trick_source/data_products/makefile @@ -23,29 +23,26 @@ APPDIRS = DPX \ Apps/ExternalPrograms all: $(LIBDIRS) $(APPDIRS) - @ echo -e "\e[32mTrick data-products compiled:\e[34m" ; date ; echo -e "\e[0m" + @ echo "== Trick data_products make complete ==" .PHONY: $(LIBDIRS) $(APPDIRS) $(LIBDIRS): - @ echo -e "\e[34m[---Building $@---]\e[0m" + @ echo ; echo "==: Compile data_products/$@" @ $(MAKE) -C $@ - @ echo "" $(APPDIRS): $(LIBDIRS) - @ echo -e "\e[34m[---Building $@---]\e[0m" + @ echo ; echo "==: Compile data_products/$@" @ $(MAKE) -C $@ - @ echo "" real_clean: clean clean: @ for i in $(LIBDIRS) ; do \ - $(MAKE) -C $$i real_clean ; \ - done - + $(MAKE) -C $$i real_clean ; \ + done @ for i in $(APPDIRS) ; do \ - $(MAKE) -C $$i real_clean ; \ - done - + $(MAKE) -C $$i real_clean ; \ + done @ rm -rf $(LIB_DIR) + diff --git a/trick_source/data_products/units/makefile b/trick_source/data_products/units/makefile index d97691c6..20f28d6c 100644 --- a/trick_source/data_products/units/makefile +++ b/trick_source/data_products/units/makefile @@ -47,7 +47,7 @@ $(LIBDIR)/$(LIBNAME): $(CPP_OBJECTS) $(C_OBJECTS) $(LIBDIR) clean: rm -rf $(OBJ_DIR) - rm -f $(LIBDIR)/$(LIBNAME) + rm -f $(LIBDIR)/$(LIBNAME) real_clean: clean diff --git a/trick_source/java/makefile b/trick_source/java/makefile index 5522593f..a78a47a7 100644 --- a/trick_source/java/makefile +++ b/trick_source/java/makefile @@ -24,12 +24,13 @@ RESOURCES = $(subst src/,,$(shell find src/trick -name resources)) RESOURCES += $(subst src/,,$(shell find src/trick -name jaxb.index)) all: ${DIST_DIR}/trick.jar resources - @ echo -e "\n\e[32mTrick GUIs compiled:\e[34m" ; date ; echo -e "\e[0m" + @echo "Java build successful" ${DEST_DIR} ${DIST_DIR} ${RESOURCES_DIR} ${DOCS_API_DIR}: mkdir -p $@ ${DIST_DIR}/trick.jar: compile ${DIST_DIR} + @echo "Creating jar file..." @jar cf ${DIST_DIR}/trick.jar -C ${DEST_DIR} . @cd ${SRC_DIR} && jar uf ${DIST_DIR}/trick.jar ${RESOURCES} @@ -37,6 +38,7 @@ external_jars: @ $(MAKE) -C $(LIB_DIR) compile: ${DEST_DIR} external_jars + @echo "Building Trick GUIs..." @${JAVAC} ${JAVAC_FLAGS} -classpath ${CLASS_PATH} -d ${DEST_DIR} -sourcepath ${SRC_DIR} ${SRC_FILES} resources: ${RESOURCES_DIR}/trick_icon.png diff --git a/trick_source/trick_swig/Makefile b/trick_source/trick_swig/Makefile index 258a6580..356d5a74 100644 --- a/trick_source/trick_swig/Makefile +++ b/trick_source/trick_swig/Makefile @@ -86,9 +86,12 @@ real_clean: clean clean: clean_python $(RM) -rf $(OBJ_DIR) $(TEST_DIR) $(PY_FILES) + clean_python: rm -rf swig_${TRICK_HOST_CPU} sim_services.py swig_double.py swig_int.py swig_ref.py +real_clean: clean + # some depends swig_int_wrap.cpp: swig_int.cpp swig_double_wrap.cpp: swig_double.cpp