diff --git a/src/GPU/Package.sh b/src/GPU/Package.sh deleted file mode 100644 index cdac230d5..000000000 --- a/src/GPU/Package.sh +++ /dev/null @@ -1,131 +0,0 @@ -# Update package files in LAMMPS -# cp package file to src if doesn't exist or is different -# do not copy dependent files if non-GPU version does not exist - -for file in *.cpp *.h; do - if (test $file = pair_gayberne_gpu.cpp -a ! -e ../pair_gayberne.cpp) then - continue - fi - if (test $file = pair_gayberne_gpu.h -a ! -e ../pair_gayberne.cpp) then - continue - fi - if (test $file = pair_resquared_gpu.cpp -a ! -e ../pair_resquared.cpp) then - continue - fi - if (test $file = pair_resquared_gpu.h -a ! -e ../pair_resquared.cpp) then - continue - fi - if (test $file = pair_lj_cut_coul_long_gpu.cpp -a ! -e ../pair_lj_cut_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_cut_coul_long_gpu.h -a ! -e ../pair_lj_cut_coul_long.cpp) then - continue - fi - if (test $file = pair_coul_long_gpu.cpp -a ! -e ../pair_coul_long.cpp) then - continue - fi - if (test $file = pair_coul_long_gpu.h -a ! -e ../pair_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_sdk_gpu.cpp -a ! -e ../pair_lj_sdk.cpp) then - continue - fi - if (test $file = pair_lj_sdk_gpu.h -a ! -e ../pair_lj_sdk.cpp) then - continue - fi - if (test $file = pair_lj_sdk_coul_long_gpu.cpp -a ! -e ../pair_lj_sdk_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_sdk_coul_long_gpu.h -a ! -e ../pair_lj_sdk_coul_long.cpp) then - continue - fi - if (test $file = pair_dipole_sf_gpu.cpp -a ! -e ../pair_dipole_sf.cpp) then - continue - fi - if (test $file = pair_dipole_sf_gpu.h -a ! -e ../pair_dipole_sf.cpp) then - continue - fi - if (test $file = pair_dipole_cut_gpu.cpp -a ! -e ../pair_dipole_cut.cpp) then - continue - fi - if (test $file = pair_dipole_cut_gpu.h -a ! -e ../pair_dipole_cut.cpp) then - continue - fi - if (test $file = pair_yukawa_colloid_gpu.cpp -a ! -e ../pair_yukawa_colloid.cpp) then - continue - fi - if (test $file = pair_yukawa_colloid_gpu.h -a ! -e ../pair_yukawa_colloid.cpp) then - continue - fi - if (test $file = pair_colloid_gpu.cpp -a ! -e ../pair_colloid.cpp) then - continue - fi - if (test $file = pair_colloid_gpu.h -a ! -e ../pair_colloid.cpp) then - continue - fi - if (test $file = pair_born_coul_long_gpu.cpp -a ! -e ../pair_born_coul_long.cpp) then - continue - fi - if (test $file = pair_born_coul_long_gpu.h -a ! -e ../pair_born_coul_long.cpp) then - continue - fi - if (test $file = pair_buck_coul_long_gpu.cpp -a ! -e ../pair_buck_coul_long.cpp) then - continue - fi - if (test $file = pair_buck_coul_long_gpu.h -a ! -e ../pair_buck_coul_long.cpp) then - continue - fi - if (test $file = pair_born_coul_long_gpu.cpp -a ! -e ../pair_born_coul_long.cpp) then - continue - fi - if (test $file = pair_born_coul_long_gpu.h -a ! -e ../pair_born_coul_long.cpp) then - continue - fi - if (test $file = pair_eam_gpu.cpp -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_gpu.h -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_alloy_gpu.cpp -a ! -e ../pair_eam_alloy.cpp) then - continue - fi - if (test $file = pair_eam_alloy_gpu.h -a ! -e ../pair_eam_alloy.cpp) then - continue - fi - if (test $file = pair_eam_fs_gpu.cpp -a ! -e ../pair_eam_fs.cpp) then - continue - fi - if (test $file = pair_eam_fs_gpu.h -a ! -e ../pair_eam_fs.cpp) then - continue - fi - if (test $file = pair_lj_class2_gpu.cpp -a ! -e ../pair_lj_class2.cpp) then - continue - fi - if (test $file = pair_lj_class2_coul_long_gpu.cpp -a ! -e ../pair_lj_class2_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_class2_coul_long_gpu.h -a ! -e ../pair_lj_class2_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_charmm_coul_long_gpu.cpp -a ! -e ../pair_lj_charmm_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_charmm_coul_long_gpu.h -a ! -e ../pair_lj_charmm_coul_long.cpp) then - continue - fi - if (test $file = pppm_gpu.cpp -a ! -e ../pppm.cpp) then - continue - fi - if (test $file = pppm_gpu.h -a ! -e ../pppm.cpp) then - continue - fi - - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif (test "`diff --brief $file ../$file`" != "") then - echo " updating src/$file" - cp $file .. - fi -done diff --git a/src/OPT/Package.sh b/src/OPT/Package.sh deleted file mode 100644 index 5fb182c0f..000000000 --- a/src/OPT/Package.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Update package files in LAMMPS -# cp package file to src if doesn't exist or is different -# do not copy dependent files if non-OPT versions do not exist - -for file in *.cpp *.h; do - if (test $file = pair_eam_opt.cpp -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_opt.h -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_alloy_opt.cpp -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_alloy_opt.h -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_fs_opt.cpp -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_eam_fs_opt.h -a ! -e ../pair_eam.cpp) then - continue - fi - if (test $file = pair_lj_charmm_coul_long_opt.cpp -a ! -e ../pair_lj_charmm_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_charmm_coul_long_opt.h -a ! -e ../pair_lj_charmm_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_cut_coul_long_opt.cpp -a ! -e ../pair_lj_cut_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_cut_coul_long_opt.h -a ! -e ../pair_lj_cut_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_cut_coul_long_tip4p_opt.cpp -a ! -e ../pair_lj_cut_coul_long_tip4p.cpp) then - continue - fi - if (test $file = pair_lj_cut_coul_long_tip4p_opt.h -a ! -e ../pair_lj_cut_coul_long_tip4p.cpp) then - continue - fi - - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif (test "`diff --brief $file ../$file`" != "") then - echo " updating src/$file" - cp $file .. - fi -done diff --git a/src/Package.sh b/src/Package.sh index 78b7b7a10..7e8243a1b 100644 --- a/src/Package.sh +++ b/src/Package.sh @@ -1,105 +1,100 @@ # Package.sh = package management, called from Makefile # Syntax: sh Package.sh DIR status/update/overwrite/diff # style used to translate dir name to package name style=`echo $1 | sed 'y/-ABCDEFGHIJKLMNOPQRSTUVWXYZ/_abcdefghijklmnopqrstuvwxyz/'` # package is already installed if any package *.cpp or *.h file is in src # else not installed cd $1 installed=0 for file in *.cpp *.h; do if (test -e ../$file) then installed=1 fi done # status # if installed: # issue warning if any package file is not in src or is different if (test $2 = "status") then if (test $installed = 1) then echo "Installed YES: package $1" for file in *.cpp *.h; do if (test ! -e ../$file) then echo " src/$file does not exist" elif (test "`diff --brief $file ../$file`" != "") then echo " src/$file and $1/$file are different" fi done else echo "Installed NO: package $1" fi # update # if installed: # cp package file to src if doesn't exist or is different elif (test $2 = "update") then echo "Updating src files from $1 package files" if (test $installed = 1) then - if (test ! -e Package.sh) then - for file in *.cpp *.h; do - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif (test "`diff --brief $file ../$file`" != "") then - echo " updating src/$file" - cp $file .. - fi - done - else - /bin/sh Package.sh - fi + for file in *.cpp *.h; do + if (test ! -e ../$file) then + continue + elif (test "`diff --brief $file ../$file`" != "") then + echo " updating src/$file" + cp $file .. + fi + done else echo " $1 package is not installed, no action" fi # overwrite # if installed: # if package file not in src, issue warning # if src file different than package file, overwrite package file elif (test $2 = "overwrite") then echo "Overwriting $1 package files with src files" if (test $installed = 1) then for file in *.cpp *.h; do if (test ! -e ../$file) then - echo " src/$file does not exist" + continue elif (test "`diff --brief $file ../$file`" != "") then echo " overwriting $1/$file" cp ../$file . fi done else echo " $1 package is not installed, no action" fi # diff # if installed: # show any differences between src files and package files elif (test $2 = "diff") then if (test $installed = 1) then echo "Installed YES: package $1" for file in *.cpp *.h; do if (test ! -e ../$file) then echo "************************************************************************" echo " src/$file does not exist" echo "************************************************************************" elif (test "`diff --brief $file ../$file`" != "") then echo "************************************************************************" echo "diff $1/$file src/$file " echo "************************************************************************" diff $file ../$file fi done fi fi diff --git a/src/USER-CG-CMM/Package.sh b/src/USER-CG-CMM/Package.sh deleted file mode 100644 index 6f481d663..000000000 --- a/src/USER-CG-CMM/Package.sh +++ /dev/null @@ -1,44 +0,0 @@ -# Update package files in LAMMPS -# cp package file to src if doesn't exist or is different -# do not copy molecular and kspace files if corresponding versions do not exist - -for file in *.cpp *.h; do - if (test $file = angle_cg_cmm.cpp -a ! -e ../angle_harmonic.cpp) then - continue - fi - if (test $file = angle_cg_cmm.h -a ! -e ../angle_harmonic.h) then - continue - fi - if (test $file = pair_cg_cmm_coul_long.cpp -a ! -e ../pair_lj_cut_coul_long.cpp) then - continue - fi - if (test $file = pair_cg_cmm_coul_long.h -a ! -e ../pair_lj_cut_coul_long.h) then - continue - fi - if (test $file = angle_sdk.cpp -a ! -e ../angle_harmonic.cpp) then - continue - fi - if (test $file = angle_sdk.h -a ! -e ../angle_harmonic.h) then - continue - fi - if (test $file = pair_lj_sdk_coul_long.cpp -a ! -e ../pair_lj_cut_coul_long.cpp) then - continue - fi - if (test $file = pair_lj_sdk_coul_long.h -a ! -e ../pair_lj_cut_coul_long.h) then - continue - fi - if (test $file = pair_lj_sdk_coul_msm.cpp -a ! -e ../pair_lj_cut_coul_msm.cpp) then - continue - fi - if (test $file = pair_lj_sdk_coul_msm.h -a ! -e ../pair_lj_cut_coul_msm.h) then - continue - fi - - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif (test "`diff --brief $file ../$file`" != "") then - echo " updating src/$file" - cp $file .. - fi -done diff --git a/src/USER-MOLFILE/Package.sh b/src/USER-MOLFILE/Package.sh deleted file mode 100644 index 3f6db2b87..000000000 --- a/src/USER-MOLFILE/Package.sh +++ /dev/null @@ -1,15 +0,0 @@ -# Update package files in LAMMPS -# copy package file to src if it doesn't exists or is different - -for file in molfile_interface.cpp molfile_interface.h molfile_plugin.h \ - dump_molfile.cpp dump_molfile.h reader_molfile.h reader_molfile.cpp \ - vmdplugin.h ; do \ - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif ! cmp -s $file ../$file ; then - echo " updating src/$file" - cp $file .. - fi -done - diff --git a/src/USER-OMP/Package.sh b/src/USER-OMP/Package.sh deleted file mode 100644 index 22c399451..000000000 --- a/src/USER-OMP/Package.sh +++ /dev/null @@ -1,39 +0,0 @@ -# Update package files in LAMMPS -# Copy package file to src if it doesn't exists or is different. -# But only copy the file, if a non-OpenMP version exists and -# remove OpenMP versions that have no matching serial file -# installed, e.g. after a package has been removed. -for file in *_omp.cpp *_omp.h ; do - # these are special cases and handled below - if (test $file = "thr_omp.h") || (test $file = "thr_omp.cpp") then - continue - fi - # derive name of non-OpenMP version - ofile=`echo $file | sed -e 's,\(.*\)_omp\.h,\1.h,' -e 's,\(.*\)_omp\.cpp,\1.cpp,'` - if (test ! -e ../$ofile) then - if (test -e ../$file) then - echo " removing src/$file" - rm -f ../$file - fi - else - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif ! cmp -s $file ../$file ; then - echo " updating src/$file" - cp $file .. - fi - fi -done - -# special case for files not covered by the automatic script above -for file in thr_data.h thr_data.cpp thr_omp.h thr_omp.cpp; do - if (test ! -e ../$file) then - echo " creating src/$file" - cp $file .. - elif ! cmp -s $file ../$file ; then - echo " updating src/$file" - cp $file .. - fi -done -