Merge few bug-fixing branches into branch-1.13.2
[platform/upstream/automake.git] / lib / am / header-vars.am
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994-2013 Free Software Foundation, Inc.
3
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
8
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
13
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 VPATH = @srcdir@
18
19 @SET_MAKE@
20
21 ## We used to define this.  However, we don't because vendor makes
22 ## (e.g., Solaris, Irix) won't correctly propagate variables that are
23 ## defined in Makefile.  This particular variable can't be correctly
24 ## defined by configure (at least, not the current configure), so we
25 ## simply avoid defining it to allow the user to use this feature with
26 ## a vendor make.
27 ## DESTDIR =
28
29 ## Shell code that determines whether we are running under GNU make.
30 ## This is somewhat of an hack, and might be improved, but is good
31 ## enough for now.
32 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
33
34 ## Shell code that determines whether make is running in "dry mode"
35 ## ("make -n") or not.  Useful in rules that invoke make recursively,
36 ## and are thus executed also with "make -n" -- either because they
37 ## are declared as dependencies to '.MAKE' (NetBSD make), or because
38 ## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
39 am__make_dryrun = \
40   { \
41     am__dry=no; \
42     if $(am__is_gnu_make); then \
43 ## GNU make: $(MAKEFLAGS) is quite tricky there, and the older
44 ## $(MFLAGS) variable behaves much better.
45       for am__flg in $$MFLAGS; do \
46         case $$am__flg in \
47           *=*|--*) ;; \
48           -*n*) am__dry=yes; break;; \
49         esac; \
50       done; \
51     else \
52 ## Non-GNU make: we must rely on $(MAKEFLAGS).  This is tricky and brittle,
53 ## but is the best we can do.
54       case $$MAKEFLAGS in \
55 ## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
56 ## to " TESTS=foo\ nap", so that the simpler loop below (on word-splitted
57 ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
58 ## misinterpret that as and indication that make is running in dry mode.
59 ## This has already happened in practice.  So we need this unpleasant hack.
60          *\\[\ \        ]*) \
61            echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
62              | grep '^AM OK$$' >/dev/null || am__dry=yes ;; \
63          *) \
64            am__skip_next=no; \
65            for am__flg in $$MAKEFLAGS; do \
66              if test $$am__skip_next = yes; then \
67                am__skip_next=no; \
68                continue; \
69              fi; \
70              case $$am__flg in \
71                *=*|--*) ;; \
72 ## Quite ugly special-casing.  We might need other similar, but let's
73 ## wait until the need arises.
74                -I) am__skip_next=yes;; \
75                *n*) am__dry=yes; break;; \
76              esac; \
77            done ;;\
78        esac; \
79     fi; \
80     test $$am__dry = yes; \
81   }
82
83 ## Some derived variables that have been found to be useful.
84 pkgdatadir = $(datadir)/@PACKAGE@
85 pkgincludedir = $(includedir)/@PACKAGE@
86 pkglibdir = $(libdir)/@PACKAGE@
87 pkglibexecdir = $(libexecdir)/@PACKAGE@
88
89 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
90 install_sh_DATA = $(install_sh) -c -m 644
91 install_sh_PROGRAM = $(install_sh) -c
92 install_sh_SCRIPT = $(install_sh) -c
93 INSTALL_HEADER = $(INSTALL_DATA)
94 transform = $(program_transform_name)
95
96 ## These are defined because otherwise make on NetBSD V1.1 will print
97 ## (eg): $(NORMAL_INSTALL) expands to empty string.
98 NORMAL_INSTALL = :
99 PRE_INSTALL = :
100 POST_INSTALL = :
101 NORMAL_UNINSTALL = :
102 PRE_UNINSTALL = :
103 POST_UNINSTALL = :
104
105 ## dejagnu.am uses these variables.  Some users might rely on them too.
106 ?BUILD?build_triplet = @build@
107 ?HOST?host_triplet = @host@
108 ?TARGET?target_triplet = @target@