Issue #2021 - dist.native make update target will now deploy to files.native directory structure instead of producing a tar file.

Change-Id: Ie625a515e8dc30cacc002bb6d8e77365c1347a13

Former-commit-id: 33a5b6d42d [formerly bc1ef2c5fe [formerly 71b04e3147] [formerly 33a5b6d42d [formerly 02af194872173d89f77e15a6a8caca1e5812dbe4]]]
Former-commit-id: bc1ef2c5fe [formerly 71b04e3147]
Former-commit-id: bc1ef2c5fe
Former-commit-id: 0d2958f693
This commit is contained in:
Bryan Kowal 2013-06-04 12:52:27 -05:00
parent a373612be7
commit 470e29ca77
23 changed files with 245 additions and 367 deletions

View file

@ -9,15 +9,8 @@
# include optional user defined variables
-include makefile.conf~
tar_archive=$$(basename $(BUILD_DIR)).tar
files_native=$(wildcard ../files.native)
tmp_location=tmp~/$$(basename $(BUILD_DIR))
setup_dir=setup
uninstall_script=$$(basename $(realpath .))_uninstall.sh
permissions_script=$$(basename $(realpath .))_permissions.sh
ifndef INSTALL_DIR
INSTALL_DIR = $(HOME)/opt/$$(basename $(realpath .))
endif
init:
ifndef BUILD_DIR
@ -37,87 +30,20 @@ _all: init
# arrange the files
$$(export tmp_location=$(tmp_location);bash arrange_files.sh)
# create setup directory for install/uninstall files
mkdir -p $(tmp_location)/$(setup_dir)
# finished
all: clean _all _permissions_script _uninstall_script
_deploy:
# copy files from the tmp_location into files.native
_permissions_script:
# create permissions_script
$(MAKE) PERMISSIONS_ROOT=$(tmp_location) \
-f ../build.native/makefile.perm _create_permissions_script
sed "s|$(tmp_location)|..|" file_permissions.sh > \
$(tmp_location)/$(setup_dir)/$(permissions_script)
chmod a+x $(tmp_location)/$(setup_dir)/$(permissions_script)
rm file_permissions.sh
_uninstall_script:
# create uninstall_script
$$(cd $(tmp_location)/$(setup_dir);\
echo "cd \$$(dirname \$$0)" > $(uninstall_script);\
find ../ -type f -exec echo rm -f {} \; >> $(uninstall_script);\
find ../ -type l -exec echo unlink {} \; >> $(uninstall_script);\
find ../ -depth -type d -exec echo rmdir {} \; >> $(uninstall_script);\
echo "exit 0" >> $(uninstall_script);\
chmod a+x $(uninstall_script)\
)
echo $(files_native)
rsync -avz $(tmp_location)/* $(files_native)
clean: init
# rm tmp_location
rm -fr $(tmp_location)
# finished
install: init all
# copy files from tmp_location to install_dir
mkdir -p $(INSTALL_DIR)
rsync -au $(tmp_location)/ $(INSTALL_DIR)
# finished
uninstall: init
# call uninstall_script
$(INSTALL_DIR)/$(setup_dir)/$(uninstall_script)
# finished
dist: init all _tar_archive
_clean_tar_archive:
# rm tar_archive
rm -fr $(tar_archive)
# finished
_tar_archive:
# create tar_archive
tar -cvf $(tar_archive) -C $(tmp_location) .
# finished
distupdate: init update _clean_tar_archive _tar_archive
distclean: init clean _clean_tar_archive
distinstall: init
# untar tar_archive into install_dir
mkdir -p $(INSTALL_DIR)
tar -xpf $(tar_archive) -C $(INSTALL_DIR)
# finished
_update: init clean
# untar tar_archive
mkdir -p $(tmp_location)_tar
tar -xpf $(tar_archive) -C $(tmp_location)_tar
_updated_tmp_location:
# copy files from _all step into extracted tar files
cp -fa $(tmp_location)/* $(tmp_location)_tar
# move $(tmp_location)_tar to $(tmp_location)
rm -fr $(tmp_location)
mv $(tmp_location)_tar $(tmp_location)
update: _update _all _updated_tmp_location _permissions_script _uninstall_script
.PHONY: init all _all clean install update _update dist distclean distinstall
update: init _all _deploy clean
# include optional user defined targets (and possible target overrides)
-include makefile.targets~

1
nativeLib/decrypt_file/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.release

View file

@ -8,10 +8,11 @@
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@ -34,6 +35,13 @@
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="dist.native.null.138631" name="dist.native"/>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
@ -200,60 +208,10 @@
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>install</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="dist" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dist</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distinstall" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distinstall</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="uninstall" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>uninstall</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distupdate" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distupdate</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="update" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>update</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -261,9 +219,4 @@
</target>
</buildTargets>
</storageModule>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="dist.native.null.138631" name="dist.native"/>
</storageModule>
</cproject>

View file

@ -1,21 +0,0 @@
<project name="dist.native" default="deploy.all" basedir=".">
<property environment="env"/>
<property name="install.dir" value="${env.HOME}/awips"/>
<property name="native.target" value="i386-pc-linux-gnu" />
<property name="native.distributable.install.from" location="${basedir}/${native.target}.tar"/>
<target name="deploy.all">
<echo message="Deploying ${native.target} native distributable to ${install.dir}" />
<!-- ant's untar does not preserve permissions, so we'll execute tar directly -->
<exec executable="tar">
<arg value="-xpf"/>
<arg value="${native.distributable.install.from}"/>
<arg value="-C"/>
<arg value="${install.dir}"/>
</exec>
</target>
</project>

1
nativeLib/edexBridge/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/Release

1
nativeLib/edex_com/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/Build x86

1
nativeLib/edex_notify/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/Build x86

1
nativeLib/edex_pdc/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/Debug

1
nativeLib/gridslice/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/Debug

1
nativeLib/ncep_grib2module/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/Build x86

View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.calb/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.ifp/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.ofs.db/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.ofs/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.pproc/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.util/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/rary.ohd.whfs/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug

1
nativeLib/runy.runso/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/i386-pc-linux-gnu.debug