[complement-svn] SF.net SVN: complement: [1388] branches/Makefiles/explore/Makefiles
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2006-11-02 19:31:33
|
Revision: 1388 http://svn.sourceforge.net/complement/?rev=1388&view=rev Author: complement Date: 2006-11-02 11:31:21 -0800 (Thu, 02 Nov 2006) Log Message: ----------- rollout rules via macrofunction eval technology; recursive file inclusion not required more Modified Paths: -------------- branches/Makefiles/explore/Makefiles/gmake/linux/rules-install-so.mak branches/Makefiles/explore/Makefiles/gmake/linux/rules-so.mak branches/Makefiles/explore/Makefiles/gmake/targets.mak Removed Paths: ------------- branches/Makefiles/explore/Makefiles/gmake/dirsrc.mak branches/Makefiles/explore/Makefiles/rules-d.mak branches/Makefiles/explore/Makefiles/rules-o.mak branches/Makefiles/explore/Makefiles/rules-res.mak Deleted: branches/Makefiles/explore/Makefiles/gmake/dirsrc.mak =================================================================== --- branches/Makefiles/explore/Makefiles/gmake/dirsrc.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/gmake/dirsrc.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,24 +0,0 @@ -# -*- Makefile -*- Time-stamp: <03/10/27 18:07:14 ptr> -# $Id$ - -# Some trick to build implicit rules for sources in some different -# subdirectories. I remove catalogs from path to sources, with this -# names I build output object path, and provide dependency from -# source in directory. Due to no loops for rules definition, I should -# use recursion here; - -# try take directory from list: -WORD1 := $(word 1,$(DIRS_UNIQUE_SRC)) - -# is still directory in the list? -ifneq "$(WORD1)" "" -include ${RULESBASE}/rules-o.mak -include ${RULESBASE}/rules-d.mak -ifeq ($(OSNAME),cygming) -include ${RULESBASE}/rules-res.mak -endif -# remove processed directory from list -DIRS_UNIQUE_SRC := $(filter-out $(WORD1),$(DIRS_UNIQUE_SRC)) -# recursive include here: -include ${RULESBASE}/${USE_MAKE}/dirsrc.mak -endif Modified: branches/Makefiles/explore/Makefiles/gmake/linux/rules-install-so.mak =================================================================== --- branches/Makefiles/explore/Makefiles/gmake/linux/rules-install-so.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/gmake/linux/rules-install-so.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,4 +1,4 @@ -# -*- makefile -*- Time-stamp: <06/11/02 10:43:02 ptr> +# -*- makefile -*- Time-stamp: <06/11/02 20:57:29 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov @@ -19,97 +19,27 @@ install: $(INSTALL_TAGS) -$(INSTALL_LIB_DIR)/${SO_NAMExxx}: ${SO_NAME_OUTxxx} - $(INSTALL_SO) ${SO_NAME_OUTxxx} $(INSTALL_LIB_DIR) - @if [ -h $(INSTALL_LIB_DIR)/${SO_NAMExx} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR)/${SO_NAMExx}` != "${SO_NAMExxx}" ]; then \ - rm $(INSTALL_LIB_DIR)/${SO_NAMExx}; \ - ln -s ${SO_NAMExxx} $(INSTALL_LIB_DIR)/${SO_NAMExx}; \ - fi \ - else \ - ln -s ${SO_NAMExxx} $(INSTALL_LIB_DIR)/${SO_NAMExx}; \ - fi - @if [ -h $(INSTALL_LIB_DIR)/${SO_NAMEx} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR)/${SO_NAMEx}` != "${SO_NAMExx}" ]; then \ - rm $(INSTALL_LIB_DIR)/${SO_NAMEx}; \ - ln -s ${SO_NAMExx} $(INSTALL_LIB_DIR)/${SO_NAMEx}; \ - fi \ - else \ - ln -s ${SO_NAMExx} $(INSTALL_LIB_DIR)/${SO_NAMEx}; \ - fi - @if [ -h $(INSTALL_LIB_DIR)/${SO_NAME} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR)/${SO_NAME}` != "${SO_NAMEx}" ]; then \ - rm $(INSTALL_LIB_DIR)/${SO_NAME}; \ - ln -s ${SO_NAMEx} $(INSTALL_LIB_DIR)/${SO_NAME}; \ - fi \ - else \ - ln -s ${SO_NAMEx} $(INSTALL_LIB_DIR)/${SO_NAME}; \ - fi +define do_install_so_links +$${INSTALL_LIB_DIR$(1)}/$${SO_NAME$(1)xxx}: ${SO_NAME_OUT$(1)xxx} + $$(INSTALL_SO) $${SO_NAME_OUT$(1)xxx} $(INSTALL_LIB_DIR$(1)) + $(call do_so_links_1,$$(INSTALL_LIB_DIR$(1)),$${SO_NAME$(1)xx},$${SO_NAME$(1)xxx}) + $(call do_so_links_1,$$(INSTALL_LIB_DIR$(1)),$${SO_NAME$(1)x},$${SO_NAME$(1)xx}) + $(call do_so_links_1,$$(INSTALL_LIB_DIR$(1)),$${SO_NAME$(1)},$${SO_NAME$(1)x}) +endef +$(eval $(call do_install_so_links,)) +$(eval $(call do_install_so_links,_DBG)) +ifndef WITHOUT_STLPORT +$(eval $(call do_install_so_links,_STLDBG)) +endif + install-release-shared: release-shared $(INSTALL_LIB_DIR) $(INSTALL_LIB_DIR)/${SO_NAMExxx} ${POST_INSTALL} -$(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxxx}: ${SO_NAME_OUT_DBGxxx} - $(INSTALL_SO) ${SO_NAME_OUT_DBGxxx} $(INSTALL_LIB_DIR_DBG) - @if [ -h $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxx} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxx}` != "${SO_NAME_DBGxxx}" ]; then \ - rm $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxx}; \ - ln -s ${SO_NAME_DBGxxx} $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxx}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGxxx} $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxx}; \ - fi - @if [ -h $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGx} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGx}` != "${SO_NAME_DBGxx}" ]; then \ - rm $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGx}; \ - ln -s ${SO_NAME_DBGxx} $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGx}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGxx} $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGx}; \ - fi - @if [ -h $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBG} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBG}` != "${SO_NAME_DBGx}" ]; then \ - rm $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBG}; \ - ln -s ${SO_NAME_DBGx} $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBG}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGx} $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBG}; \ - fi - - install-dbg-shared: dbg-shared $(INSTALL_LIB_DIR_DBG) $(INSTALL_LIB_DIR_DBG)/${SO_NAME_DBGxxx} ${POST_INSTALL_DBG} ifndef WITHOUT_STLPORT -$(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxxx}: ${SO_NAME_OUT_STLDBGxxx} - $(INSTALL_SO) ${SO_NAME_OUT_STLDBGxxx} $(INSTALL_LIB_DIR_STLDBG) - @if [ -h $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxx} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxx}` != "${SO_NAME_STLDBGxxx}" ]; then \ - rm $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - ln -s ${SO_NAME_STLDBGxxx} $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGxxx} $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - fi - @if [ -h $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGx} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGx}` != "${SO_NAME_STLDBGxx}" ]; then \ - rm $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - ln -s ${SO_NAME_STLDBGxx} $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGxx} $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - fi - @if [ -h $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBG} ] ; then \ - if [ `readlink $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBG}` != "${SO_NAME_STLDBGx}" ]; then \ - rm $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - ln -s ${SO_NAME_STLDBGx} $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGx} $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - fi - install-stldbg-shared: stldbg-shared $(INSTALL_LIB_DIR_STLDBG) $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxxx} ${POST_INSTALL_STLDBG} - -# WITHOUT_STLPORT endif Modified: branches/Makefiles/explore/Makefiles/gmake/linux/rules-so.mak =================================================================== --- branches/Makefiles/explore/Makefiles/gmake/linux/rules-so.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/gmake/linux/rules-so.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,4 +1,4 @@ -# -*- makefile -*- Time-stamp: <06/11/02 10:40:52 ptr> +# -*- makefile -*- Time-stamp: <06/11/02 20:45:44 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov @@ -18,187 +18,40 @@ dbg-shared: $(OUTPUT_DIR_DBG) ${SO_NAME_OUT_DBGxxx} ifndef WITHOUT_STLPORT - stldbg-shared: $(OUTPUT_DIR_STLDBG) ${SO_NAME_OUT_STLDBGxxx} - endif -ifeq ("${_C_SOURCES_ONLY}","") +define do_so_links_1 +@if [ -h $(1)/$(2)} ] ; then \ + if [ `readlink $(1)/$(2)` != "$(3)" ]; then \ + rm $(1)/$(2); \ + ln -s $(3) $(1)/$(2); \ + fi \ +else \ + ln -s $(3) $(1)/$(2); \ +fi +endef -${SO_NAME_OUTxxx}: $(OBJ) $(LIBSDEP) - $(LINK.cc) $(LINK_OUTPUT_OPTION) ${START_OBJ} $(OBJ) $(LDLIBS) ${STDLIBS} ${END_OBJ} - @if [ -h $(OUTPUT_DIR)/${SO_NAMExx} ] ; then \ - if [ `readlink $(OUTPUT_DIR)/${SO_NAMExx}` != "${SO_NAMExxx}" ]; then \ - rm $(OUTPUT_DIR)/${SO_NAMExx}; \ - ln -s ${SO_NAMExxx} $(OUTPUT_DIR)/${SO_NAMExx}; \ - fi \ - else \ - ln -s ${SO_NAMExxx} $(OUTPUT_DIR)/${SO_NAMExx}; \ - fi - @if [ -h $(OUTPUT_DIR)/${SO_NAMEx} ] ; then \ - if [ `readlink $(OUTPUT_DIR)/${SO_NAMEx}` != "${SO_NAMExx}" ]; then \ - rm $(OUTPUT_DIR)/${SO_NAMEx}; \ - ln -s ${SO_NAMExx} $(OUTPUT_DIR)/${SO_NAMEx}; \ - fi \ - else \ - ln -s ${SO_NAMExx} $(OUTPUT_DIR)/${SO_NAMEx}; \ - fi - @if [ -h $(OUTPUT_DIR)/${SO_NAME} ] ; then \ - if [ `readlink $(OUTPUT_DIR)/${SO_NAME}` != "${SO_NAMEx}" ]; then \ - rm $(OUTPUT_DIR)/${SO_NAME}; \ - ln -s ${SO_NAMEx} $(OUTPUT_DIR)/${SO_NAME}; \ - fi \ - else \ - ln -s ${SO_NAMEx} $(OUTPUT_DIR)/${SO_NAME}; \ - fi +define do_so_links +$${SO_NAME_OUT$(2)xxx}: $$(OBJ$(2)) $$(LIBSDEP) + $$(LINK.$(1)) $$(LINK_OUTPUT_OPTION) $${START_OBJ} $$(OBJ$(2)) $$(LDLIBS) $${STDLIBS} $${END_OBJ} + $(call do_so_links_1,$$(OUTPUT_DIR$(2)),$${SO_NAME$(2)xx},$${SO_NAME$(2)xxx}) + $(call do_so_links_1,$$(OUTPUT_DIR$(2)),$${SO_NAME$(2)x},$${SO_NAME$(2)xx}) + $(call do_so_links_1,$$(OUTPUT_DIR$(2)),$${SO_NAME$(2)},$${SO_NAME$(2)x}) +endef -${SO_NAME_OUT_DBGxxx}: $(OBJ_DBG) $(LIBSDEP) - $(LINK.cc) $(LINK_OUTPUT_OPTION) ${START_OBJ} $(OBJ_DBG) $(LDLIBS) ${STDLIBS} ${END_OBJ} - @if [ -h $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}` != "${SO_NAME_DBGxxx}" ]; then \ - rm $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}; \ - ln -s ${SO_NAME_DBGxxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGxxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}; \ - fi - @if [ -h $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}` != "${SO_NAME_DBGxx}" ]; then \ - rm $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}; \ - ln -s ${SO_NAME_DBGxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}; \ - fi - @if [ -h $(OUTPUT_DIR_DBG)/${SO_NAME_DBG} ] ; then \ - if [ `readlink $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}` != "${SO_NAME_DBGx}" ]; then \ - rm $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}; \ - ln -s ${SO_NAME_DBGx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}; \ - fi - +ifeq ("${_C_SOURCES_ONLY}","") +$(eval $(call do_so_links,cc,)) +$(eval $(call do_so_links,cc,_DBG)) ifndef WITHOUT_STLPORT - -${SO_NAME_OUT_STLDBGxxx}: $(OBJ_STLDBG) $(LIBSDEP) - $(LINK.cc) $(LINK_OUTPUT_OPTION) ${START_OBJ} $(OBJ_STLDBG) $(LDLIBS) ${STDLIBS} ${END_OBJ} - @if [ -h $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}` != "${SO_NAME_STLDBGxxx}" ]; then \ - rm $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - ln -s ${SO_NAME_STLDBGxxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGxxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - fi - @if [ -h $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}` != "${SO_NAME_STLDBGxx}" ]; then \ - rm $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - ln -s ${SO_NAME_STLDBGxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - fi - @if [ -h $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG} ] ; then \ - if [ `readlink $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}` != "${SO_NAME_STLDBGx}" ]; then \ - rm $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - ln -s ${SO_NAME_STLDBGx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - fi - -# WITHOUT_STLPORT +$(eval $(call do_so_links,cc,_STLDBG)) endif - # _C_SOURCES_ONLY else - -${SO_NAME_OUTxxx}: $(OBJ) $(LIBSDEP) - $(LINK.c) $(LINK_OUTPUT_OPTION) $(OBJ) $(LDLIBS) - @if [ -h $(OUTPUT_DIR)/${SO_NAMExx} ] ; then \ - if [ `readlink $(OUTPUT_DIR)/${SO_NAMExx}` != "${SO_NAMExxx}" ]; then \ - rm $(OUTPUT_DIR)/${SO_NAMExx}; \ - ln -s ${SO_NAMExxx} $(OUTPUT_DIR)/${SO_NAMExx}; \ - fi \ - else \ - ln -s ${SO_NAMExxx} $(OUTPUT_DIR)/${SO_NAMExx}; \ - fi - @if [ -h $(OUTPUT_DIR)/${SO_NAMEx} ] ; then \ - if [ `readlink $(OUTPUT_DIR)/${SO_NAMEx}` != "${SO_NAMExx}" ]; then \ - rm $(OUTPUT_DIR)/${SO_NAMEx}; \ - ln -s ${SO_NAMExx} $(OUTPUT_DIR)/${SO_NAMEx}; \ - fi \ - else \ - ln -s ${SO_NAMExx} $(OUTPUT_DIR)/${SO_NAMEx}; \ - fi - @if [ -h $(OUTPUT_DIR)/${SO_NAME} ] ; then \ - if [ `readlink $(OUTPUT_DIR)/${SO_NAME}` != "${SO_NAMEx}" ]; then \ - rm $(OUTPUT_DIR)/${SO_NAME}; \ - ln -s ${SO_NAMEx} $(OUTPUT_DIR)/${SO_NAME}; \ - fi \ - else \ - ln -s ${SO_NAMEx} $(OUTPUT_DIR)/${SO_NAME}; \ - fi - -${SO_NAME_OUT_DBGxxx}: $(OBJ_DBG) $(LIBSDEP) - $(LINK.c) $(LINK_OUTPUT_OPTION) $(OBJ_DBG) $(LDLIBS) - @if [ -h $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}` != "${SO_NAME_DBGxxx}" ]; then \ - rm $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}; \ - ln -s ${SO_NAME_DBGxxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGxxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGxx}; \ - fi - @if [ -h $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}` != "${SO_NAME_DBGxx}" ]; then \ - rm $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}; \ - ln -s ${SO_NAME_DBGxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGxx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBGx}; \ - fi - @if [ -h $(OUTPUT_DIR_DBG)/${SO_NAME_DBG} ] ; then \ - if [ `readlink $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}` != "${SO_NAME_DBGx}" ]; then \ - rm $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}; \ - ln -s ${SO_NAME_DBGx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}; \ - fi \ - else \ - ln -s ${SO_NAME_DBGx} $(OUTPUT_DIR_DBG)/${SO_NAME_DBG}; \ - fi - +$(eval $(call do_so_links,c,)) +$(eval $(call do_so_links,c,_DBG)) ifndef WITHOUT_STLPORT - -${SO_NAME_OUT_STLDBGxxx}: $(OBJ_STLDBG) $(LIBSDEP) - $(LINK.c) $(LINK_OUTPUT_OPTION) $(OBJ_STLDBG) $(LDLIBS) - @if [ -h $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}` != "${SO_NAME_STLDBGxxx}" ]; then \ - rm $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - ln -s ${SO_NAME_STLDBGxxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGxxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGxx}; \ - fi - @if [ -h $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx} ] ; then \ - if [ `readlink $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}` != "${SO_NAME_STLDBGxx}" ]; then \ - rm $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - ln -s ${SO_NAME_STLDBGxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGxx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBGx}; \ - fi - @if [ -h $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG} ] ; then \ - if [ `readlink $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}` != "${SO_NAME_STLDBGx}" ]; then \ - rm $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - ln -s ${SO_NAME_STLDBGx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - fi \ - else \ - ln -s ${SO_NAME_STLDBGx} $(OUTPUT_DIR_STLDBG)/${SO_NAME_STLDBG}; \ - fi - -# WITHOUT_STLPORT +$(eval $(call do_so_links,c,_STLDBG)) endif - # !_C_SOURCES_ONLY endif Modified: branches/Makefiles/explore/Makefiles/gmake/targets.mak =================================================================== --- branches/Makefiles/explore/Makefiles/gmake/targets.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/gmake/targets.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,5 +1,13 @@ -# Time-stamp: <05/04/15 17:23:30 ptr> -# $Id$ +# Time-stamp: <06/11/02 22:27:08 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 +# Petr Ovtchenkov +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# # If we have no C++ sources, let's use C compiler for linkage instead of C++. ifeq ("$(sort ${SRC_CC} ${SRC_CPP} ${SRC_CXX})","") @@ -7,16 +15,92 @@ _C_SOURCES_ONLY := true endif -# if sources disposed in several dirs, calculate -# appropriate rules; here is recursive call! +# if sources disposed in several dirs, calculate appropriate rules DIRS_UNIQUE_SRC := $(dir $(SRC_CPP) $(SRC_CC) $(SRC_CXX) $(SRC_C) $(SRC_S) ) ifeq (${OSNAME},cygming) DIRS_UNIQUE_SRC += $(dir $(SRC_RC) ) endif DIRS_UNIQUE_SRC := $(sort $(DIRS_UNIQUE_SRC) ) -include ${RULESBASE}/${USE_MAKE}/dirsrc.mak +define rule_o_1 +$$(OUTPUT_DIR$(1))/%.o: $(4)%.$(2) + $$(COMPILE.$(3)) $$(OUTPUT_OPTION) $$< +endef + +define rule_d_1 +$$(OUTPUT_DIR$(1))/%.d: $(4)%.$(2) + @$$(COMPILE.$(3)) $$(CCDEPFLAGS) $$< $$(DP_OUTPUT_DIR$(1)) +endef + +define rule_o +$(eval $(call rule_o_1,$(2),cpp,cc,$(1))) +$(eval $(call rule_o_1,$(2),cc,cc,$(1))) +$(eval $(call rule_o_1,$(2),cxx,cc,$(1))) +$(eval $(call rule_o_1,$(2),c,c,$(1))) +$(eval $(call rule_o_1,$(2),s,s,$(1))) +$(eval $(call rule_o_1,$(2),S,S,$(1))) +endef + +define rule_d +$(eval $(call rule_d_1,$(2),cpp,cc,$(1))) +$(eval $(call rule_d_1,$(2),cc,cc,$(1))) +$(eval $(call rule_d_1,$(2),cxx,cc,$(1))) +$(eval $(call rule_d_1,$(2),c,c,$(1))) +$(eval $(call rule_d_1,$(2),s,s,$(1))) +$(eval $(call rule_d_1,$(2),S,S,$(1))) +endef + +ifeq ($(OSNAME),cygming) +define rule_rc_1 +$$(OUTPUT_DIR$(1))/%.res: $(4)%.$(2) + $$(COMPILE.$(3)) $$(RC_OUTPUT_OPTION) $$< +endef + +define rule_rc +$(eval $(call rule_rc_1,$(2),rc,rc,$(1))) +endef +endif + +define rules_ +# Rules for release output: +$(eval $(call rule_o,$(1),)) +$(eval $(call rule_d,$(1),)) + +ifneq ($(OUTPUT_DIR),$(OUTPUT_DIR_A)) +$(eval $(call rule_o,$(1),_A)) +$(eval $(call rule_d,$(1),_A)) +endif + +# Rules for debug output: +$(eval $(call rule_o,$(1),_DBG)) +$(eval $(call rule_d,$(1),_DBG)) + +ifneq ($(OUTPUT_DIR_DBG),$(OUTPUT_DIR_A_DBG)) +$(eval $(call rule_o,$(1),_A_DBG)) +$(eval $(call rule_d,$(1),_A_DBG)) +endif + +ifndef WITHOUT_STLPORT +# Rules for STLport debug output: +$(eval $(call rule_o,$(1),_STLDBG)) +$(eval $(call rule_d,$(1),_STLDBG)) + +ifneq ($(OUTPUT_DIR_STLDBG),$(OUTPUT_DIR_A_STLDBG)) +$(eval $(call rule_o,$(1),_A_STLDBG)) +$(eval $(call rule_d,$(1),_A_STLDBG)) +endif +endif + +ifeq ($(OSNAME),cygming) +$(eval $(call rule_rc,$(1),)) +$(eval $(call rule_rc,$(1),_DBG)) +$(eval $(call rule_rc,$(1),_STLDBG)) +endif +endef + +$(foreach dir,$(DIRS_UNIQUE_SRC),$(eval $(call rules_,$(dir)))) + ALLBASE := $(basename $(notdir $(SRC_CC) $(SRC_CPP) $(SRC_CXX) $(SRC_C) $(SRC_S))) ifeq (${OSNAME},cygming) RCBASE += $(basename $(notdir $(SRC_RC))) Deleted: branches/Makefiles/explore/Makefiles/rules-d.mak =================================================================== --- branches/Makefiles/explore/Makefiles/rules-d.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/rules-d.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,92 +0,0 @@ -# -*- Makefile -*- Time-stamp: <05/08/04 07:42:06 ptr> -# $Id$ - -# Rules for release output: - -$(OUTPUT_DIR)/%.d: $(WORD1)%.cpp - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR) - -$(OUTPUT_DIR)/%.d: $(WORD1)%.cc - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR) - -$(OUTPUT_DIR)/%.d: $(WORD1)%.cxx - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR) - -$(OUTPUT_DIR)/%.d: $(WORD1)%.c - @$(COMPILE.c) $(CDEPFLAGS) $< $(DP_OUTPUT_DIR) - -ifneq ($(OUTPUT_DIR),$(OUTPUT_DIR_A)) - -$(OUTPUT_DIR_A)/%.d: $(WORD1)%.cpp - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR) - -$(OUTPUT_DIR_A)/%.d: $(WORD1)%.cc - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR) - -$(OUTPUT_DIR_A)/%.d: $(WORD1)%.cxx - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR) - -$(OUTPUT_DIR_A)/%.d: $(WORD1)%.c - @$(COMPILE.c) $(CDEPFLAGS) $< $(DP_OUTPUT_DIR) - -endif - -# Rules for debug output: - -$(OUTPUT_DIR_DBG)/%.d: $(WORD1)%.cpp - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -$(OUTPUT_DIR_DBG)/%.d: $(WORD1)%.cc - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -$(OUTPUT_DIR_DBG)/%.d: $(WORD1)%.cxx - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -$(OUTPUT_DIR_DBG)/%.d: $(WORD1)%.c - @$(COMPILE.c) $(CDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -ifneq ($(OUTPUT_DIR_DBG),$(OUTPUT_DIR_A_DBG)) - -$(OUTPUT_DIR_A_DBG)/%.d: $(WORD1)%.cpp - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -$(OUTPUT_DIR_A_DBG)/%.d: $(WORD1)%.cc - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -$(OUTPUT_DIR_A_DBG)/%.d: $(WORD1)%.cxx - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -$(OUTPUT_DIR_A_DBG)/%.d: $(WORD1)%.c - @$(COMPILE.c) $(CDEPFLAGS) $< $(DP_OUTPUT_DIR_DBG) - -endif - -# Rules for STLport debug output: - -$(OUTPUT_DIR_STLDBG)/%.d: $(WORD1)%.cpp - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -$(OUTPUT_DIR_STLDBG)/%.d: $(WORD1)%.cc - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -$(OUTPUT_DIR_STLDBG)/%.d: $(WORD1)%.cxx - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -$(OUTPUT_DIR_STLDBG)/%.d: $(WORD1)%.c - @$(COMPILE.c) $(CDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -ifneq ($(OUTPUT_DIR_STLDBG),$(OUTPUT_DIR_A_STLDBG)) - -$(OUTPUT_DIR_A_STLDBG)/%.d: $(WORD1)%.cpp - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -$(OUTPUT_DIR_A_STLDBG)/%.d: $(WORD1)%.cc - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -$(OUTPUT_DIR_A_STLDBG)/%.d: $(WORD1)%.cxx - @$(COMPILE.cc) $(CCDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -$(OUTPUT_DIR_A_STLDBG)/%.d: $(WORD1)%.c - @$(COMPILE.c) $(CDEPFLAGS) $< $(DP_OUTPUT_DIR_STLDBG) - -endif Deleted: branches/Makefiles/explore/Makefiles/rules-o.mak =================================================================== --- branches/Makefiles/explore/Makefiles/rules-o.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/rules-o.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,128 +0,0 @@ -# -*- Makefile -*- Time-stamp: <05/04/18 08:02:06 ptr> -# $Id$ - -# Rules for release output: - -$(OUTPUT_DIR)/%.o: $(WORD1)%.cpp - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR)/%.o: $(WORD1)%.cc - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR)/%.o: $(WORD1)%.cxx - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR)/%.o: $(WORD1)%.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR)/%.o: $(WORD1)%.s - $(COMPILE.s) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR)/%.o: $(WORD1)%.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -ifneq ($(OUTPUT_DIR),$(OUTPUT_DIR_A)) - -$(OUTPUT_DIR_A)/%.o: $(WORD1)%.cpp - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A)/%.o: $(WORD1)%.cc - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A)/%.o: $(WORD1)%.cxx - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A)/%.o: $(WORD1)%.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A)/%.o: $(WORD1)%.s - $(COMPILE.s) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A)/%.o: $(WORD1)%.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -endif - -# Rules for debug output: - -$(OUTPUT_DIR_DBG)/%.o: $(WORD1)%.cpp - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_DBG)/%.o: $(WORD1)%.cc - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_DBG)/%.o: $(WORD1)%.cxx - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_DBG)/%.o: $(WORD1)%.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_DBG)/%.o: $(WORD1)%.s - $(COMPILE.s) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_DBG)/%.o: $(WORD1)%.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -ifneq ($(OUTPUT_DIR_DBG),$(OUTPUT_DIR_A_DBG)) - -$(OUTPUT_DIR_A_DBG)/%.o: $(WORD1)%.cpp - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_DBG)/%.o: $(WORD1)%.cc - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_DBG)/%.o: $(WORD1)%.cxx - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_DBG)/%.o: $(WORD1)%.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_DBG)/%.o: $(WORD1)%.s - $(COMPILE.s) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_DBG)/%.o: $(WORD1)%.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -endif - -# Rules for STLport debug output: - -$(OUTPUT_DIR_STLDBG)/%.o: $(WORD1)%.cpp - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_STLDBG)/%.o: $(WORD1)%.cc - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_STLDBG)/%.o: $(WORD1)%.cxx - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_STLDBG)/%.o: $(WORD1)%.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_STLDBG)/%.o: $(WORD1)%.s - $(COMPILE.s) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_STLDBG)/%.o: $(WORD1)%.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -ifneq ($(OUTPUT_DIR_STLDBG),$(OUTPUT_DIR_A_STLDBG)) - -$(OUTPUT_DIR_A_STLDBG)/%.o: $(WORD1)%.cpp - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_STLDBG)/%.o: $(WORD1)%.cc - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_STLDBG)/%.o: $(WORD1)%.cxx - $(COMPILE.cc) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_STLDBG)/%.o: $(WORD1)%.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_STLDBG)/%.o: $(WORD1)%.s - $(COMPILE.s) $(OUTPUT_OPTION) $< - -$(OUTPUT_DIR_A_STLDBG)/%.o: $(WORD1)%.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -endif Deleted: branches/Makefiles/explore/Makefiles/rules-res.mak =================================================================== --- branches/Makefiles/explore/Makefiles/rules-res.mak 2006-11-02 16:50:58 UTC (rev 1387) +++ branches/Makefiles/explore/Makefiles/rules-res.mak 2006-11-02 19:31:21 UTC (rev 1388) @@ -1,19 +0,0 @@ -# -*- Makefile -*- Time-stamp: <03/10/27 18:12:46 ptr> -# $Id$ - -# Rules for release output: - -$(OUTPUT_DIR)/%.res: $(WORD1)%.rc - $(COMPILE.rc) $(RC_OUTPUT_OPTION) $< - -# Rules for debug output: - -$(OUTPUT_DIR_DBG)/%.res: $(WORD1)%.rc - $(COMPILE.rc) $(RC_OUTPUT_OPTION) $< - -# Rules for STLport debug output: - -$(OUTPUT_DIR_STLDBG)/%.res: $(WORD1)%.rc - $(COMPILE.rc) $(RC_OUTPUT_OPTION) $< - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |