--- trunk/OOPSE-3.0/make/Makefile.in 2004/10/06 22:20:47 1539 +++ trunk/OOPSE-3.0/make/Makefile.in 2004/10/11 15:43:16 1552 @@ -86,8 +86,10 @@ ForceParamDir = @OOPSE_HOME@/share/forceFields/ @MPI_F90_LIB@ OopseHome = @OOPSE_HOME@ -ForceParamDir = @OOPSE_HOME@/share/forceFields/ -SampleSimDir = @OOPSE_HOME@/share/samples/ +ForceParamDir = $(OopseHome)/share/forceFields +SampleSimDir = $(OopseHome)/share/samples +InstallBinDir = $(OopseHome)/bin +DocDir = $(OopseHome)/doc FrcDeclare = -DFRC_PATH="$(ForceParamDir)" F90Declare = -D__FORTRAN90 ParallelDeclare = -DIS_MPI @@ -223,6 +225,7 @@ endif ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a endif endif + # # Misc # @@ -250,10 +253,10 @@ Install = @INSTALL@ CppCompiler = @CXX@ Linker = @CXX@ MakeDepend = makedepend -Install = @INSTALL@ +INSTALL = @INSTALL@ InstallProgram = @INSTALL_PROGRAM@ InstallData = @INSTALL_DATA@ -MakeDir = @MKINSTALLDIRS@ +MkDir = @MKINSTALLDIRS@ Delete = rm -fr StaticArchiver = @AR@ DynamicArchiver = @CC@ @@ -314,6 +317,45 @@ Space = $(Empty) $(Empty) #--------------------------------------------------------------------------- # +# Install +# +#--------------------------------------------------------------------------- + +ifneq "$(words $(SampleFiles))" "0" + MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) + MyInstallDir = $(SampleSimDir)/$(MySample) + InstallFiles = $(SampleFiles) + InstallCommand = $(InstallData) +endif + +ifneq "$(words $(Main))" "0" + MyInstallDir = $(InstallBinDir) + ifeq "$(UseMPI)" "yes" + InstallFiles = $(Executable) $(ParallelExecutable) + else + InstallFiles = $(Executable) + endif + InstallCommand = $(InstallProgram) +endif + +ifneq "$(words $(ForcefieldFiles))" "0" + MyInstallDir = $(ForceParamDir) + InstallFiles = $(ForcefieldFiles) + InstallCommand = $(InstallData) +endif + +ifneq "$(words $(InstallFiles))" "0" + InstallList = +else + InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) +endif + +InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) + + + +#--------------------------------------------------------------------------- +# # Rules # #--------------------------------------------------------------------------- @@ -526,6 +568,7 @@ ifeq "$(UseMPI)" "yes" _all : _buildall +_buildall : ifeq "$(UseMPI)" "yes" _buildall : \ $(DependencyFile) \ @@ -625,7 +668,25 @@ jarsign : $(JarFile) jarsign : $(JarFile) $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself + +#make install +%.install : + @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall +install : $(InstallListLoop) + $(Print) Done Install + +_installall : _buildall _installdata + +$(MyInstallDir) : + $(MkDir) $@ + +_installdata : $(MyInstallDir) + $(Print) $(InstallFiles) +ifneq "$(words $(InstallFiles))" "0" + $(InstallData) $(InstallFiles) $(MyInstallDir) +endif + # make statistics _statisticsall : @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp