-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.am
84 lines (62 loc) · 3.11 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
# Copyright (C) 2006 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.
# Author: Andreas Waechter IBM 2006-04-13
AUTOMAKE_OPTIONS = foreign
########################################################################
# Set up installation and .pc file #
########################################################################
datacoindir = $(datadir)/$(PACKAGE_TARNAME)
# If zlib is available, install compressed files. If zlib is not available,
# install uncompressed copies of compressed files. EXAMPLE_DIST_FILES and
# EXAMPLE_UNCOMP_FILES are identical except that any `.gz' suffixes are
# stripped from names in EXAMPLE_UNCOMP_FILES. EXAMPLE_CLEAN_FILES (below)
# is exactly the set of names that have been stripped of `.gz'.
if COIN_HAS_ZLIB
datacoin_DATA = $(EXAMPLE_DIST_FILES)
else
datacoin_DATA = $(EXAMPLE_UNCOMP_FILES)
endif
pkgconfiglibdir = $(libdir)/pkgconfig
pkgconfiglib_DATA = coindatasample.pc
test:
@echo "No test available."
########################################################################
# Build and clean actions #
########################################################################
# We always need to clean these files, which are uncompressed copies of
# compressed files, created when zlib is not available.
CLEANFILES = $(EXAMPLE_CLEAN_FILES)
# If this is a VPATH build, we'll create links in the build directory from
# files in the source directory, and we'll need to clean them up when we're
# done.
if COIN_VPATH_BUILD
CLEANFILES += $(EXAMPLE_DIST_FILES)
endif
# The files of EXAMPLE_DIST_FILES must be phony targets. Otherwise, make
# considers the file found in the source directory to be sufficient and doesn't
# create the link. This becomes a problem because `make install' now feels
# it should invoke the rule for each file prior to installation. Hence the
# guard to check if the file is already present.
if COIN_VPATH_BUILD
$(EXAMPLE_DIST_FILES):
@test -f $@ || $(LN_S) $(srcdir)/$@ $@
.PHONY: $(EXAMPLE_DIST_FILES)
endif
########################################################################
# Extra uninstall actions #
########################################################################
# Remove the directory created at installation
uninstall-local:
@if test -d $(datacoindir) ; then rmdir $(datacoindir) ; fi
########################################################################
# Extra targets for uncompressing the .gz files #
########################################################################
# If configure has determined that libz can be used, compressed files can
# be read and we don't have to uncompress. Otherwise, uncompress the files.
# EXAMPLE_CLEAN_FILES contains just the names of compressed files, stripped
# of the .gz suffix. This will trigger creation of an uncompressed copy.
# This target creates uncompressed files without deleting the original
# compressed files.
$(EXAMPLE_CLEAN_FILES):
gzip -d -c $(srcdir)/[email protected] > $@