46 |
PKG_GROUPS=$ROOTDIR"/pkg/pkg_groups" |
PKG_GROUPS=$ROOTDIR"/pkg/pkg_groups" |
47 |
if test -r $PKG_GROUPS ; then |
if test -r $PKG_GROUPS ; then |
48 |
cat $PKG_GROUPS | sed -e 's/#.*$//g' | sed -e 's/:/ : /g' > ./p1.tmp |
cat $PKG_GROUPS | sed -e 's/#.*$//g' | sed -e 's/:/ : /g' > ./p1.tmp |
49 |
cat ./p1.tmp | awk '(NF>2 && $2==":"){ print $0 }' > ./p2.tmp |
cat ./p1.tmp | $AWK '(NF>2 && $2==":"){ print $0 }' > ./p2.tmp |
50 |
matched=0 |
matched=0 |
51 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
52 |
line=`grep "^ *$i" ./p2.tmp` |
line=`grep "^ *$i" ./p2.tmp` |
53 |
RETVAL=$? |
RETVAL=$? |
54 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
55 |
matched=1 |
matched=1 |
56 |
replace=`echo $line | awk '{ $1=""; $2=""; print $0 }'` |
replace=`echo $line | $AWK '{ $1=""; $2=""; print $0 }'` |
57 |
echo " replacing \"$i\" with: $replace" |
echo " replacing \"$i\" with: $replace" |
58 |
new_packages="$new_packages $replace" |
new_packages="$new_packages $replace" |
59 |
else |
else |
136 |
echo " The possible FORTRAN compilers found in your path are:" |
echo " The possible FORTRAN compilers found in your path are:" |
137 |
echo " "$p_FC |
echo " "$p_FC |
138 |
if test "x$FC" = x ; then |
if test "x$FC" = x ; then |
139 |
FC=`echo $p_FC | awk '{print $1}'` |
FC=`echo $p_FC | $AWK '{print $1}'` |
140 |
fi |
fi |
141 |
fi |
fi |
142 |
|
|
202 |
# strip the comments and then convert the dependency file into |
# strip the comments and then convert the dependency file into |
203 |
# two arrays: PNAME, DNAME |
# two arrays: PNAME, DNAME |
204 |
cat $1 | sed -e 's/#.*$//g' \ |
cat $1 | sed -e 's/#.*$//g' \ |
205 |
| awk 'BEGIN{nn=0;} (NF>0){ for(i=2;i<=NF;i++){nn++; print "PNAME["nn"]="$1"\nDNAME["nn"]="$i} }' \ |
| $AWK 'BEGIN{nn=0;} (NF>0){ for(i=2;i<=NF;i++){nn++; print "PNAME["nn"]="$1"\nDNAME["nn"]="$i} }' \ |
206 |
> ./.pd_tmp |
> ./.pd_tmp |
207 |
source ./.pd_tmp |
source ./.pd_tmp |
208 |
rm -f ./.pd_tmp |
rm -f ./.pd_tmp |
319 |
|
|
320 |
PWD=`pwd` |
PWD=`pwd` |
321 |
MAKE=make |
MAKE=make |
322 |
|
AWK=awk |
323 |
THISHOSTNAME=`hostname` |
THISHOSTNAME=`hostname` |
324 |
THISCWD=`pwd` |
THISCWD=`pwd` |
325 |
THISDATE=`date` |
THISDATE=`date` |
722 |
# Strip the comments and then convert the dependency file into |
# Strip the comments and then convert the dependency file into |
723 |
# two arrays: PNAME, DNAME |
# two arrays: PNAME, DNAME |
724 |
cat $PDEPEND | sed -e 's/#.*$//g' \ |
cat $PDEPEND | sed -e 's/#.*$//g' \ |
725 |
| awk 'BEGIN{nn=-1;} (NF>0){ for(i=2;i<=NF;i++){nn++; print "PNAME_"nn"="$1"\nDNAME_"nn"="$i}} END{print "nname="nn}' \ |
| $AWK 'BEGIN{nn=-1;} (NF>0){ for(i=2;i<=NF;i++){nn++; print "PNAME_"nn"="$1"\nDNAME_"nn"="$i}} END{print "nname="nn}' \ |
726 |
> ./.pd_tmp |
> ./.pd_tmp |
727 |
RETVAL=$? |
RETVAL=$? |
728 |
if test ! "x${RETVAL}" = x0 ; then |
if test ! "x${RETVAL}" = x0 ; then |
756 |
else |
else |
757 |
echo " using PDEFAULT=\"$PDEFAULT\"" |
echo " using PDEFAULT=\"$PDEFAULT\"" |
758 |
# Strip the comments and add all the names |
# Strip the comments and add all the names |
759 |
def=`cat $PDEFAULT | sed -e 's/#.*$//g' | awk '(NF>0){print $0}'` |
def=`cat $PDEFAULT | sed -e 's/#.*$//g' | $AWK '(NF>0){print $0}'` |
760 |
RETVAL=$? |
RETVAL=$? |
761 |
if test "x${RETVAL}" != x0 ; then |
if test "x${RETVAL}" != x0 ; then |
762 |
echo -n "Error: can't parse default package list " |
echo -n "Error: can't parse default package list " |
936 |
fi |
fi |
937 |
done |
done |
938 |
if test "x$has_pack" = xf ; then |
if test "x$has_pack" = xf ; then |
939 |
undef=`echo "ALLOW_$n" | awk '{print toupper($0)}'` |
undef=`echo "ALLOW_$n" | $AWK '{print toupper($0)}'` |
940 |
echo "#undef $undef" >> $PACKAGES_DOT_H".tmp" |
echo "#undef $undef" >> $PACKAGES_DOT_H".tmp" |
941 |
# DEFINES="$DEFINES -U$undef" |
# DEFINES="$DEFINES -U$undef" |
942 |
|
|
962 |
C Packages enabled by genmake: |
C Packages enabled by genmake: |
963 |
EOF |
EOF |
964 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
965 |
def=`echo "ALLOW_$i" | awk '{print toupper($0)}'` |
def=`echo "ALLOW_$i" | $AWK '{print toupper($0)}'` |
966 |
echo "#define $def" >> $PACKAGES_DOT_H".tmp" |
echo "#define $def" >> $PACKAGES_DOT_H".tmp" |
967 |
#eh3 DEFINES="$DEFINES -D$def" |
#eh3 DEFINES="$DEFINES -D$def" |
968 |
|
|
1097 |
for sf in $sfiles ; do |
for sf in $sfiles ; do |
1098 |
if test ! -r ".links.tmp/$sf" ; then |
if test ! -r ".links.tmp/$sf" ; then |
1099 |
if test -f "$d/$sf" ; then |
if test -f "$d/$sf" ; then |
1100 |
extn=`echo $sf | awk -F '.' '{print $NF}'` |
extn=`echo $sf | $AWK -F '.' '{print $NF}'` |
1101 |
touch .links.tmp/$sf |
touch .links.tmp/$sf |
1102 |
deplist="$deplist $sf" |
deplist="$deplist $sf" |
1103 |
case $extn in |
case $extn in |
1334 |
@make \$(AD_FLOW_FILES) |
@make \$(AD_FLOW_FILES) |
1335 |
cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f |
cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f |
1336 |
|
|
1337 |
|
# ... AD ... |
1338 |
ad_taf_output.f: ad_input_code.f |
ad_taf_output.f: ad_input_code.f |
1339 |
\$(TAF) \$(AD_TAF_FLAGS) ad_input_code.f |
\$(TAF) \$(AD_TAF_FLAGS) ad_input_code.f |
1340 |
cat ad_input_code_ad.f | sed -f adjoint_sed > ad_taf_output.f |
cat ad_input_code_ad.f | sed -f adjoint_sed > ad_taf_output.f |
1342 |
ad_taf: ad_taf_output.o \$(OBJFILES) |
ad_taf: ad_taf_output.o \$(OBJFILES) |
1343 |
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_taf_output.o \$(LIBS) |
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_taf_output.o \$(LIBS) |
1344 |
|
|
|
|
|
1345 |
ad_tamc_output.f: ad_input_code.f |
ad_tamc_output.f: ad_input_code.f |
1346 |
\$(TAMC) \$(AD_TAMC_FLAGS) ad_input_code.f |
\$(TAMC) \$(AD_TAMC_FLAGS) ad_input_code.f |
1347 |
cat ad_input_code_ad.f | sed -f adjoint_sed > ad_taf_output.f |
cat ad_input_code_ad.f | sed -f adjoint_sed > ad_tamc_output.f |
1348 |
|
|
1349 |
ad_tamc: ad_tamc_output.o \$(OBJFILES) |
ad_tamc: ad_tamc_output.o \$(OBJFILES) |
1350 |
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS) |
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS) |
1351 |
|
|
1352 |
|
|
1353 |
|
# ... FLT ... |
1354 |
flt_taf_output.f: ad_input_code.f |
flt_taf_output.f: ad_input_code.f |
1355 |
\$(TAF) \$(FTL_TAF_FLAGS) ad_input_code.f |
\$(TAF) \$(FTL_TAF_FLAGS) ad_input_code.f |
1356 |
cat ad_input_code_ad.f | sed -f adjoint_sed > flt_taf_output.f |
cat ad_input_code_ad.f | sed -f adjoint_sed > flt_taf_output.f |
1358 |
flt_taf: flt_taf_output.o \$(OBJFILES) |
flt_taf: flt_taf_output.o \$(OBJFILES) |
1359 |
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) flt_taf_output.o \$(LIBS) |
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) flt_taf_output.o \$(LIBS) |
1360 |
|
|
1361 |
|
flt_tamc_output.f: ad_input_code.f |
1362 |
|
\$(TAMC) \$(FTL_TAF_FLAGS) ad_input_code.f |
1363 |
|
cat ad_input_code_ad.f | sed -f adjoint_sed > flt_tamc_output.f |
1364 |
|
|
1365 |
|
flt_tamc: flt_tamc_output.o \$(OBJFILES) |
1366 |
|
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) flt_tamc_output.o \$(LIBS) |
1367 |
|
|
1368 |
|
|
1369 |
|
# ... SVD ... |
1370 |
|
svd_taf_output.f: ad_input_code.f |
1371 |
|
\$(TAF) \$(SVD_TAF_FLAGS) ad_input_code.f |
1372 |
|
cat ad_input_code_ad.f | sed -f adjoint_sed > svd_taf_output.f |
1373 |
|
|
1374 |
|
svd_taf: svd_taf_output.o \$(OBJFILES) |
1375 |
|
\$(LINK) -o ${EXECUTABLE} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) svd_taf_output.o \$(LIBS) |
1376 |
|
|
1377 |
|
|
1378 |
#========================================= |
#========================================= |