1490 |
rm -f ./.tmp_pack |
rm -f ./.tmp_pack |
1491 |
echo " packages are: $PACKAGES" |
echo " packages are: $PACKAGES" |
1492 |
|
|
1493 |
|
# Check availability of NetCDF and then either build the MNC template |
1494 |
|
# files or delete mnc from the list of available packages. |
1495 |
|
echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1 |
1496 |
|
RETVAL=$? |
1497 |
|
if test "x$RETVAL" = x0 ; then |
1498 |
|
if test "x$HAVE_NETCDF" != xt ; then |
1499 |
|
cat <<EOF |
1500 |
|
|
1501 |
|
********************************************************************* |
1502 |
|
WARNING: the "mnc" package was enabled but tests failed to compile |
1503 |
|
NetCDF applications. Please check that: |
1504 |
|
|
1505 |
|
1) NetCDF is correctly installed for this compiler and |
1506 |
|
2) the LIBS variable (within the "optfile") specifies the correct |
1507 |
|
NetCDF library to link against. |
1508 |
|
|
1509 |
|
Due to this failure, the "mnc" package is now DISABLED. |
1510 |
|
********************************************************************* |
1511 |
|
|
1512 |
|
EOF |
1513 |
|
PACKAGES=`echo $PACKAGES | sed -e 's/mnc//g'` |
1514 |
|
DISABLE="$DISABLE mnc" |
1515 |
|
else |
1516 |
|
( cd $ROOTDIR"/pkg/mnc" && $MAKE templates ) > make_mnc.errors 2>&1 |
1517 |
|
RETVAL=$? |
1518 |
|
if test "x${RETVAL}" = x0 ; then |
1519 |
|
rm -f make_mnc.errors |
1520 |
|
else |
1521 |
|
echo "Error: problem encountered while building source files in pkg/mnc:" |
1522 |
|
cat make_mnc.errors 1>&2 |
1523 |
|
exit 1 |
1524 |
|
fi |
1525 |
|
fi |
1526 |
|
fi |
1527 |
|
|
1528 |
echo " applying package dependency rules" |
echo " applying package dependency rules" |
1529 |
ck= |
ck= |
1530 |
while test "x$ck" != xtt ; do |
while test "x$ck" != xtt ; do |
1609 |
fi |
fi |
1610 |
done |
done |
1611 |
|
|
|
# Build MNC templates and check for ability to build and use NetCDF |
|
|
echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1 |
|
|
RETVAL=$? |
|
|
if test "x$RETVAL" = x0 ; then |
|
|
( cd $ROOTDIR"/pkg/mnc" && $MAKE templates ) > make_mnc.errors 2>&1 |
|
|
RETVAL=$? |
|
|
if test "x${RETVAL}" = x0 ; then |
|
|
rm -f make_mnc.errors |
|
|
else |
|
|
echo "Error: problem encountered while building source files in pkg/mnc:" |
|
|
cat make_mnc.errors 1>&2 |
|
|
exit 1 |
|
|
fi |
|
|
if test "x$HAVE_NETCDF" != xt ; then |
|
|
cat <<EOF |
|
|
|
|
|
********************************************************************* |
|
|
WARNING: the "mnc" package was enabled but tests failed to compile |
|
|
NetCDF applications. Please check that: |
|
|
|
|
|
1) NetCDF is correctly installed for this compiler and |
|
|
2) the LIBS variable (within the "optfile") specifies the correct |
|
|
NetCDF library to link against. |
|
|
|
|
|
Due to this failure, the "mnc" package is now DISABLED. |
|
|
********************************************************************* |
|
|
|
|
|
EOF |
|
|
temp=`echo $PACKAGES | sed -e 's/mnc//g'` |
|
|
PACKAGES=$temp |
|
|
fi |
|
|
fi |
|
|
|
|
1612 |
# Create a list of #define and #undef to enable/disable packages |
# Create a list of #define and #undef to enable/disable packages |
1613 |
PACKAGES_DOT_H=PACKAGES_CONFIG.h |
PACKAGES_DOT_H=PACKAGES_CONFIG.h |
1614 |
# The following UGLY HACK sets multiple "#undef"s and it needs to go |
# The following UGLY HACK sets multiple "#undef"s and it needs to go |