forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9941 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
13824544ba
commit
78788d6944
|
@ -1,5 +1,34 @@
|
|||
# Install/unInstall package files in LAMMPS
|
||||
# edit 2 Makefile.package files to include/exclude REAX info
|
||||
# mode = 0/1/2 for uninstall/install/update
|
||||
|
||||
mode=$1
|
||||
|
||||
# arg1 = file, arg2 = file it depends on
|
||||
|
||||
action () {
|
||||
if (test $mode = 0) then
|
||||
rm -f ../$1
|
||||
elif (! cmp -s $1 ../$1) then
|
||||
if (test -z "$2" || test -e ../$2) then
|
||||
cp $1 ..
|
||||
if (test $mode = 2) then
|
||||
echo " updating src/$1"
|
||||
fi
|
||||
fi
|
||||
elif (test ! -z "$2") then
|
||||
if (test ! -e ../$2) then
|
||||
rm -f ../$1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# all package files with no dependencies
|
||||
|
||||
for file in *.cpp *.h; do
|
||||
action $file
|
||||
done
|
||||
|
||||
# edit 2 Makefile.package files to include/exclude package info
|
||||
|
||||
if (test $1 = 1) then
|
||||
|
||||
|
@ -21,13 +50,6 @@ include ..\/..\/lib\/reax\/Makefile.lammps
|
|||
' ../Makefile.package.settings
|
||||
fi
|
||||
|
||||
cp pair_reax.cpp ..
|
||||
cp pair_reax.h ..
|
||||
cp pair_reax_fortran.h ..
|
||||
|
||||
cp fix_reax_bonds.h ..
|
||||
cp fix_reax_bonds.cpp ..
|
||||
|
||||
elif (test $1 = 0) then
|
||||
|
||||
if (test -e ../Makefile.package) then
|
||||
|
@ -38,11 +60,4 @@ elif (test $1 = 0) then
|
|||
sed -i -e '/^include.*reax.*$/d' ../Makefile.package.settings
|
||||
fi
|
||||
|
||||
rm -f ../pair_reax.cpp
|
||||
rm -f ../pair_reax.h
|
||||
rm -f ../pair_reax_fortran.h
|
||||
|
||||
rm -f ../fix_reax_bonds.h
|
||||
rm -f ../fix_reax_bonds.cpp
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue