Repository: incubator-trafodion Updated Branches: refs/heads/master bb759855b -> 64e085694
Changed the source package name to contain the version info Fixed trafci banner issue for non-unix machines Fixed other minor issues Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4e278421 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4e278421 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4e278421 Branch: refs/heads/master Commit: 4e2784214bad33882719e766f8b3e5798f3301a1 Parents: 444e040 Author: Anuradha Hegde <anuradha.he...@esgyn.com> Authored: Mon Oct 5 17:32:40 2015 +0000 Committer: Anuradha Hegde <anuradha.he...@esgyn.com> Committed: Mon Oct 5 17:32:40 2015 +0000 ---------------------------------------------------------------------- Makefile | 52 +++++++++++++++++++++-------- core/conn/trafci/build.xml | 22 ++++++++++-- core/conn/trafci/utils/trafci.cmd | 32 ------------------ core/conn/trafci/utils/trafci.cmd-tmpl | 34 +++++++++++++++++++ core/rest/Makefile | 2 +- core/sqf/Makefile | 7 +++- dcs/Makefile | 2 +- 7 files changed, 99 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/Makefile ---------------------------------------------------------------------- diff --git a/Makefile b/Makefile index 15a8493..eca989e 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,54 @@ - -all: - echo "Building all Trafodion components" +## Top-level Makefile for building Trafodion components + +# @@@ START COPYRIGHT @@@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# @@@ END COPYRIGHT @@@ + +.PHONY: all +SRCDIR = $(shell echo $(TRAFODION_VER_PROD) | sed -e 's/ /-/g' | tr 'A-Z' 'a-z') + +all: + @echo "Building all Trafodion components" cd core && $(MAKE) all package: all - echo "Packaging Trafodion components" + @echo "Packaging Trafodion components" cd core && $(MAKE) package package-all: package - echo "Packaging all Trafodion components" + @echo "Packaging all Trafodion components" cd core && $(MAKE) package-all -package-src: - echo "Packaging source for all Trafodion components" +package-src: + @echo "Packaging source for $(TRAFODION_VER_PROD) $(TRAFODION_VER)" mkdir -p distribution - git ls-files |tar -cf distribution/trafodion-src.tar.gz -T - + git archive --format tar --prefix $(SRCDIR)-${TRAFODION_VER}/ HEAD --output distribution/$(SRCDIR)-${TRAFODION_VER}.tgz eclipse: - echo "Making eclipse projects for Trafodion components" + @echo "Making eclipse projects for Trafodion components" cd core && $(MAKE) eclipse - -clean: - echo "Removing Trafodion objects" +clean: + @echo "Removing Trafodion objects" cd core && $(MAKE) clean -cleanall: - echo "Removing all Trafodion objects" +cleanall: + @echo "Removing all Trafodion objects" cd core && $(MAKE) cleanall http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/core/conn/trafci/build.xml ---------------------------------------------------------------------- diff --git a/core/conn/trafci/build.xml b/core/conn/trafci/build.xml index 20710dc..90d8806 100644 --- a/core/conn/trafci/build.xml +++ b/core/conn/trafci/build.xml @@ -64,8 +64,16 @@ <property name="tar.file" value="trafci.tar" /> <property name="installer.zipfile" value="trafci.zip" /> <property name="vproc.version" value="TrafCI_Build_${bldId}"/> + <property environment="my_env"/> + + <target name="ProductVersion"> + <echo> + ${my_env.TRAFODION_VER_PROD} + ${my_env.PRODUCT_COPYRIGHT_HEADER} + </echo> + </target> - <target name="clean"> + <target name="clean" depends="ProductVersion"> <delete dir="${temp.dir}"/> <delete dir="${platform-install.dir}"/> </target> @@ -104,7 +112,7 @@ </target> - <target name="build" depends="compile"> + <target name="build" depends="compile, ProductVersion"> <copy todir="${Properties.dest}"> <fileset dir="${Properties.src}"/> </copy> @@ -132,7 +140,7 @@ <target name="deploy" depends="build"> <copy todir="${deploy.dir}/bin"> - <fileset dir="${utils.dir}" excludes="**/*.contrib*, ciencr.sh, onplatform.sh, README, trafci_install.sh"/> + <fileset dir="${utils.dir}" excludes="**/*.contrib*, ciencr.sh, onplatform.sh, README, trafci_install.sh, trafci.cmd-tmpl"/> </copy> <copy todir="${deploy.dir}/lib"> <fileset dir="${lib.dir}" excludes="**/*.contrib*, *.db, **/*.db"/> @@ -150,6 +158,14 @@ </manifest> </jar> + <copy file="${utils.dir}/trafci.cmd-tmpl" + tofile="${utils.dir}/trafci.cmd" + overwrite="true"> + </copy> + + <replace file="${utils.dir}/trafci.cmd" token="@prodver@" value="${my_env.TRAFODION_VER_PROD}"/> + <replace file="${utils.dir}/trafci.cmd" token="@copyrighthdr@" value="${my_env.PRODUCT_COPYRIGHT_HEADER}"/> + <copy file="${utils.dir}/README" todir="${deploy.dir}" overwrite="true" /> <tar destfile="${deploy.dir}/${tar.file}" basedir="${deploy.dir}" includes="*.jar,README"> http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/core/conn/trafci/utils/trafci.cmd ---------------------------------------------------------------------- diff --git a/core/conn/trafci/utils/trafci.cmd b/core/conn/trafci/utils/trafci.cmd deleted file mode 100644 index 110c112..0000000 --- a/core/conn/trafci/utils/trafci.cmd +++ /dev/null @@ -1,32 +0,0 @@ -@echo off&Title Trafodion Command Interface - -CLS -set MY_SQROOT= -set CMD_LINE_ARGS= -set TRAFCI_QUERY_STRING= -set TRAFCI_CLASSPATH="##TRAFCI_CLASSPATH##" -set ROLE_ARGS=-r "" -set count=0 - -:set_args_loop - -set /a count+=1 -set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 -shift /1 -if %count%==16 goto after_set_args_loop - -goto set_args_loop - -:after_set_args_loop -set binlocation=%~dp0 -set driver=%binlocation:~0,2% -%driver% -cd %binlocation% -java -classpath %TRAFCI_CLASSPATH% org.trafodion.ci.UserInterface %CMD_LINE_ARGS% - -if not %ERRORLEVEL% EQU -9999 goto end_loop -echo. -echo Press any key to close this session -pause > nul - -:end_loop http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/core/conn/trafci/utils/trafci.cmd-tmpl ---------------------------------------------------------------------- diff --git a/core/conn/trafci/utils/trafci.cmd-tmpl b/core/conn/trafci/utils/trafci.cmd-tmpl new file mode 100644 index 0000000..578135f --- /dev/null +++ b/core/conn/trafci/utils/trafci.cmd-tmpl @@ -0,0 +1,34 @@ +@echo off&Title Trafodion Command Interface + +CLS +set MY_SQROOT= +set CMD_LINE_ARGS= +set TRAFODION_VER_PROD=@prodver@ +set PRODUCT_COPYRIGHT_HEADER=@copyrighthdr@ +set TRAFCI_QUERY_STRING= +set TRAFCI_CLASSPATH="##TRAFCI_CLASSPATH##" +set ROLE_ARGS=-r "" +set count=0 + +:set_args_loop + +set /a count+=1 +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift /1 +if %count%==16 goto after_set_args_loop + +goto set_args_loop + +:after_set_args_loop +set binlocation=%~dp0 +set driver=%binlocation:~0,2% +%driver% +cd %binlocation% +java -classpath %TRAFCI_CLASSPATH% org.trafodion.ci.UserInterface %CMD_LINE_ARGS% + +if not %ERRORLEVEL% EQU -9999 goto end_loop +echo. +echo Press any key to close this session +pause > nul + +:end_loop http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/core/rest/Makefile ---------------------------------------------------------------------- diff --git a/core/rest/Makefile b/core/rest/Makefile index 738409e..9a2a1be 100644 --- a/core/rest/Makefile +++ b/core/rest/Makefile @@ -46,7 +46,7 @@ build_chk: @if [ $(MY_SQROOT)/export/include/SCMBuildStr.h -nt target/$(BLD_TRAFODION_REST_TARNAME) ]; then echo "update manifest"; $(RM) -f target/$(BLD_TRAFODION_REST_TARNAME); fi clean: - $(MAVEN) clean + -$(MAVEN) clean |grep ERROR $(RM) build_rest.log $(RM) $(VFILE) $(RM) ../../${DISTRIBUTION_DIR}/$(BLD_TRAFODION_REST_TARNAME) http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/core/sqf/Makefile ---------------------------------------------------------------------- diff --git a/core/sqf/Makefile b/core/sqf/Makefile index f2da684..7efd2e9 100644 --- a/core/sqf/Makefile +++ b/core/sqf/Makefile @@ -44,6 +44,11 @@ MISC = win misc_sec SQ_COMPONENTS := make_sqevlog seabed stfs $(MISC) tm $(SEAMONSTER_TARGET) make_sql make_monitor tools .PHONY: $(SQ_COMPONENTS) + +buildinfo: + @echo "Building $(TRAFODION_VER_PROD) Version $(TRAFODION_VER) $(SQ_BUILD_TYPE)" + @echo "" + all: genverhdr setupdir $(SQ_COMPONENTS) win: make_sqevlog seabed @@ -235,7 +240,7 @@ PV_MAJOR ?= $(shell grep TRAFODION_VER_MAJOR= $(SQVFILE) | cut -f2 -d=) PV_MINOR ?= $(shell grep TRAFODION_VER_MINOR= $(SQVFILE) | cut -f2 -d=) PV_UPDATE ?= $(shell grep TRAFODION_VER_UPDATE= $(SQVFILE) | cut -f2 -d=) -genverhdr: +genverhdr: buildinfo cd build-scripts && ./genverhdr.ksh -major "${PV_MAJOR}" \ -minor "${PV_MINOR}" \ -update "${PV_UPDATE}" \ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e278421/dcs/Makefile ---------------------------------------------------------------------- diff --git a/dcs/Makefile b/dcs/Makefile index ad96ef3..144e763 100644 --- a/dcs/Makefile +++ b/dcs/Makefile @@ -46,7 +46,7 @@ build_chk: @if [ $(MY_SQROOT)/export/include/SCMBuildStr.h -nt target/$(BLD_TRAFODION_DCS_TARNAME) ]; then echo "update manifest"; $(RM) -f target/$(BLD_TRAFODION_DCS_TARNAME); fi clean: - $(MAVEN) clean + -$(MAVEN) clean | grep ERROR $(RM) build_dcs.log $(RM) $(VFILE) $(RM) ../${DISTRIBUTION_DIR}/$(BLD_TRAFODION_DCS_TARNAME)