-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
125 lines (108 loc) · 4 KB
/
Makefile.am
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
#
# Copyright (C) 2003, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
# $Id$
#
# @configure_input@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src man examples benchmarks test
DIST_SUBDIRS = src man examples benchmarks test doc
if BUILD_DOCS
SUBDIRS += doc
endif
EXTRA_DIST = COPYRIGHT \
CREDITS \
INSTALL \
README \
RELEASE_NOTES \
m4/foreach.m4 \
m4/utils.m4
# Below is a trick to build all test executables, without running them
# tests:
# $(MAKE) $(AM_MAKEFLAGS) check TESTS=
# below is the alternative when AM_EXTRA_RECURSIVE_TARGETS is not defined
# AM_EXTRA_RECURSIVE_TARGETS macro was introduced into automake 1.13.
# TESTS_SUBDIRS = test examples benchmarks
# TESTS_DIRS = $(TESTS_SUBDIRS:%=tests-%)
# tests: all $(TESTS_DIRS)
# $(TESTS_DIRS):
# $(MAKE) $(MFLAGS) -C $(@:tests-%=%) tests
if BUILD_COVERAGE
PTEST_SUBDIRS =
else
PTEST_SUBDIRS = test examples benchmarks
endif
ptest:
( for d in $(PTEST_SUBDIRS) ; do \
$(MAKE) $(MFLAGS) -C $$d ptest $$* ; \
done ) ;
ptests:
( for d in $(PTEST_SUBDIRS) ; do \
$(MAKE) $(MFLAGS) -C $$d ptests $$* ; \
done ) ;
tests-local:
@echo '|'
@echo '| All test programs have been successfully built.'
@echo '|'
check-local:
@echo '|'
@echo '| All sequential test programs have run successfully.'
@echo '|'
install-data-hook:
@echo '+----------------------------------------------------------------------------+'
@echo '|'
@echo '| PnetCDF has been successfully installed under'
@echo '| $(DESTDIR)$(prefix)'
@echo '|'
@echo '| * PnetCDF header files have been installed in'
@echo '| $(DESTDIR)$(prefix)/include'
@echo '| * PnetCDF library files have been installed in'
@echo '| $(DESTDIR)$(exec_prefix)/lib'
@echo '| * PnetCDF utility programs have been installed in'
@echo '| $(DESTDIR)$(exec_prefix)/bin'
@echo '| * PnetCDF man pages have been installed in'
@echo '| $(DESTDIR)$(prefix)/share/man'
@echo '|'
@if test 'x$(has_fortran)' = xyes && test 'x$(FC_MODINC)' = 'x-I' ; then \
echo '| To compile your PnetCDF programs, please add the following to the command' ; \
else \
echo '| To compile your PnetCDF C programs, please add the following to the command' ; \
fi
@echo '| line, so the compiler can find the PnetCDF header files:'
@echo '| -I$(DESTDIR)$(prefix)/include'
@if test "x$(has_fortran)" = xyes && test 'x$(FC_MODINC)' != 'x-I' ; then \
echo '| Use the following line to compile your Fortran programs'; \
echo '| $(FC_MODINC)$(DESTDIR)$(prefix)/include' ; \
fi
@echo '|'
@echo '| Add the following line to link your program to PnetCDF library:'
@echo '| -L$(DESTDIR)$(exec_prefix)/lib -lpnetcdf'
@echo '|'
@if test "x$(enable_shared)" = xyes ; then \
echo '| Add the following to your run-time environment variable LD_LIBRARY_PATH,' ; \
echo '| if your executable is linked with the PnetCDF shared libraries.' ; \
echo '| $(DESTDIR)$(exec_prefix)/lib' ; \
echo '|' ; \
fi
@echo '| PnetCDF is jointly developed by a team at Northwestern University and'
@echo '| Argonne National Laboratory.'
@echo '|'
@echo '| Visit PnetCDF web sites for more information'
@echo '| http://cucis.ece.northwestern.edu/projects/PnetCDF'
@echo '| http://trac.mcs.anl.gov/projects/parallel-netcdf'
@echo '|'
@echo '+----------------------------------------------------------------------------+'
# For VPATH build (parallel build), try delete all sub-directories
distclean-local:
if [ "$(abs_builddir)" != "$(abs_srcdir)" ] ; then \
for d in $(DIST_SUBDIRS) ; do \
rmdir $$d || true ; \
done ; \
fi
.PHONY: ptest ptests tests
dist-hook:
$(SED_I) -e "1,10s|_PNETCDF_RELEASE_DATE_|`date '+%B %e, %Y'`|" $(distdir)/RELEASE_NOTES
$(SED_I) -e "1,10s|_PNETCDF_VERSION_|$(PNETCDF_VERSION)|" $(distdir)/RELEASE_NOTES
$(SED_I) -e "s|_PNETCDF_VERSION_|$(PNETCDF_VERSION)|" $(distdir)/INSTALL
-rm -rf `find $(distdir) -type d -name .svn`