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"; \
|
echo "Package $(@:no-%=%) does not exist"; \
|
||||||
else \
|
else \
|
||||||
echo "Uninstalling package $(@:no-%=%), ignore errors"; \
|
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;
|
fi;
|
||||||
|
|
||||||
# status = list differences between src and package files
|
# status = list differences between src and package files
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Settings for libraries used by specific LAMMPS packages
|
# Settings for libraries used by specific LAMMPS packages
|
||||||
# this file is auto-edited when those packages are included/excluded
|
# 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_INC = -I../../lib/poems -I../../lib/atc -I../../lib/reax -I../../lib/meam
|
||||||
PKG_PATH = -L../../lib/atc -L../../lib/reax -L../../lib/poems -L../../lib/meam -L../../lib/gpu
|
PKG_PATH = -L../../lib/poems -L../../lib/atc -L../../lib/reax -L../../lib/meam -L../../lib/gpu
|
||||||
PKG_LIB = -latc -lreax -lpoems -lmeam -lgpu
|
PKG_LIB = -lpoems -latc -lreax -lmeam -lgpu
|
||||||
|
|
||||||
PKG_SYSPATH = $(user-atc_SYSPATH) $(reax_SYSPATH) $(meam_SYSPATH) $(gpu_SYSPATH)
|
PKG_SYSPATH = $(user-atc_SYSPATH) $(reax_SYSPATH) $(meam_SYSPATH) $(gpu_SYSPATH)
|
||||||
PKG_SYSLIB = $(user-atc_SYSLIB) $(reax_SYSLIB) $(meam_SYSLIB) $(gpu_SYSLIB)
|
PKG_SYSLIB = $(user-atc_SYSLIB) $(reax_SYSLIB) $(meam_SYSLIB) $(gpu_SYSLIB)
|
||||||
|
|
|
@ -1,26 +1,18 @@
|
||||||
# Package.csh = package management, called from Makefile
|
# Package.csh = package management, called from Makefile
|
||||||
# Syntax: csh Package.csh DIR status/update/overwrite
|
# Syntax: csh Package.csh DIR status/update/overwrite
|
||||||
|
|
||||||
|
# package installed if any *.cpp or *.h file is in src
|
||||||
|
|
||||||
# if last arg = "status":
|
# if last arg = "status":
|
||||||
# print installation status of each package
|
# print installation status of each package
|
||||||
# if package not installed (0-length src/style file), do nothing besides
|
# flag package files that do not exist in src
|
||||||
# check that no package files are in src (except style file)
|
# flag package files that are different than src version
|
||||||
# flag src files that do not exist or are 0-length
|
|
||||||
# list package files that are different than src version
|
|
||||||
|
|
||||||
# if last arg = "update":
|
# if last arg = "update":
|
||||||
# if 0-length src/style file doesn't exist, create src/style file
|
# if package installed, copy its files that are different from package to src
|
||||||
# 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 last arg = "overwrite":
|
# if last arg = "overwrite":
|
||||||
# if package not installed (0-length src/style file), do nothing besides
|
# if package installed, copy its files that are different from src to package
|
||||||
# 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
|
|
||||||
|
|
||||||
# use diff to compare files
|
# use diff to compare files
|
||||||
# tried using cmp, but it doesn't satisfy if test if one file is
|
# 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/'`
|
set style = `echo $1 | sed 'y/-ABCDEFGHIJKLMNOPQRSTUVWXYZ/_abcdefghijklmnopqrstuvwxyz/'`
|
||||||
cd $1
|
cd $1
|
||||||
|
|
||||||
|
set installed = 0
|
||||||
|
foreach file (*.cpp *.h)
|
||||||
|
if (-e ../$file) then
|
||||||
|
set installed = 1
|
||||||
|
endif
|
||||||
|
end
|
||||||
|
|
||||||
if ($2 == "status") then
|
if ($2 == "status") then
|
||||||
|
|
||||||
if (-z ../style_$style.h) then
|
if ($installed) 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
|
|
||||||
echo "Installed YES: package $1"
|
echo "Installed YES: package $1"
|
||||||
foreach file (*.cpp *.h)
|
foreach file (*.cpp *.h)
|
||||||
if (! -e ../$file) then
|
if (! -e ../$file) then
|
||||||
echo " src/$file does not exist"
|
echo " src/$file does not exist"
|
||||||
else if (-z ../$file) then
|
|
||||||
echo " src/$file is empty file"
|
|
||||||
else if (`diff --brief $file ../$file` != "") then
|
else if (`diff --brief $file ../$file` != "") then
|
||||||
echo " src/$file and $1/$file are different"
|
echo " src/$file and $1/$file are different"
|
||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
echo "Installed NO: package $1"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else if ($2 == "update") then
|
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
|
if ($installed) 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
|
|
||||||
foreach file (*.cpp *.h)
|
foreach file (*.cpp *.h)
|
||||||
if (! -e ../$file) then
|
if (! -e ../$file) then
|
||||||
echo " updating src/$file"
|
echo " creating src/$file"
|
||||||
cp $file ..
|
cp $file ..
|
||||||
else if (`diff --brief $file ../$file` != "") then
|
else if (`diff --brief $file ../$file` != "") then
|
||||||
echo " updating src/$file"
|
echo " updating src/$file"
|
||||||
cp $file ..
|
cp $file ..
|
||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
echo " $1 package is not installed, no action"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else if ($2 == "overwrite") then
|
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
|
if ($installed) 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
|
|
||||||
foreach file (*.cpp *.h)
|
foreach file (*.cpp *.h)
|
||||||
if (! -e ../$file) then
|
if (! -e ../$file) then
|
||||||
echo " src/$file does not exist"
|
echo " src/$file does not exist"
|
||||||
else if (-z ../$file) then
|
|
||||||
echo " src/$file is empty file"
|
|
||||||
else if (`diff --brief $file ../$file` != "") then
|
else if (`diff --brief $file ../$file` != "") then
|
||||||
echo " overwriting $1/$file"
|
echo " overwriting $1/$file"
|
||||||
cp ../$file .
|
cp ../$file .
|
||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
echo " $1 package is not installed, no action"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue