diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4d216d71c0..f127dc3da5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,22 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-17 12:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/pp/Makefile + ! set EXE_FILE - it's workaround to force bin// directory + creation in current make files and then cleaning it if possible + + * harbour/config/rules.cf + * removed old hardcoded clean rules which deleted files not created + by build process + + * harbour/config/instsh.cf + * pacified install command echo + + * harbour/config/globsh.cf + ! fixed new sh clean rules: [ ! -f $(LIB_DIR)/* ] causes syntax + error when more then one file exists in $(LIB_DIR) directory + 2009-07-17 12:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/pp/Makefile ! Fixed to delete hbpp.tds. diff --git a/harbour/config/globsh.cf b/harbour/config/globsh.cf index 28b889f576..27dce11390 100644 --- a/harbour/config/globsh.cf +++ b/harbour/config/globsh.cf @@ -8,11 +8,6 @@ # http://www.robvanderwoude.com/batchcommands.php # --------------------------------------------------------------- -# NOTE: In dirbase rules, EXE_DIR is intentionally created even -# when a lib is built, so I'm checking for LIB_FILE presence -# instead of EXE_FILE, which would be normal. This is needed -# to support the hack inside source/pp/Makefile. [vszakats] - ifneq ($(HB_SHELL),sh) DIRSEP = $(subst /,\,\) @@ -37,25 +32,17 @@ MDP = mkdir -p dirbase:: @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) @[ -z $(LIB_FILE) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(LIB_FILE) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) + @[ -z $(EXE_FILE) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) clean:: -@$(RDP) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE); \ - if [ ! -z $(LIB_FILE) ]; \ - then \ + if [ -n $(LIB_FILE) ]; then \ $(RM) $(basename $(LIB_FILE)).bak; \ - if [ ! -f $(LIB_DIR)/* ]; \ - then \ - $(RDP) $(LIB_DIR); \ - fi \ + [ "`echo $(LIB_DIR)/*`" != "$(LIB_DIR)/*" ] || $(RDP) $(LIB_DIR); \ fi ; \ - if [ ! -z $(EXE_FILE) ]; \ - then \ + if [ -n $(EXE_FILE) ]; then \ $(RM) $(basename $(EXE_FILE)).tds; \ - if [ ! -f $(EXE_DIR)/* ]; \ - then \ - $(RDP) $(EXE_DIR); \ - fi \ + [ "`echo $(EXE_DIR)/*`" != "$(EXE_DIR)/*" ] || $(RDP) $(EXE_DIR); \ fi endif @@ -72,7 +59,7 @@ MDP = mkdir dirbase:: -@$(CMDPREF)if not exist $(OBJ_DIR_OS) $(MDP) "$(OBJ_DIR_OS)" $(if $(LIB_FILE),-@$(CMDPREF)if not exist "$(LIB_DIR_OS)" $(MDP) "$(LIB_DIR_OS)",) - $(if $(LIB_FILE),-@$(CMDPREF)if not exist "$(EXE_DIR_OS)" $(MDP) "$(EXE_DIR_OS)",) + $(if $(EXE_FILE),-@$(CMDPREF)if not exist "$(EXE_DIR_OS)" $(MDP) "$(EXE_DIR_OS)",) clean:: -@$(CMDPREF)if exist $(OBJ_DIR_OS) $(RDP) "$(OBJ_DIR_OS)" @@ -100,7 +87,7 @@ EXE_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) dirbase:: -for %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d $(MD) %d $(if $(LIB_FILE),-for %d in ($(LIB_ARCH_DIR_OS) $(LIB_DIR_OS)) do if not exist %d $(MD) %d,) - $(if $(LIB_FILE),-for %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d $(MD) %d,) + $(if $(EXE_FILE),-for %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d $(MD) %d,) clean:: -if exist $(OBJ_DIR_OS)\*.* $(RM) $(OBJ_DIR_OS)\*.* @@ -126,7 +113,7 @@ MDP = $(TOOL_DIR)dj-mkdir -p dirbase:: -@$(CMDPREF)if not exist $(OBJ_DIR_OS)\nul $(MDP) $(OBJ_DIR_OS) $(if $(LIB_FILE),-@$(CMDPREF)if not exist $(LIB_DIR_OS)\nul $(MDP) $(LIB_DIR_OS),) - $(if $(LIB_FILE),-@$(CMDPREF)if not exist $(EXE_DIR_OS)\nul $(MDP) $(EXE_DIR_OS),) + $(if $(EXE_FILE),-@$(CMDPREF)if not exist $(EXE_DIR_OS)\nul $(MDP) $(EXE_DIR_OS),) clean:: -@$(RDP) $(OBJ_DIR_OS) $(LIB_FILE_OS) $(EXE_FILE_OS) diff --git a/harbour/config/instsh.cf b/harbour/config/instsh.cf index 850815db39..6cad957fda 100644 --- a/harbour/config/instsh.cf +++ b/harbour/config/instsh.cf @@ -26,7 +26,7 @@ else ifeq ($(HB_SHELL),sh) INSTALL_RULE =\ - $(MDP) $(subst \,/,$(INSTALL_DIR)); \ + @$(MDP) $(subst \,/,$(INSTALL_DIR)); \ if [ ! -d $(subst \,/,$(INSTALL_DIR)) ]; \ then \ echo "! Can't install, path not found: '$(subst \,/,$(INSTALL_DIR))'" 1>&2; \ diff --git a/harbour/config/rules.cf b/harbour/config/rules.cf index 05de5d8e6a..9b6a9c5fd3 100644 --- a/harbour/config/rules.cf +++ b/harbour/config/rules.cf @@ -80,11 +80,3 @@ endif # Rule to generate a C file from a PRG file. %.c : $(GRANDP)%.prg $(HB_RULE) - -ifeq ($(HB_SHELL),sh) -# Generic rule to clean up. -clean:: - -$(RM) *.bak *.obj core *.core *~ *.o *.ppo *.err -else -# Do nothing. $(HB_ARCHITECTURE)/global.cf will handle clean up. -endif diff --git a/harbour/source/pp/Makefile b/harbour/source/pp/Makefile index 1950ef01e0..b20f261cde 100644 --- a/harbour/source/pp/Makefile +++ b/harbour/source/pp/Makefile @@ -23,7 +23,9 @@ INSTALL_RULE_LIBRARIES := $(INSTALL_RULE) HB_VERHEADER=$(TOP)$(ROOT)include/hbverbld.h +EXE_FILE := $(EXE_DIR)/hbpp$(EXE_EXT) vpath hbpp$(EXE_EXT) $(EXE_DIR) + ifneq ($(HB_PP_RULES),) pptable.c : $(HB_PP_RULES) $(CP) $(subst /,$(DIRSEP),$<) $@ @@ -43,6 +45,6 @@ install:: $(INSTALL_RULE_LIBRARIES) clean:: - -$(RM) $(subst /,$(DIRSEP),$(HB_VERHEADER)) - -$(RM) $(subst /,$(DIRSEP),$(EXE_DIR)/hbpp$(EXE_EXT)) - -$(RM) $(subst /,$(DIRSEP),$(EXE_DIR)/hbpp.tds) + -@$(RM) $(subst /,$(DIRSEP),$(HB_VERHEADER)) + -@$(RM) $(subst /,$(DIRSEP),$(EXE_DIR)/hbpp$(EXE_EXT)) + -@$(RM) $(subst /,$(DIRSEP),$(EXE_DIR)/hbpp.tds)