Remove incompatible build pkg
[packages] / iterate.rules
1 # This file is part of XEmacs.
2
3 # Copyright (C) 2002, 2003 Ben Wing.
4
5 # XEmacs is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any
8 # later version.
9
10 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13 # for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with XEmacs; see the file COPYING.  If not, write to
17 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 # Boston, MA 02110-1301, USA.
19
20 #
21 # This is used by subdirectories that directly contain packages.
22 # Higher-level subdirectories should use meta-iterate.rules instead.
23 #
24
25 XEMACS_PACKAGES_BASE:= $(shell while [ ! -f XEmacs.rules ]; do \
26                                 cd ..;  \
27                                 done;   \
28                                 pwd)
29
30 include ${XEMACS_PACKAGES_BASE}/meta-targets.rules
31
32 ITERATE:= $(PACKAGES)
33
34 include ${XEMACS_PACKAGES_BASE}/iterate-1.rules
35
36 # Master rule to pass down actual building 
37 # Use a static pattern because of the extra dependencies
38 $(ALL_TARGETS) : %.target:
39         [ -d $(*D) ] && $(MAKE) $(MFLAGS) -C $(*D) $(*F)
40
41 .PHONY: $(ALL_TARGETS) 
42
43 # Standard dependencies
44
45 # $(BYTECOMPILE_TARGETS): %bytecompile.target: %autoloads.target
46
47 # Optionally put in fake rules for packages that we cannot
48 # recursively build (yet)
49 ifneq ($(strip (ASSUMED_PRESENT)),)
50 ASSUMED_TARGETS = $(foreach package,$(ASSUMED_PRESENT), \
51                         $(package)/autoloads.target \
52                         $(package)/compile.target )
53
54 $(ASSUMED_TARGETS):
55         -
56 endif
57
58 # Generate and load inter-package dependencies
59
60 DEPENDS_FILE_NAME = pdepends.mk
61
62 DEPENDS_FILES = $(PACKAGES:=/$(DEPENDS_FILE_NAME))
63
64 $(DEPENDS_FILES): %$(DEPENDS_FILE_NAME): %Makefile $(XEMACS_PACKAGES_BASE)/XEmacs.rules
65         $(MAKE) $(MFLAGS) -C $(*D) TARGET_BASE=$(dir $(*D)) \
66                 $(DEPENDS_FILE_NAME)
67
68 # Compute, based on the target given on the command line, whether we need
69 # to load and recompute the pdepends.mk files (this happens automatically
70 # for any Makefile loaded or executed, if the name of the file appears
71 # as a target)
72
73
74 ifeq ($($(MAKECMDGOALS)_NEED_PDEPENDS),t)
75 include $(DEPENDS_FILES)
76 endif
77
78 # Local Variables:
79 # mode: Makefile
80 # end: