From 1dbdb76cc97c19290131a11235573fa81dc853b4 Mon Sep 17 00:00:00 2001 From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Wed, 19 May 2010 22:04:47 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4158 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/MAKE/Makefile.linux | 2 +- src/Makefile | 8 ++++++++ src/Makefile.package | 9 --------- src/Makefile.package.empty | 9 ++++++--- src/Package.sh | 16 +++++++++++++--- 5 files changed, 28 insertions(+), 16 deletions(-) delete mode 100644 src/Makefile.package diff --git a/src/MAKE/Makefile.linux b/src/MAKE/Makefile.linux index cad1571214..60bef6dc0f 100755 --- a/src/MAKE/Makefile.linux +++ b/src/MAKE/Makefile.linux @@ -1,4 +1,4 @@ -# linux = RedHat Linux box, Intel icc & ifort, MPICH2, FFTW +# linux = RedHat Linux box, Intel icc, Intel ifort, MPICH2, FFTW SHELL = /bin/sh diff --git a/src/Makefile b/src/Makefile index 4c3b86db72..98d723d3bf 100755 --- a/src/Makefile +++ b/src/Makefile @@ -65,6 +65,7 @@ help: @/bin/sh Make.sh style @cp -p *.cpp *.h Obj_$@ @cp MAKE/Makefile.$@ Obj_$@/Makefile + @if [ ! -e Makefile.package ]; then make package-regenerate; fi @cp Makefile.package Obj_$@ @cd Obj_$@; \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "EXE = ../$(EXE)" ../$(EXE) @@ -161,6 +162,7 @@ no-%: # status = list differences between src and package files # update = replace src files with newer package files # overwrite = overwrite package files with newer src files +# regenerate = regenerate Makefile.package from Makefile.package.empty package-status: @for p in $(PACKAGEUC); do /bin/sh Package.sh $$p status; done @@ -176,3 +178,9 @@ package-overwrite: @for p in $(PACKAGEUC); do /bin/sh Package.sh $$p overwrite; done @echo '' @for p in $(PACKUSERUC); do /bin/sh Package.sh $$p overwrite; done + +package-regenerate: + @cp Makefile.package.empty Makefile.package + @echo "Regenerating Makefile.package" + @for p in $(PACKAGEUC); do /bin/sh Package.sh $$p regenerate; done + @for p in $(PACKUSERUC); do /bin/sh Package.sh $$p regenerate; done diff --git a/src/Makefile.package b/src/Makefile.package deleted file mode 100644 index 34f1e45a22..0000000000 --- a/src/Makefile.package +++ /dev/null @@ -1,9 +0,0 @@ -# Settings for libraries used by specific LAMMPS packages -# this file is auto-edited when those packages are included/excluded - -PKG_INC = -I../../lib/reax -I../../lib/meam -I../../lib/poems -PKG_PATH = -L../../lib/reax -L../../lib/meam -L../../lib/poems -PKG_LIB = -lreax -lmeam -lpoems - -PKG_SYSPATH = $(reax_SYSPATH) $(meam_SYSPATH) -PKG_SYSLIB = $(reax_SYSLIB) $(meam_SYSLIB) diff --git a/src/Makefile.package.empty b/src/Makefile.package.empty index 1edf76c29b..fbee509ca6 100644 --- a/src/Makefile.package.empty +++ b/src/Makefile.package.empty @@ -1,6 +1,9 @@ # Settings for libraries used by specific LAMMPS packages # this file is auto-edited when those packages are included/excluded -PKGINC = -PKGPATH = -PKGLIB = +PKG_INC = +PKG_PATH = +PKG_LIB = + +PKG_SYSPATH = +PKG_SYSLIB = diff --git a/src/Package.sh b/src/Package.sh index 5fc2ffd2e1..01ce2ca591 100644 --- a/src/Package.sh +++ b/src/Package.sh @@ -17,6 +17,7 @@ for file in *.cpp *.h; do fi done +# status # if installed: # issue warning if any package file is not in src or is different @@ -35,11 +36,11 @@ if (test $2 = "status") then 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 @@ -56,16 +57,16 @@ elif (test $2 = "update") then 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 + for file in *.cpp *.h; do if (test ! -e ../$file) then echo " src/$file does not exist" elif (test "`diff --brief $file ../$file`" != "") then @@ -77,4 +78,13 @@ elif (test $2 = "overwrite") then echo " $1 package is not installed, no action" fi +# regenernate Makefile.package from Makefile.package.empty +# if installed: +# re-install so Install.sh will edit Makefile.pacakge + +elif (test $2 = "regenerate") then + + if (test $installed = 1) then + /bin/sh Install.sh 1 + fi fi -- GitLab