summaryrefslogtreecommitdiff
path: root/lib/am/all-target.am
blob: 9e69726cbddde556cc9727f8f59fe3a8e1e2a19e (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
## automake - create Makefile.in from Makefile.am
## Copyright (C) 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/>.

## The 'all' target.

.PHONY: all all-am all-local
ifdef SUBDIRS
.PHONY: all-recursive
endif

# We need to make sure $(BUILT_SOURCES) files are built before
# any "ordinary" target (all, check, install, ...) is run.
# Ditto for config.h (or files specified in AC_CONFIG_HEADERS).
# But of course, we shouldn't attempt to build any of them when
# running in dry mode.
am.built-early = %LOCAL-HEADERS% $(BUILT_SOURCES)
ifeq ($(am__make_dryrun),true)
# A trick to make the "make -n" output more useful, albeit not
# completely accurate.
all check install: | $(am.built-early)
else
$(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x)))
.am/built-sources/%: | %
	@$(am__ensure_target_dir_exists)
	@touch $@
endif

all-am: all-local %ALL-DEPS%
all: $(if $(SUBDIRS),all-recursive,all-am)