Skip to content

Commit

Permalink
Feature #2776 cleanup (#2777)
Browse files Browse the repository at this point in the history
* Per #2776, delete stale prob_pair_info.h/.cc, wwmca_utils.h/.cc, and rmw_analysis_utils.h/.cc files that were not being compiled by their Makefiles.

* Per #2776, update Makefile to compile the test_read_rmw utility.

* Per #2776, add Makefile for the vx_python3_utils test utility directory.

* add rpath for atlas and eckit lib dirs so dynamic libraries can be found when running on seneca

* only set -L and -I arguments for atlas and eckit if the appropriate environment variable is set -- this matches how it is handled for other external library dependencies

* Per #2776, just whitespace and capitalization

---------

Co-authored-by: George McCabe <[email protected]>
  • Loading branch information
JohnHalleyGotway and georgemccabe authored Jan 10, 2024
1 parent 9e2825c commit 7615f67
Show file tree
Hide file tree
Showing 20 changed files with 876 additions and 604 deletions.
18 changes: 14 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5376,8 +5376,13 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ATLASLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC}"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB}"
fi

#
# Look for the Eckit library.
# Look for the ecKit library.
#

# Configure the variables. The help text will appear if the user uses "configure --help".
Expand All @@ -5403,6 +5408,11 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ECKITLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ECKITINC}"
LDFLAGS="${LDFLAGS} -L${MET_ECKITLIB}"
fi

#
# Look for the NetCDF library.
#
Expand Down Expand Up @@ -6948,8 +6958,7 @@ printf "%s\n" "#define ENABLE_UGRID /**/" >>confdefs.h

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: unstructured grid support will be compiled" >&5
printf "%s\n" "$as_me: unstructured grid support will be compiled" >&6;}
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC} -I${MET_ECKITINC} -DWITH_UGRID"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB} -L${MET_ECKITLIB} -Wl,-rpath,${MET_ATLASLIB}:${MET_ECKITLIB}"
CPPFLAGS="${CPPFLAGS} -DWITH_UGRID"
UGRID_MET_LIBS="-lvx_data2d_ugrid"
UGRID_DEP_LIBS="-latlas -leckit -leckit_mpi -leckit_geometry"
else
Expand Down Expand Up @@ -10128,7 +10137,7 @@ ac_config_files="$ac_config_files Makefile scripts/Rscripts/Makefile scripts/Rsc


if test -n "$MET_DEVELOPMENT"; then
ac_config_files="$ac_config_files src/tools/dev_utils/Makefile src/tools/dev_utils/shapefiles/Makefile internal/test_util/Makefile internal/test_util/basic/Makefile internal/test_util/basic/vx_config/Makefile internal/test_util/basic/vx_log/Makefile internal/test_util/basic/vx_util/Makefile internal/test_util/libcode/Makefile internal/test_util/libcode/vx_data2d/Makefile internal/test_util/libcode/vx_data2d_factory/Makefile internal/test_util/libcode/vx_data2d_grib/Makefile internal/test_util/libcode/vx_data2d_nc_met/Makefile internal/test_util/libcode/vx_data2d_nccf/Makefile internal/test_util/libcode/vx_geodesy/Makefile internal/test_util/libcode/vx_grid/Makefile internal/test_util/libcode/vx_plot_util/Makefile internal/test_util/libcode/vx_ps/Makefile internal/test_util/libcode/vx_tc_util/Makefile internal/test_util/libcode/vx_nc_util/Makefile internal/test_util/libcode/vx_physics/Makefile internal/test_util/libcode/vx_series_data/Makefile internal/test_util/libcode/vx_solar/Makefile internal/test_util/tools/Makefile internal/test_util/tools/other/Makefile internal/test_util/tools/other/mode_time_domain/Makefile"
ac_config_files="$ac_config_files src/tools/dev_utils/Makefile src/tools/dev_utils/shapefiles/Makefile internal/test_util/Makefile internal/test_util/basic/Makefile internal/test_util/basic/vx_config/Makefile internal/test_util/basic/vx_log/Makefile internal/test_util/basic/vx_util/Makefile internal/test_util/libcode/Makefile internal/test_util/libcode/vx_data2d/Makefile internal/test_util/libcode/vx_data2d_factory/Makefile internal/test_util/libcode/vx_data2d_grib/Makefile internal/test_util/libcode/vx_data2d_nc_met/Makefile internal/test_util/libcode/vx_data2d_nccf/Makefile internal/test_util/libcode/vx_geodesy/Makefile internal/test_util/libcode/vx_grid/Makefile internal/test_util/libcode/vx_plot_util/Makefile internal/test_util/libcode/vx_ps/Makefile internal/test_util/libcode/vx_tc_util/Makefile internal/test_util/libcode/vx_nc_util/Makefile internal/test_util/libcode/vx_python3_utils/Makefile internal/test_util/libcode/vx_physics/Makefile internal/test_util/libcode/vx_series_data/Makefile internal/test_util/libcode/vx_solar/Makefile internal/test_util/tools/Makefile internal/test_util/tools/other/Makefile internal/test_util/tools/other/mode_time_domain/Makefile"

fi

Expand Down Expand Up @@ -11145,6 +11154,7 @@ do
"internal/test_util/libcode/vx_ps/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_ps/Makefile" ;;
"internal/test_util/libcode/vx_tc_util/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_tc_util/Makefile" ;;
"internal/test_util/libcode/vx_nc_util/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_nc_util/Makefile" ;;
"internal/test_util/libcode/vx_python3_utils/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_python3_utils/Makefile" ;;
"internal/test_util/libcode/vx_physics/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_physics/Makefile" ;;
"internal/test_util/libcode/vx_series_data/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_series_data/Makefile" ;;
"internal/test_util/libcode/vx_solar/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_solar/Makefile" ;;
Expand Down
16 changes: 13 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ATLASLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC}"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB}"
fi

#
# Look for the Eckit library.
# Look for the ecKit library.
#

# Configure the variables. The help text will appear if the user uses "configure --help".
Expand All @@ -101,6 +106,11 @@ fi

# AC_SUBST command line variables.

if (test -n "$MET_ECKITLIB"); then
CPPFLAGS="${CPPFLAGS} -I${MET_ECKITINC}"
LDFLAGS="${LDFLAGS} -L${MET_ECKITLIB}"
fi

#
# Look for the NetCDF library.
#
Expand Down Expand Up @@ -1128,8 +1138,7 @@ AM_CONDITIONAL([ENABLE_UGRID], [test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE
if test "x$ENABLE_UGRID" = "xyes" || test "x$ENABLE_ALL" = "xyes"; then
AC_DEFINE([ENABLE_UGRID], [], ["build unstructured grid support"])
AC_MSG_NOTICE([unstructured grid support will be compiled])
CPPFLAGS="${CPPFLAGS} -I${MET_ATLASINC} -I${MET_ECKITINC} -DWITH_UGRID"
LDFLAGS="${LDFLAGS} -L${MET_ATLASLIB} -L${MET_ECKITLIB} -Wl,-rpath,${MET_ATLASLIB}:${MET_ECKITLIB}"
CPPFLAGS="${CPPFLAGS} -DWITH_UGRID"
UGRID_MET_LIBS="-lvx_data2d_ugrid"
UGRID_DEP_LIBS="-latlas -leckit -leckit_mpi -leckit_geometry"
else
Expand Down Expand Up @@ -1403,6 +1412,7 @@ if test -n "$MET_DEVELOPMENT"; then
internal/test_util/libcode/vx_ps/Makefile
internal/test_util/libcode/vx_tc_util/Makefile
internal/test_util/libcode/vx_nc_util/Makefile
internal/test_util/libcode/vx_python3_utils/Makefile
internal/test_util/libcode/vx_physics/Makefile
internal/test_util/libcode/vx_series_data/Makefile
internal/test_util/libcode/vx_solar/Makefile
Expand Down
2 changes: 1 addition & 1 deletion internal/scripts/environment/development.seneca
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export CXXFLAGS=${CFLAGS}
export LDFLAGS="-Wl,--disable-new-dtags"
export LDFLAGS="${LDFLAGS} -Wl,-rpath,${MET_DST}/lib:${MET_HDFEOS}/lib:${MET_PROJ}/lib:${MET_NETCDF}/lib:${MET_DST}/zlib-1.2.11/lib:${MET_DST}/szip-2.1.1/lib"
export LDFLAGS="${LDFLAGS} -Wl,-rpath,${MET_HDFLIB}:${MET_HDF5}/lib:${MET_GSL}/lib:${MET_PYTHON}/lib:${JASPER}/lib"
export LDFLAGS="${LDFLAGS} -L${JASPER}/lib"
export LDFLAGS="${LDFLAGS} -L${JASPER}/lib -Wl,-rpath,${MET_ATLAS}/lib -Wl,-rpath,${MET_ECKIT}/lib"

# Variables required to run MET
export MET_TEST_INPUT=${MET_PROJ_DIR}/MET_test_data/unit_test
Expand Down
4 changes: 4 additions & 0 deletions internal/test_util/libcode/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ SUBDIRS = vx_data2d \
vx_physics \
vx_series_data

if ENABLE_PYTHON
SUBDIRS += vx_python3_utils
endif

MAINTAINERCLEANFILES = Makefile.in
25 changes: 9 additions & 16 deletions internal/test_util/libcode/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_PYTHON_TRUE@am__append_1 = vx_python3_utils
subdir = internal/test_util/libcode
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
Expand Down Expand Up @@ -149,7 +150,10 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
DIST_SUBDIRS = $(SUBDIRS)
DIST_SUBDIRS = vx_data2d vx_data2d_grib vx_data2d_nc_met \
vx_data2d_nccf vx_data2d_factory vx_geodesy vx_grid vx_ps \
vx_solar vx_plot_util vx_tc_util vx_nc_util vx_physics \
vx_series_data vx_python3_utils
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
Expand Down Expand Up @@ -335,21 +339,10 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = vx_data2d \
vx_data2d_grib \
vx_data2d_nc_met \
vx_data2d_nccf \
vx_data2d_factory \
vx_geodesy \
vx_grid \
vx_ps \
vx_solar \
vx_plot_util \
vx_tc_util \
vx_nc_util \
vx_physics \
vx_series_data

SUBDIRS = vx_data2d vx_data2d_grib vx_data2d_nc_met vx_data2d_nccf \
vx_data2d_factory vx_geodesy vx_grid vx_ps vx_solar \
vx_plot_util vx_tc_util vx_nc_util vx_physics vx_series_data \
$(am__append_1)
MAINTAINERCLEANFILES = Makefile.in
all: all-recursive

Expand Down
2 changes: 1 addition & 1 deletion internal/test_util/libcode/vx_data2d/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include ${top_srcdir}/Make-include
# Test programs

noinst_PROGRAMS = test_table_read \
dump_default_table
dump_default_table

test_table_read_SOURCES = test_table_read.cc
test_table_read_CPPFLAGS = ${MET_CPPFLAGS}
Expand Down
7 changes: 7 additions & 0 deletions internal/test_util/libcode/vx_python3_utils/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test_get
test_numpy
*.o
*.a
.deps
Makefile
*.dSYM
37 changes: 37 additions & 0 deletions internal/test_util/libcode/vx_python3_utils/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## @start 1
## Makefile.am -- Process this file with automake to produce Makefile.in
## @end 1

MAINTAINERCLEANFILES = Makefile.in

# Include the project definitions

include ${top_srcdir}/Make-include

# Test programs

noinst_PROGRAMS = test_get \
test_numpy

test_get_SOURCES = test_get.cc
test_get_CPPFLAGS = ${MET_CPPFLAGS}
test_get_LDFLAGS = -L. ${MET_LDFLAGS}
test_get_LDADD = \
-lvx_python3_utils \
-lvx_util \
-lvx_math \
-lvx_cal \
-lvx_log \
$(PYTHON_DEP_LIBS)

test_numpy_SOURCES = test_numpy.cc
test_numpy_CPPFLAGS = ${MET_CPPFLAGS}
test_numpy_LDFLAGS = -L. ${MET_LDFLAGS}
test_numpy_LDADD = \
-lvx_python3_utils \
-lvx_util \
-lvx_math \
-lvx_cal \
-lvx_log \
$(PYTHON_DEP_LIBS)

Loading

0 comments on commit 7615f67

Please sign in to comment.