File: Makefile.am

package info (click to toggle)
pnetcdf 1.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,812 kB
  • sloc: ansic: 85,298; f90: 10,707; fortran: 9,283; cpp: 8,864; makefile: 3,084; perl: 2,833; sh: 2,538; yacc: 1,227; lex: 216
file content (124 lines) | stat: -rw-r--r-- 3,584 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#
# Copyright (C) 2003, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
# $Id$
#
# @configure_input@

SUFFIXES = .o .F

AM_DEFAULT_SOURCE_EXT = .F

AM_CPPFLAGS  = -I$(top_builddir)/src/include \
               -I$(top_srcdir)/src/include \
               -I$(top_builddir)/src/binding/f77 \
               -I$(top_srcdir)/src/binding/f77
AM_CFLAGS =
AM_FFLAGS = $(FFIXEDFORMFLAG)

LDADD  = $(top_builddir)/src/libs/libpnetcdf.la ../common/libtestutils.la
LDADD += @NETCDF4_LDFLAGS@ @ADIOS_LDFLAGS@ @NETCDF4_LIBS@ @ADIOS_LIBS@

# suppress warning messages when using NAG Fortran compiler
if NAGFORT
  # suppresses warning messages about unused external procedures
  AM_FFLAGS += -w=uep

  # suppresses extension warnings for obsolete but common extensions to Fortran
  # 77 - these are TAB format, byte-length specifiers, Hollerith constants
  # and D lines;
  AM_FFLAGS += -w=x77

  # suppresses warning messages about variables set but never referenced;
  AM_FFLAGS += -w=unreffed

  # suppresses warning messages about unused PARAMETERs;
  AM_FFLAGS += -w=uparam
endif

M4FLAGS += -I${top_srcdir}/m4

if HAVE_F77_GNU_INT
   M4FFLAGS += -DHAVE_F77_GNU_INT
endif
if HAVE_F77_INT1
   M4FFLAGS += -DHAVE_F77_INT1
endif
if HAVE_F77_INT2
   M4FFLAGS += -DHAVE_F77_INT2
endif
if HAVE_F77_INT8
   M4FFLAGS += -DHAVE_F77_INT8
endif
if RELAX_COORD_BOUND
   AM_CFLAGS += -DRELAX_COORD_BOUND
   AM_FFLAGS += $(FC_DEFINE)RELAX_COORD_BOUND
endif
if ENABLE_NETCDF4
   AM_CFLAGS += -DENABLE_NETCDF4
   AM_FFLAGS += $(FC_DEFINE)ENABLE_NETCDF4
endif

M4SRCS = test_get.m4 \
         test_put.m4  \
         test_iget.m4 \
         test_iput.m4

.m4.F:
	$(M4) $(AM_M4FLAGS) $(M4FLAGS) $< >$@

F_SRCS = nf_test.F \
         nf_error.F \
         test_read.F \
         test_write.F \
         util.F

HFILES = tests.inc.in

TESTPROGRAMS = nf_test
check_PROGRAMS = $(TESTPROGRAMS)

# autimake 1.11.3 has not yet implemented AM_TESTS_ENVIRONMENT
# For newer versions, we can use AM_TESTS_ENVIRONMENT instead
# AM_TESTS_ENVIRONMENT  = TESTPROGRAMS="$(TESTPROGRAMS)" ; export TESTPROGRAMS;
# AM_TESTS_ENVIRONMENT += TESTSEQRUN="$(TESTSEQRUN)" ; export TESTSEQRUN;
# AM_TESTS_ENVIRONMENT += TESTOUTDIR="$(FSTYPE_PREFIX)$(TESTOUTDIR)" ; export TESTOUTDIR;
TESTS_ENVIRONMENT  = export SED="$(SED)";
TESTS_ENVIRONMENT += export srcdir="$(srcdir)";
TESTS_ENVIRONMENT += export TESTOUTDIR="$(FSTYPE_PREFIX)$(TESTOUTDIR)";
TESTS_ENVIRONMENT += export TESTSEQRUN="$(TESTSEQRUN)";
TESTS_ENVIRONMENT += export TESTMPIRUN="$(TESTMPIRUN)";
TESTS_ENVIRONMENT += export PNETCDF_DEBUG="$(PNETCDF_DEBUG)";
TESTS_ENVIRONMENT += export TESTPROGRAMS="$(TESTPROGRAMS)";
TESTS_ENVIRONMENT += export check_PROGRAMS="$(check_PROGRAMS)";
TESTS_ENVIRONMENT += export ENABLE_BURST_BUFFER="$(ENABLE_BURST_BUFFER)";
TESTS_ENVIRONMENT += export ENABLE_NETCDF4="$(ENABLE_NETCDF4)";

TESTS = seq_runs.sh
TEST_EXTENSIONS = .sh

nf_test_SOURCES = $(F_SRCS) fortlib.c
nodist_nf_test_SOURCES = $(M4SRCS:.m4=.F)

$(M4SRCS:.m4=.F): Makefile

CLEANFILES = $(M4SRCS:.m4=.F) \
             $(TESTOUTDIR)/scratch.nc \
             $(TESTOUTDIR)/test.nc \
             $(TESTOUTDIR)/tooth-fairy.nc \
             core core.* *.gcda *.gcno *.gcov gmon.out

EXTRA_DIST = $(M4SRCS) $(HFILES) README seq_runs.sh

../common/libtestutils.la:
	set -e; cd ../common && $(MAKE) $(MFLAGS) tests

# sequential runs only
ptest ptests ptest2 ptest4 ptest6 ptest8 ptest10:

# build check targets but not invoke
tests-local: all $(check_PROGRAMS)

.PHONY: ptest ptests ptest2 ptest4 ptest6 ptest8 ptest10