summaryrefslogtreecommitdiff
path: root/lib/am/install.am
blob: b587d08392c82676c35394b5a3c9400e12efb546 (plain)
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
## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2012 Free Software Foundation, Inc.

## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.

## ----------------------------------------- ##
## installdirs -- Creating the installdirs.  ##
## ----------------------------------------- ##

## The reason we loop over %am__installdirs% (instead of simply running
## $(MKDIR_P) %am__installdirs%) is that directories variable such as
## "$(DESTDIR)$(mydir)" can potentially expand to "" if $(mydir) is
## conditionally defined.  BTW, those directories are quoted in order
## to support installation paths with spaces.

if %?SUBDIRS%
.PHONY: installdirs installdirs-am
RECURSIVE_TARGETS += installdirs-recursive
installdirs: installdirs-recursive
installdirs-am:%installdirs-local%
?am__installdirs?	for dir in %am__installdirs%; do \
?am__installdirs?	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
?am__installdirs?	done
else !%?SUBDIRS%
.PHONY: installdirs
installdirs:%installdirs-local%
?am__installdirs?	for dir in %am__installdirs%; do \
?am__installdirs?	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
?am__installdirs?	done
endif !%?SUBDIRS%


## ----------------- ##
## Install targets.  ##
## ----------------- ##

.PHONY: install install-exec install-data uninstall
.PHONY: install-exec-am install-data-am uninstall-am

if %?SUBDIRS%
RECURSIVE_TARGETS += install-data-recursive install-exec-recursive \
		     install-recursive uninstall-recursive
install:%maybe_BUILT_SOURCES% install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
else !%?SUBDIRS%
install:%maybe_BUILT_SOURCES% install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
endif !%?SUBDIRS%

if %?maybe_BUILT_SOURCES%
.MAKE: install
endif %?maybe_BUILT_SOURCES%

.MAKE .PHONY: install-am
install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am


.PHONY: installcheck
?SUBDIRS?installcheck: installcheck-recursive
?!SUBDIRS?installcheck: installcheck-am
?!SUBDIRS?.PHONY: installcheck-am
?!SUBDIRS?installcheck-am:

## If you ever modify this, keep in mind that INSTALL_PROGRAM is used
## in subdirectories, so never set it to a value relative to the top
## directory.
.MAKE .PHONY: install-strip
install-strip:
## Beware that there are two variables used to install programs:
##   INSTALL_PROGRAM is used for ordinary *_PROGRAMS
##   install_sh_PROGRAM is used for nobase_*_PROGRAMS (because install-sh
##                                                     creates directories)
## It's OK to override both with INSTALL_STRIP_PROGRAM, because
## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
##
## Use double quotes for the *_PROGRAM settings because we might need to
## interpolate some backquotes at runtime.
##
## The case for empty $(STRIP) is separate so that it is quoted correctly for
## multiple words, but does not expand to an empty words if STRIP is empty.
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi