forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3657 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
2c643b7dc5
commit
5c31173109
|
@ -153,7 +153,7 @@ no-%:
|
|||
echo "Package $(@:no-%=%) does not exist"; \
|
||||
else \
|
||||
echo "Uninstalling package $(@:no-%=%), ignore errors"; \
|
||||
cd $(NODIR); csh -f Install.csh 0; cd ..; $(MAKE) clean-all; \
|
||||
cd $(NODIR); csh -f Install.csh 0; cd ..; \
|
||||
fi;
|
||||
|
||||
# status = list differences between src and package files
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Settings for libraries used by specific LAMMPS packages
|
||||
# this file is auto-edited when those packages are included/excluded
|
||||
|
||||
PKG_INC = -I../../lib/atc -I../../lib/reax -I../../lib/poems -I../../lib/meam
|
||||
PKG_PATH = -L../../lib/atc -L../../lib/reax -L../../lib/poems -L../../lib/meam -L../../lib/gpu
|
||||
PKG_LIB = -latc -lreax -lpoems -lmeam -lgpu
|
||||
PKG_INC = -I../../lib/poems -I../../lib/atc -I../../lib/reax -I../../lib/meam
|
||||
PKG_PATH = -L../../lib/poems -L../../lib/atc -L../../lib/reax -L../../lib/meam -L../../lib/gpu
|
||||
PKG_LIB = -lpoems -latc -lreax -lmeam -lgpu
|
||||
|
||||
PKG_SYSPATH = $(user-atc_SYSPATH) $(reax_SYSPATH) $(meam_SYSPATH) $(gpu_SYSPATH)
|
||||
PKG_SYSLIB = $(user-atc_SYSLIB) $(reax_SYSLIB) $(meam_SYSLIB) $(gpu_SYSLIB)
|
||||
|
|
|
@ -1,26 +1,18 @@
|
|||
# Package.csh = package management, called from Makefile
|
||||
# Syntax: csh Package.csh DIR status/update/overwrite
|
||||
|
||||
# package installed if any *.cpp or *.h file is in src
|
||||
|
||||
# if last arg = "status":
|
||||
# print installation status of each package
|
||||
# if package not installed (0-length src/style file), do nothing besides
|
||||
# check that no package files are in src (except style file)
|
||||
# flag src files that do not exist or are 0-length
|
||||
# list package files that are different than src version
|
||||
# flag package files that do not exist in src
|
||||
# flag package files that are different than src version
|
||||
|
||||
# if last arg = "update":
|
||||
# if 0-length src/style file doesn't exist, create src/style file
|
||||
# via touch command, since LAMMPS needs it to do a build,
|
||||
# but don't copy any more files since don't want to install package
|
||||
# if 0-length src/style file already exists, do nothing
|
||||
# if non-0-length src/style file exists,
|
||||
# copy any package file into src if file doesn't exist or is different
|
||||
# if package installed, copy its files that are different from package to src
|
||||
|
||||
# if last arg = "overwrite":
|
||||
# if package not installed (0-length src/style file), do nothing besides
|
||||
# check that no package files are in src (except style file)
|
||||
# flag src files that do not exist or are 0-length
|
||||
# overwrite package files that are different than src version
|
||||
# if package installed, copy its files that are different from src to package
|
||||
|
||||
# use diff to compare files
|
||||
# tried using cmp, but it doesn't satisfy if test if one file is
|
||||
|
@ -30,71 +22,61 @@ set glob
|
|||
set style = `echo $1 | sed 'y/-ABCDEFGHIJKLMNOPQRSTUVWXYZ/_abcdefghijklmnopqrstuvwxyz/'`
|
||||
cd $1
|
||||
|
||||
set installed = 0
|
||||
foreach file (*.cpp *.h)
|
||||
if (-e ../$file) then
|
||||
set installed = 1
|
||||
endif
|
||||
end
|
||||
|
||||
if ($2 == "status") then
|
||||
|
||||
if (-z ../style_$style.h) then
|
||||
echo "Installed NO: package $1"
|
||||
foreach file (*.cpp *.h)
|
||||
if (-e ../$file && $file != "style_$style.h") then
|
||||
echo " src/$file exists but should not"
|
||||
endif
|
||||
end
|
||||
else
|
||||
if ($installed) then
|
||||
echo "Installed YES: package $1"
|
||||
foreach file (*.cpp *.h)
|
||||
if (! -e ../$file) then
|
||||
echo " src/$file does not exist"
|
||||
else if (-z ../$file) then
|
||||
echo " src/$file is empty file"
|
||||
else if (`diff --brief $file ../$file` != "") then
|
||||
echo " src/$file and $1/$file are different"
|
||||
endif
|
||||
end
|
||||
else
|
||||
echo "Installed NO: package $1"
|
||||
endif
|
||||
|
||||
else if ($2 == "update") then
|
||||
|
||||
echo "Updating src from $1 package"
|
||||
echo "Updating src files from $1 package files"
|
||||
|
||||
if (! -e ../style_$style.h) then
|
||||
echo " $1 package is not installed, but creating dummy style file"
|
||||
touch ../style_$style.h
|
||||
else if (-z ../style_$style.h) then
|
||||
echo " $1 package is not installed, no action"
|
||||
else
|
||||
if ($installed) then
|
||||
foreach file (*.cpp *.h)
|
||||
if (! -e ../$file) then
|
||||
echo " updating src/$file"
|
||||
echo " creating src/$file"
|
||||
cp $file ..
|
||||
else if (`diff --brief $file ../$file` != "") then
|
||||
echo " updating src/$file"
|
||||
cp $file ..
|
||||
endif
|
||||
end
|
||||
else
|
||||
echo " $1 package is not installed, no action"
|
||||
endif
|
||||
|
||||
else if ($2 == "overwrite") then
|
||||
|
||||
echo "Overwriting $1 package with src"
|
||||
echo "Overwriting $1 package files with src files"
|
||||
|
||||
if (-z ../style_$style.h) then
|
||||
echo " $1 package is not installed, no action"
|
||||
foreach file (*.cpp *.h)
|
||||
if (-e ../$file && $file != "style_$style.h") then
|
||||
echo " src/$file exists but should not"
|
||||
endif
|
||||
end
|
||||
else
|
||||
if ($installed) then
|
||||
foreach file (*.cpp *.h)
|
||||
if (! -e ../$file) then
|
||||
echo " src/$file does not exist"
|
||||
else if (-z ../$file) then
|
||||
echo " src/$file is empty file"
|
||||
else if (`diff --brief $file ../$file` != "") then
|
||||
echo " overwriting $1/$file"
|
||||
cp ../$file .
|
||||
endif
|
||||
end
|
||||
else
|
||||
echo " $1 package is not installed, no action"
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue