Cleaned up 'make clean' output significantly.

This commit is contained in:
Christopher LaChance 2017-12-06 13:12:13 -06:00
parent 6184aa6cd9
commit 1bb3ac2a06
26 changed files with 166 additions and 47 deletions

View File

@ -134,6 +134,14 @@ 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
################################################################################
@ -269,43 +277,54 @@ 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[31m# #"
@echo -e "\e[33m## ##"
@echo -e "\e[32m### ###"
@echo -e "\e[34m#### ####"
@echo -e "\e[35m##### #####"
@echo -e "\e[39m-----Trick has been successfully cleaned.-----"
@echo -e "\e[35m##### #####"
@echo -e "\e[34m#### ####"
@echo -e "\e[32m### ###"
@echo -e "\e[33m## ##"
@echo -e "\e[31m# #\n"
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) -C $$i real_clean $(MAKE_TRAVERSAL_NEWLINE); \
done
@ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/mains real_clean
@ $(MAKE) -C ${TRICK_HOME}/trick_source/sim_services/mains real_clean $(MAKE_TRAVERSAL_NEWLINE)
clean_er7_utils: make_er7_makefiles
@for i in $(ER7_UTILS_DIRS) ; do \
$(MAKE) -C $$i real_clean ; \
$(MAKE) -C $$i real_clean $ $(MAKE_TRAVERSAL_NEWLINE); \
rm $$i/Makefile; \
done
clean_utils:
@for i in $(UTILS_DIRS) ; do \
$(MAKE) -C $$i real_clean ; \
$(MAKE) -C $$i real_clean $(MAKE_TRAVERSAL_NEWLINE); \
done
clean_swig:
@for i in $(SWIG_DIRS) ; do \
$(MAKE) -C $$i real_clean ; \
$(MAKE) -C $$i real_clean $(MAKE_TRAVERSAL_NEWLINE); \
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) -C ${TRICK_HOME}/trick_source/codegen/Interface_Code_Gen clean $(MAKE_TRAVERSAL_NEWLINE)
clean_unit_test:
@/bin/rm -rf ${TRICK_HOME}/trick_test/*.xml
@ -314,14 +333,13 @@ clean_unit_test:
done
clean_doxygen:
@ $(MAKE) -C ${TRICK_HOME}/doxygen clean
@ $(MAKE) -C ${TRICK_HOME}/doxygen clean $(MAKE_TRAVERSAL_NEWLINE)
clean_dp:
@ $(MAKE) clean -C ${TRICK_HOME}/trick_source/data_products
@ $(MAKE) clean -C ${TRICK_HOME}/trick_source/data_products $(MAKE_TRAVERSAL_NEWLINE)
clean_java:
@ $(MAKE) -C ${TRICK_HOME}/trick_source/java clean
@ $(MAKE) -C ${TRICK_HOME}/trick_source/java clean $(MAKE_TRAVERSAL_NEWLINE)
# FIXME: Seems to me that the for loop below should be removed and that the

View File

@ -161,6 +161,12 @@ $(Y_OBJS) : $(OBJ_DIR)/%.tab.o : $(SRC_DIR)%.tab.c | $(OBJ_DIR)
$(CD_CMD) $(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -c ${<F} -o $(UP_DIR)$@
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
#
# OTHER RULES
#
@ -172,17 +178,23 @@ depend:
@ echo "Created dependency file $(DEPFILE)"
io_clean:
$(REMOVAL_COLOR)
$(RM) -rf io_src
$(DEFAULT_COLOR)
clean:
$(REMOVAL_COLOR)
$(RM) -rf $(OBJ_DIR) $(L_C) $(Y_C) $(Y_H)
$(DEFAULT_COLOR)
real_clean: clean io_clean
$(REMOVAL_COLOR)
$(RM) -rf xml *~ *.bak core
@ echo "Directory is really clean!"
clean:
$(RM) -rf $(OBJ_DIR) $(L_C) $(Y_C) $(Y_H)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
help :
@ echo -e "\n\
Source Directory Make Options:\n\
make - Compiles are source files\n\
\n\

View File

@ -75,4 +75,6 @@ $(OBJ_DIR):
mkdir -p $(OBJ_DIR)
clean:
@ echo -e "\e[31m\c"
rm -rf $(OBJ_DIR) $(ICG)
@ echo -e "\e[32mDirectory cleaned.\e[0m"

View File

@ -129,6 +129,8 @@ real_clean:
fi
clean:
@ /bin/echo -e "\e[31m\c"
rm -rf object_${TRICK_HOST_CPU}
rm -rf ${TRICK_HOME}/lib_${TRICK_HOST_CPU}/*.so
@ /bin/echo -e "\e[32mDirectory cleaned.\e[0m"

View File

@ -29,8 +29,10 @@ $(OBJDIR)/trk2ascii.o: trk2ascii.cpp | $(OBJDIR)
$(CC) $(DP_CFLAGS) -c trk2ascii.cpp -o $(OBJDIR)/trk2ascii.o
clean:
@ echo -e "\e[31m\c"
rm -f trk2ascii
rm -rf $(OBJDIR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
real_clean: clean

View File

@ -81,7 +81,9 @@ ${LIBDIR}/libDPC.a:
$(MAKE) -C ${DPX_DIR}/DPC
clean:
@ echo -e "\e[31m\c"
${RM} $(OBJDIR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
spotless: clean

View File

@ -82,7 +82,9 @@ ${LIBDIR}/libDPV.a:
$(MAKE) -C ${DPX_DIR}/DPV/UTILS
clean:
@ echo -e "\e[31m\c"
${RM} $(OBJDIR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
spotless: clean

View File

@ -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

View File

@ -33,6 +33,12 @@ endif
ifeq ($(TRICK_HOST_TYPE), Darwin)
endif
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
#############################################################################
## MODEL TARGETS ##
#############################################################################
@ -52,8 +58,10 @@ ${LIBDIR}:
mkdir -p ${LIBDIR}
clean:
@ echo -e "\e[31m\c"
${RM} *~
${RM} ${OBJDIR}
@ echo -e "\e[32mDirectory cleaned.\e[0m"
spotless: clean
${RM} ${LIBDIR}/${LIBNAME}

View File

@ -59,8 +59,10 @@ ${LIBDIR}:
mkdir -p ${LIBDIR}
clean:
@ echo -e "\e[31m\c"
${RM} *~
${RM} ${OBJDIR}
@ echo -e "\e[32mDirectory cleaned.\e[0m"
spotless: clean
${RM} ${LIBDIR}/${LIBNAME}

View File

@ -19,6 +19,12 @@ LIBOBJS = ${OBJDIR}/DPV_textbuffer.o
#.cpp.o:
# ${CPP} ${CFLAGS} ${INCDIRS} -c $<
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
all: ${LIBDIR}/${LIBNAME}
$(LIBOBJS): $(OBJDIR)/%.o : %.cpp | ${OBJDIR}
@ -34,9 +40,12 @@ ${LIBDIR}:
mkdir -p ${LIBDIR}
clean:
$(REMOVAL_COLOR)
${RM} *~
${RM} *.o
${RM} ${OBJDIR}
$(DEFAULT_COLOR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
spotless: clean
${RM} ${LIBDIR}/${LIBNAME}

View File

@ -142,12 +142,13 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
@echo "===== Cleaning DPC_TEST Directory ====="
@/bin/echo -e "\e[31m\c"
${RM} *~
${RM} *.o
spotless: clean
${RM} ctrl_test
@/bin/echo -e "\e[32mDirectory cleaned.\e[0m"
# Dependencies

View File

@ -112,11 +112,13 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
@ /bin/echo -e "\e[31m\c"
${RM} *~
${RM} *.o
spotless: clean
${RM} model_test
@ /bin/echo -e "\e[32mDirectory cleaned.\e[0m"
# Dependencies

View File

@ -122,11 +122,13 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
@ /bin/echo -e "\e[31m\c"
${RM} *~
${RM} *.o
spotless: clean
${RM} dstest
@ /bin/echo -e "\e[32mDirectory cleaned.\e[0m"
# Dependencies

View File

@ -100,8 +100,10 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
@ /bin/echo -e "\e[31m\c"
${RM} *~
${RM} *.o
@ /bin/echo -e "\e[32mDirectory cleaned.\e[0m"
spotless: clean

View File

@ -125,12 +125,13 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
@ /bin/echo -e "\e[31m\c"
${RM} *~
${RM} *.o
spotless: clean
${RM} tcdstest
@ /bin/echo -e "\e[32mDirectory cleaned.\e[0m"
# Dependencies

View File

@ -125,12 +125,13 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
@ /bin/echo -e "\e[31m\c"
${RM} *~
${RM} *.o
spotless: clean
${RM} udstest
@ /bin/echo -e "\e[32mDirectory cleaned.\e[0m"
# Dependencies

View File

@ -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

View File

@ -46,13 +46,16 @@ clean:
@ for i in $(APPDIRS) ; do \
$(MAKE) -C $$i clean ; \
done
${RM} -rf DOCS
@ $(MAKE) -C TESTING spotless
@ $(MAKE) -C APPS spotless
@ echo -e "\e[31m\c"
${RM} DOCS
${RM} ${LIBDIR}
$(MAKE) -C TESTING spotless
$(MAKE) -C APPS spotless
$(MAKE) -C XML clean
${RM} *~
${RM} *.o
@ echo -e "\e[32mDirectory cleaned.\e[0m"
real_clean: clean

View File

@ -63,6 +63,12 @@ IO_OBJS = $(IO_C_OBJS) $(IO_CPP_OBJS)
OBJECT_FILES = $(IO_OBJS) $(C_OBJS) $(CPP_OBJS) $(F_OBJS)
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
#############################################################################
## MODEL TARGETS ##
#############################################################################
@ -93,8 +99,11 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
$(REMOVAL_COLOR)
rm -rf $(OBJ_DIR)
rm -f $(LIBDIR)/$(LIBNAME)
rm -f $(LIBDIR)/$(LIBNAME)
$(DEFAULT_COLOR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
real_clean: clean

View File

@ -49,6 +49,12 @@ ifeq ($(TRICK_DP_FORCE_32BIT), 1)
DP_CFLAGS += -m32
endif
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
#############################################################################
## MODEL TARGETS ##
#############################################################################
@ -65,8 +71,11 @@ $(LIBDIR)/$(LIBNAME): $(CPP_OBJECTS) | $(LIBDIR)
ar crs $(LIBDIR)/$(LIBNAME) $?
clean:
$(REMOVAL_COLOR)
rm -rf $(OBJ_DIR)
rm -f $(LIBDIR)/$(LIBNAME)
rm -f $(LIBDIR)/$(LIBNAME)
$(DEFAULT_COLOR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
real_clean: clean

View File

@ -39,6 +39,12 @@ MAKEFILE = makefile
AWKTEMPFILE = awk.temp
MAKEDEPEND = makedepend
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
#############################################################################
## MODEL TARGETS ##
#############################################################################
@ -61,8 +67,11 @@ depend:
@ echo "Appended dependencies to $(MAKEFILE)"
clean:
$(REMOVAL_COLOR)
rm -rf $(OBJ_DIR)
rm -f $(LIBDIR)/$(LIBNAME)
$(DEFAULT_COLOR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
real_clean: clean

View File

@ -38,10 +38,11 @@ real_clean: clean
clean:
@ for i in $(LIBDIRS) ; do \
$(MAKE) -C $$i real_clean ; \
done
@ for i in $(APPDIRS) ; do \
$(MAKE) -C $$i real_clean ; \
done
@ rm -rf $(LIB_DIR)
$(MAKE) -C $$i real_clean ; \
done
@ for i in $(APPDIRS) ; do \
$(MAKE) -C $$i real_clean ; \
done
@ rm -rf $(LIB_DIR)

View File

@ -28,6 +28,12 @@ ifeq ($(TRICK_DP_FORCE_32BIT), 1)
DP_CFLAGS += -m32
endif
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
#############################################################################
## MODEL TARGETS ##
#############################################################################
@ -46,8 +52,11 @@ $(LIBDIR)/$(LIBNAME): $(CPP_OBJECTS) $(C_OBJECTS) $(LIBDIR)
ar crs $(LIBDIR)/$(LIBNAME) $(CPP_OBJECTS) $(C_OBJECTS)
clean:
$(REMOVAL_COLOR)
rm -rf $(OBJ_DIR)
rm -f $(LIBDIR)/$(LIBNAME)
rm -f $(LIBDIR)/$(LIBNAME)
$(DEFAULT_COLOR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
real_clean: clean

View File

@ -55,10 +55,12 @@ javadoc: ${DOCS_API_DIR}
javadoc -d ${DOCS_API_DIR} -classpath ${CLASS_PATH} -sourcepath ${SRC_DIR} -windowtitle "Trick GUI API" ${JAVA_DOC_LINKS} trick ${SRC_FILES}
clean:
@ echo -e "\e[31m\c"
rm -rf ${BUILD_DIR}
rm -rf ${DIST_DIR}
rm -rf ${RESOURCES_DIR}
rm -rf ${TEST_REPORTS_DIR}
@ echo -e "\e[32mDirectory cleaned.\e[0m"
clean_obj:
rm -rf ${BUILD_DIR}

View File

@ -81,16 +81,25 @@ $(SWIG_SRC_FILES): swig_${TRICK_HOST_CPU}/%_wrap.cpp : %.i
$(TRICK_LIB) : $(SWIG_OBJECT_FILES) $(OBJECT_FILES)
ar crs $@ $?
#############################################
# FORMATTING VARIABLES
#############################################
REMOVAL_COLOR := @ echo -e "\e[31m\c"
DEFAULT_COLOR := @ echo -e "\e[0m\c"
MESSAGE_COLOR := @ echo -e "\e[32m\c"
real_clean: clean
clean: clean_python
$(REMOVAL_COLOR)
$(RM) -rf $(OBJ_DIR) $(TEST_DIR) $(PY_FILES)
$(DEFAULT_COLOR)
@ echo -e "\e[32mDirectory cleaned.\e[0m"
clean_python:
$(REMOVAL_COLOR)
rm -rf swig_${TRICK_HOST_CPU} sim_services.py swig_double.py swig_int.py swig_ref.py
real_clean: clean
$(DEFAULT_COLOR)
# some depends
swig_int_wrap.cpp: swig_int.cpp