[complement-svn] SF.net SVN: complement: [1710] trunk/complement/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-08-29 12:15:27
|
Revision: 1710 http://complement.svn.sourceforge.net/complement/?rev=1710&view=rev Author: complement Date: 2007-08-29 05:15:22 -0700 (Wed, 29 Aug 2007) Log Message: ----------- gmake/targetdirs.mak: default installation path is /usr/local now; BASE_INSTALL_*_DIR now free from TARGET_NAME prefix, TARGET_NAME prefix appear in INSTALL_*_DIR* as prefix for lib, bin, etc.; gmake/linux/sys.mak: add INSTALL_D for directory creation during installation and INSTALL_F for installing plain file, like header; configure: process --prefix --bindir, --libdir, --includedir (paths for installation); configure may run not only from same dir; gmake/unix/rules-install-so.mak: installation of headers, dummy yet. lib/mt/Makefile: experiments with installation of headers. Modified Paths: -------------- trunk/complement/explore/Makefiles/ChangeLog trunk/complement/explore/Makefiles/gmake/linux/sys.mak trunk/complement/explore/Makefiles/gmake/targetdirs.mak trunk/complement/explore/Makefiles/gmake/unix/rules-install-so.mak trunk/complement/explore/configure trunk/complement/explore/lib/mt/Makefile Modified: trunk/complement/explore/Makefiles/ChangeLog =================================================================== --- trunk/complement/explore/Makefiles/ChangeLog 2007-08-29 05:27:04 UTC (rev 1709) +++ trunk/complement/explore/Makefiles/ChangeLog 2007-08-29 12:15:22 UTC (rev 1710) @@ -1,3 +1,16 @@ +2007-08-29 Petr Ovtchenkov <pt...@is...> + + * gmake/targetdirs.mak: default installation path is /usr/local + now; BASE_INSTALL_*_DIR now free from TARGET_NAME prefix, + TARGET_NAME prefix appear in INSTALL_*_DIR* as prefix for lib, + bin, etc.; + + * gmake/linux/sys.mak: add INSTALL_D for directory creation during + installation and INSTALL_F for installing plain file, like header; + + * gmake/unix/rules-install-so.mak: installation of headers, + dummy yet. + 2007-08-17 Petr Ovtchenkov <pt...@is...> * gmake/app/gcc.mak, gmake/lib/gcc.mak: use ${CXXFLAGS} when Modified: trunk/complement/explore/Makefiles/gmake/linux/sys.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/linux/sys.mak 2007-08-29 05:27:04 UTC (rev 1709) +++ trunk/complement/explore/Makefiles/gmake/linux/sys.mak 2007-08-29 12:15:22 UTC (rev 1710) @@ -1,6 +1,6 @@ # Time-stamp: <06/11/10 23:43:27 ptr> # -# Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 # Petr Ovtchenkov # # Portion Copyright (c) 1999-2001 @@ -20,6 +20,8 @@ INSTALL_SO := ${INSTALL} -c -m 0755 ${_INSTALL_STRIP_OPTION} INSTALL_A := ${INSTALL} -c -m 0644 INSTALL_EXE := ${INSTALL} -c -m 0755 +INSTALL_D := ${INSTALL} -d -m 0755 +INSTALL_F := ${INSTALL} -c -p -m 0644 # bash's built-in test is like extern # EXT_TEST := /usr/bin/test Modified: trunk/complement/explore/Makefiles/gmake/targetdirs.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/targetdirs.mak 2007-08-29 05:27:04 UTC (rev 1709) +++ trunk/complement/explore/Makefiles/gmake/targetdirs.mak 2007-08-29 12:15:22 UTC (rev 1710) @@ -33,21 +33,24 @@ OUTPUT_DIR_A_STLDBG := $(OUTPUT_DIR_STLDBG) endif -BASE_INSTALL_DIR ?= ${SRCROOT}/build/$(TARGET_NAME) +# BASE_INSTALL_DIR ?= ${SRCROOT}/build/$(TARGET_NAME) +BASE_INSTALL_DIR ?= /usr/local BASE_INSTALL_LIB_DIR ?= ${BASE_INSTALL_DIR} BASE_INSTALL_BIN_DIR ?= ${BASE_INSTALL_DIR} +BASE_INSTALL_HDR_DIR ?= ${BASE_INSTALL_DIR} -INSTALL_LIB_DIR ?= ${BASE_INSTALL_LIB_DIR}lib -INSTALL_LIB_DIR_DBG ?= ${BASE_INSTALL_LIB_DIR}lib +INSTALL_LIB_DIR ?= ${BASE_INSTALL_LIB_DIR}/${TARGET_NAME}lib +INSTALL_LIB_DIR_DBG ?= ${BASE_INSTALL_LIB_DIR}/${TARGET_NAME}lib ifndef WITHOUT_STLPORT -INSTALL_LIB_DIR_STLDBG ?= ${BASE_INSTALL_LIB_DIR}lib +INSTALL_LIB_DIR_STLDBG ?= ${BASE_INSTALL_LIB_DIR}/${TARGET_NAME}lib endif -INSTALL_BIN_DIR ?= ${BASE_INSTALL_BIN_DIR}bin +INSTALL_BIN_DIR ?= ${BASE_INSTALL_BIN_DIR}/${TARGET_NAME}bin INSTALL_BIN_DIR_DBG ?= ${INSTALL_BIN_DIR}_g ifndef WITHOUT_STLPORT INSTALL_BIN_DIR_STLDBG ?= ${INSTALL_BIN_DIR}_stlg endif +INSTALL_HDR_DIR ?= ${BASE_INSTALL_DIR}/include ifndef WITHOUT_STLPORT OUTPUT_DIRS := $(OUTPUT_DIR) $(OUTPUT_DIR_DBG) $(OUTPUT_DIR_STLDBG) \ Modified: trunk/complement/explore/Makefiles/gmake/unix/rules-install-so.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/unix/rules-install-so.mak 2007-08-29 05:27:04 UTC (rev 1709) +++ trunk/complement/explore/Makefiles/gmake/unix/rules-install-so.mak 2007-08-29 12:15:22 UTC (rev 1710) @@ -79,7 +79,7 @@ endif -PHONY += install install-strip $(INSTALL_TAGS) $(INSTALL_STRIP_TAGS) +PHONY += install install-strip install-headers $(INSTALL_TAGS) $(INSTALL_STRIP_TAGS) install: $(INSTALL_TAGS) @@ -139,3 +139,34 @@ install-stldbg-shared: stldbg-shared $(INSTALL_LIB_DIR_STLDBG) $(INSTALL_LIB_DIR_STLDBG)/${SO_NAME_STLDBGxxx} ${POST_INSTALL_STLDBG} endif + +define do_install_headers +if [ ! -d $(INSTALL_HDR_DIR) ]; then \ + echo $(INSTALL_D) $(INSTALL_HDR_DIR); \ +fi; \ +for dd in $(HEADERS_BASE); do \ + d=`dirname $$dd`; \ + h=`basename $$dd`; \ + f=`cd $$d; find $$h \( -type d \( -wholename "*/.svn" -o -prune \) \) -print`; \ + for ddd in $$f; do \ + if [ ! -d $(INSTALL_HDR_DIR)/$$ddd ]; then \ + echo $(INSTALL_D) $(INSTALL_HDR_DIR)/$$ddd; \ + fi; \ + done; \ + f=`find $$dd \( -type f \( \! \( -wholename "*/.svn/*" -o -name "*~" -o -name "*.bak" \) \) \) -print`; \ + for ff in $$f; do \ + h=`echo $$ff | sed -e "s|$$d|$(INSTALL_HDR_DIR)|"`; \ + echo $(INSTALL_F) $$ff $$h; \ + done; \ +done; \ +for f in $(HEADERS); do \ + h=`basename $$f`; \ + echo $(INSTALL_F) $$f $(INSTALL_HDR_DIR)/$$h; \ +done +endef + +# _HEADERS_FROM = $(shell for dd in $(HEADERS_BASE); do find $$dd \( -type f \( \! \( -wholename "*/.svn/*" -o -name "*~" -o -name "*.bak" \) \) \) -print ; done ) +# _HEADERS_TO = $(foreach d,$(HEADERS_BASE),$(patsubst $(d)/%,$(BASE_INSTALL_DIR)include/%,$(_HEADERS_FROM))) + +install-headers: + @$(do_install_headers) Modified: trunk/complement/explore/configure =================================================================== --- trunk/complement/explore/configure 2007-08-29 05:27:04 UTC (rev 1709) +++ trunk/complement/explore/configure 2007-08-29 12:15:22 UTC (rev 1710) @@ -1,10 +1,10 @@ #!/bin/sh -# Time-stamp: <07/06/08 23:24:03 ptr> +# Time-stamp: <07/08/29 11:36:31 ptr> -configmak=Makefiles/gmake/config.mak +base=`dirname $0` -# rm -f ${configmak} +configmak=$base/Makefiles/gmake/config.mak # echo "# STLPORT_DIR := /export/home/windows/guest/STLlab/STLport" >> ${configmak} # echo "# MSVC_DIR := c:/Program Files/Microsoft Visual Studio/VC98" >> ${configmak} @@ -25,8 +25,15 @@ Available options: + --prefix=<dir> base install path (/usr/local/) + --bindir=<dir> install path for executables (PREFIX/bin) + --libdir=<dir> install path for libraries (PREFIX/lib) + --includedir=<dir> install path for headers (PREFIX/include) + --target=<target> target platform (cross-compiling) + --help print this help message and exit + --with-stlport=<dir> use STLport in catalog <dir> --without-stlport compile without STLport (default) --with-boost=<dir> use boost headers in catalog <dir> @@ -68,6 +75,9 @@ if [ "$compiler_family_set" = "" ]; then write_option gcc COMPILER_NAME fi + # if [ "$prefix_set" = "" ]; then + # write_option "/usr/local" BASE_INSTALL_DIR + # fi } case $# in @@ -168,6 +178,19 @@ esac compiler_family_set=y ;; + --prefix=*) + write_option "$option" BASE_INSTALL_DIR + # prefix_set=y + ;; + --bindir=*) + write_option "$option" INSTALL_BIN_DIR + ;; + --libdir=*) + write_option "$option" INSTALL_LIB_DIR + ;; + --includedir=*) + write_option "$option" INSTALL_HDR_DIR + ;; esac done Modified: trunk/complement/explore/lib/mt/Makefile =================================================================== --- trunk/complement/explore/lib/mt/Makefile 2007-08-29 05:27:04 UTC (rev 1709) +++ trunk/complement/explore/lib/mt/Makefile 2007-08-29 12:15:22 UTC (rev 1710) @@ -6,6 +6,7 @@ include ${SRCROOT}/Makefiles/gmake/top.mak INCLUDES += -I$(SRCROOT)/include +HEADERS_BASE = $(SRCROOT)/include/mt $(SRCROOT)/include/config $(SRCROOT)/include/misc check: all-shared $(MAKE) -C ut all-shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |