diff options
-rw-r--r-- | mysqlcppconn/makefile.mk | 34 | ||||
-rw-r--r-- | solenv/inc/tg_ext.mk | 29 |
2 files changed, 27 insertions, 36 deletions
diff --git a/mysqlcppconn/makefile.mk b/mysqlcppconn/makefile.mk index a6534a2f43ed..d7fa8a6f380f 100644 --- a/mysqlcppconn/makefile.mk +++ b/mysqlcppconn/makefile.mk @@ -27,21 +27,10 @@ PRJ=. -# distro-specific builds want to link against a particular mysql library -# then they do not require mysql-devel package at runtime -# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate patch -# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql library -.IF "$(SYSTEM_MYSQL)" == "YES" -MYSQL_BINDING=static -.ELSE -MYSQL_BINDING=dynamic -.ENDIF - PRJNAME=mysqlcppconn -EXT_PROJECT_NAME=mysql-connector-c++-1.1.0 -TARGET=so_mysqlcppconn_binding-$(MYSQL_BINDING) -TARFILE_ROOTDIR=mysql-connector-c++-1.1.0_binding-$(MYSQL_BINDING) +TARGET=so_mysqlcppconn +EXT_PROJECT_NAME=mysql-connector-c++-1.1.0 # --- Settings ----------------------------------------------------- @@ -60,6 +49,16 @@ ADDITIONAL_FILES=\ CONVERTFILES=\ cppconn$/build_config.h +# distro-specific builds want to link against a particular mysql library +# then they do not require mysql-devel package at runtime +# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate patch +# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql library +.IF "$(SYSTEM_MYSQL)" == "YES" +MYSQL_BINDING=static +.ELSE +MYSQL_BINDING=dynamic +.ENDIF + PATCH_FILES=\ $(TARFILE_NAME).patch \ $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \ @@ -67,11 +66,6 @@ PATCH_FILES=\ BUILD_DIR=driver BUILD_ACTION = \ - if test -e ../../lastbuild; then LASTBUILD=$$(cat ../../lastbuild); else LASTBUILD='$(MYSQL_BINDING)'; fi && \ - if test "$${LASTBUILD}" != "$(MYSQL_BINDING)"; then \ - rm -f ../$(BACK_PATH)/slo/* ../../so_built_so_mysqlcppconn_binding-$${LASTBUILD}; \ - fi && \ - echo "$(MYSQL_BINDING)" > ../../lastbuild && \ cd nativeapi \ && $(MAKE) $(MFLAGS) $(CALLMACROS) \ && cd .. \ @@ -94,9 +88,9 @@ BUILD_ACTION = \ NORMALIZE_FLAG_FILE=so_normalized_$(TARGET) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE) - @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/driver$/mysql_driver.h $(INCCOM) + @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h $(INCCOM) -@$(MKDIRHIER) $(INCCOM)$/cppconn - @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/cppconn$/* $(INCCOM)$/cppconn + @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* $(INCCOM)$/cppconn @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk index e6960549cbc3..0adec0c96683 100644 --- a/solenv/inc/tg_ext.mk +++ b/solenv/inc/tg_ext.mk @@ -54,13 +54,10 @@ ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build BACK_PATH=../../../ #MUST match with reference (currently MISC) MBACK_PATH=../../ -fake_root_dir=/$(TARFILE_ROOTDIR) +.IF "$(TARFILE_IS_FLAT)" != "" +fake_root_dir=/$(TARFILE_NAME) #MUST match fake_root_dir in directory levels fake_back=../ -.IF "$(TARFILE_IS_FLAT)" != "" -TAR_STRIP_LEVEL=0 -.ELSE -TAR_STRIP_LEVEL=1 .ENDIF "$(TARFILE_IS_FLAT)" != "" TARFILE_LOCATION*=$(BACK_PATH)$(fake_back)download @@ -109,9 +106,9 @@ clean: $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2 @-$(RM) $@ .IF "$(GUI)"=="UNX" - @noop $(assign UNPACKCMD := sh -c "bzip2 -cd $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f - ") + @noop $(assign UNPACKCMD := sh -c "bzip2 -cd $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - ") .ELSE # "$(GUI)"=="UNX" - @noop $(assign UNPACKCMD := bzip2 -cd $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f - ) + @noop $(assign UNPACKCMD := bzip2 -cd $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - ) .ENDIF # "$(GUI)"=="UNX" @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) @$(RENAME) $@.$(INPATH) $@ @@ -119,28 +116,28 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.Z @-$(RM) $@ .IF "$(GUI)"=="UNX" - @noop $(assign UNPACKCMD := sh -c "uncompress -c $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.Z | $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f - ") + @noop $(assign UNPACKCMD := sh -c "uncompress -c $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.Z | $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - ") .ELSE # "$(GUI)"=="UNX" - @noop $(assign UNPACKCMD := uncompress -c $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.Z | $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f - ) + @noop $(assign UNPACKCMD := uncompress -c $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.Z | $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - ) .ENDIF # "$(GUI)"=="UNX" @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) @$(RENAME) $@.$(INPATH) $@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.gz @-$(RM) $@ - @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.gz) $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f - ) + @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.gz) $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - ) @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) @$(RENAME) $@.$(INPATH) $@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tgz @-$(RM) $@ - @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tgz) $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f - ) + @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tgz) $(TARFILE_FILTER) | $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - ) @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) @$(RENAME) $@.$(INPATH) $@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar @-$(RM) $@ - @noop $(assign UNPACKCMD := $(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) -x$(tar_verbose_switch)f $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar) + @noop $(assign UNPACKCMD := $(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar) @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) @$(RENAME) $@.$(INPATH) $@ @@ -192,9 +189,9 @@ $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) $(COMMAND_ECHO)$(TOUCH) $@ .ELSE # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" .IF "$(GUI)"=="WNT" - $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | (cd .$(fake_root_dir) && patch $(PATCHFLAGS) -p3 ) && $(TOUCH) $(PATCH_FLAG_FILE) + $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) .ELSE # "$(GUI)"=="WNT" - $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | (cd .$(fake_root_dir) && $(GNUPATCH) $(PATCHFLAGS) -p3 ) && $(TOUCH) $(PATCH_FLAG_FILE) + $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) .ENDIF # "$(GUI)"=="WNT" .ENDIF # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" .IF "$(T_ADDITIONAL_FILES)"!="" @@ -304,10 +301,10 @@ $(MISC)/$(TARFILE_ROOTDIR).done : $(MISC)/$(TARFILE_MD5)-$(TARFILE_NAME).unpack #.IF "$(my4ver:s/.//:s/,//)" >= "300" # $(COMMAND_ECHO)cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) #.ELSE # "$(my4ver:s/.//:s/,//)" >= "300" - $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | (cd .$(fake_root_dir) && patch $(PATCHFLAGS) -p3 ) + $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 #.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300" .ELSE # "$(GUI)"=="WNT" - $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | ( cd .$(fake_root_dir) && $(GNUPATCH) $(PATCHFLAGS) -p3 ) + $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 .ENDIF # "$(GUI)"=="WNT" .IF "$(CONVERTFILES)"!="" $(COMMAND_ECHO)$(CONVERT) dos $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i) |