1# Depend.sh = Install/unInstall files due to package dependencies 2# this script is invoked after any package is installed/uninstalled 3 4# enforce using portable C locale 5LC_ALL=C 6export LC_ALL 7 8# all parent/child package dependencies should be listed below 9# parent package = has files that files in another package derive from 10# child package = has files that derive from files in another package 11 12# update child packages that depend on the parent, 13# but only if the child package is already installed 14# this is necessary to insure the child package installs 15# only child files whose parent package files are now installed 16# decisions on (un)installing individual child files are made by 17# the Install.sh script in the child package 18 19# depend function: arg = child-package 20# checks if child-package is installed, if not just return 21# otherwise invoke update of child package via its Install.sh 22 23depend () { 24 cd $1 25 installed=0 26 for file in *.cpp *.h; do 27 if (test -e ../$file) then 28 installed=1 29 fi 30 done 31 32 cd .. 33 if (test $installed = 0) then 34 return 35 fi 36 37 echo " updating package $1" 38 if (test -e $1/Install.sh) then 39 cd $1; /bin/sh Install.sh 2; cd .. 40 else 41 cd $1; /bin/sh ../Install.sh 2; cd .. 42 fi 43} 44 45# add one if statement per parent package 46# add one depend() call per child package that depends on that parent 47 48if (test $1 = "ASPHERE") then 49 depend GPU 50 depend OPENMP 51 depend CG-DNA 52 depend INTEL 53fi 54 55if (test $1 = "CLASS2") then 56 depend GPU 57 depend KOKKOS 58 depend OPENMP 59fi 60 61if (test $1 = "COLLOID") then 62 depend GPU 63 depend OPENMP 64fi 65 66if (test $1 = "DIELECTRIC") then 67 depend OPENMP 68fi 69 70if (test $1 = "DIPOLE") then 71 depend OPENMP 72fi 73 74if (test $1 = "DPD-BASIC") then 75 depend GPU 76 depend OPENMP 77 depend INTEL 78fi 79 80if (test $1 = "EXTRA-MOLECULE") then 81 depend GPU 82 depend OPENMP 83fi 84 85if (test $1 = "EXTRA-PAIR") then 86 depend GPU 87 depend OPENMP 88fi 89 90if (test $1 = "GRANULAR") then 91 depend KOKKOS 92 depend OPENMP 93fi 94 95if (test $1 = "KSPACE") then 96 depend CG-SDK 97 depend CORESHELL 98 depend DIELECTRIC 99 depend GPU 100 depend KOKKOS 101 depend OPT 102 depend OPENMP 103 depend INTEL 104 depend PHONON 105 depend FEP 106fi 107 108if (test $1 = "MANYBODY") then 109 depend ATC 110 depend GPU 111 depend KOKKOS 112 depend OPT 113 depend QEQ 114 depend OPENMP 115fi 116 117if (test $1 = "MOLECULE") then 118 depend EXTRA-MOLECULE 119 depend GPU 120 depend KOKKOS 121 depend FEP 122 depend OPENMP 123 depend INTEL 124fi 125 126if (test $1 = "PERI") then 127 depend OPENMP 128fi 129 130if (test $1 = "PYTHON") then 131 depend ML-IAP 132fi 133 134if (test $1 = "RIGID") then 135 depend KOKKOS 136 depend OPENMP 137 depend DPD-SMOOTH 138fi 139 140if (test $1 = "ML-SNAP") then 141 depend KOKKOS 142 depend ML-IAP 143fi 144 145if (test $1 = "CG-SDK") then 146 depend GPU 147 depend KOKKOS 148 depend OPENMP 149fi 150 151if (test $1 = "DPD-REACT") then 152 depend KOKKOS 153fi 154 155if (test $1 = "DRUDE") then 156 depend OPENMP 157fi 158 159if (test $1 = "FEP") then 160 depend OPENMP 161fi 162 163if (test $1 = "REAXFF") then 164 depend KOKKOS 165 depend OPENMP 166fi 167