File: examples.am

package info (click to toggle)
libhdf4 4.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,384 kB
  • sloc: ansic: 128,700; sh: 15,015; fortran: 12,444; java: 5,863; xml: 1,205; makefile: 794; yacc: 678; pascal: 418; perl: 360; javascript: 203; lex: 163; csh: 41
file content (103 lines) | stat: -rw-r--r-- 4,339 bytes parent folder | download | duplicates (2)
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
## config/examples.am
## (Use double hashes for copyright notice so that automake treats it as
## comments and does not pass it to Makefile.in)
## Copyright by The HDF Group.
## All rights reserved.
##
## This file is part of HDF.  The full HDF copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
## distribution tree, or in https://www.hdfgroup.org/licenses.
## If you do not have access to either file, you may request a copy from
## help@hdfgroup.org.

# We can't tell automake about example programs, because they need to be
# built using h4cc (or h4fc, etc.) instead of the standard compilers.
# This creates some extra work for us.

## The Makefile.am that includes this boilerplate needs to define the
## following:
##
## TEST_PROG
## We assume that all test programs in this directory are examples.
##
## INSTALL_FILES
## The source files that the examples use which should be installed.
##
## EXAMPLEDIR
## The directory into which examples should be installed.
##
## Build rules for $(EXTRA_PROG).
## Dependencies for example programs.
## Automake will supply neither of these.
##

# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
EXTRA_PROG = $(EXAMPLE_PROG)

# We need to tell automake what to clean
MOSTLYCLEANFILES=*.o $(EXAMPLE_PROG)
CHECK_CLEANFILES+= *.hdf
CLEANFILES=$(EXAMPLE_PROG)

# How to create EXAMPLEDIR if it doesn't already exist
$(EXAMPLEDIR):
	mkdir -p $@

# Install and uninstall rules.  We install the source files, not the
# example programs themselves.
install-data-local:
	@$(MAKE) $(AM_MAKEFLAGS) install-examples
uninstall-local:
	@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples

install-examples: $(EXAMPLEDIR)
	@for f in X $(INSTALL_FILES); do                                     \
	  if test $$f != X; then                                             \
	    (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);    \
            chmod a-x $(EXAMPLEDIR)/$$f;                                     \
	  fi;                                                                \
	done
	@for f in X $(INSTALL_SCRIPT_FILES); do                              \
	  if test $$f != X; then                                             \
	    (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);    \
	  fi;                                                                \
	done
	@for f in X $(INSTALL_TOP_FILES); do                                 \
	  if test $$f != X; then                                             \
	    (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
	    chmod a-x $(EXAMPLETOPDIR)/$$f;                                  \
	  fi;                                                                \
	done
	@for f in X $(INSTALL_TOP_SCRIPT_FILES); do                          \
	  if test $$f != X; then                                             \
	    (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
	  fi;                                                                \
	done

uninstall-examples:
	@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then           \
	  set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES);              \
	fi
	@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then    \
	  set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES);       \
	fi
	@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then    \
	  set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES);       \
	fi
	@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then    \
	  set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES);       \
	fi

installcheck-local:
	@if test "$(STATIC_SHARED)" = "static, shared"; then               \
	  H4CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check;                \
	  $(MAKE) $(AM_MAKEFLAGS) clean;                                   \
	  H4CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check;                      \
	elif test "$(STATIC_SHARED)" = "shared"; then                      \
	  H4CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check;                \
	else                                                               \
	  $(MAKE) $(AM_MAKEFLAGS) check;                                   \
	fi