This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makerules.top
76 lines (64 loc) · 2.57 KB
/
Makerules.top
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
#
# Copyright (c) 1995,1994 The University of Utah and
# the Computer Systems Laboratory (CSL). All rights reserved.
#
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
#
# THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
# IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
# ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
#
# CSL requests users of this software to return to [email protected] any
# improvements that they make and grant CSL redistribution rights.
#
# Author: Bryan Ford, University of Utah CSL
#
ifndef _mach4_makerules_top_
_mach4_makerules_top_ = yes
# This Makerules file is only used by top-level Makefiles
# in machine-dependent source trees.
#
# SRCTREES must contain the pathnames of all more-speific source trees.
# The first pathname is assumed to be the directory containing configstart,
# and is where the configure script is produced.
#
# SUBDIRS must be set to the complete list of subdirectories
# which contain Makefiles to descend into.
# The directories can be listed in any order.
#
# FIRST_SUBDIRS can be a subset of those subdirectories
# which must be built before all other subdirectories,
# in the order specified in FIRST_SUBDIRS.
#
# Similarly, LAST_SUBDIRS can be a subset of the SUBDIRS
# which must be built after all others,
# in the specified order.
#
# Naturally, FIRST_SUBDIRS and LAST_SUBDIRS should not overlap.
SRCTREES += $(GSRCDIR)
CONFIGDIR = $(firstword $(SRCTREES))
# Generate a final, properly-ordered list of all subdirectories.
ORDERED_SUBDIRS := $(foreach DIR,$(FIRST_SUBDIRS),$(filter $(DIR),$(SUBDIRS))) \
$(filter-out $(FIRST_SUBDIRS), \
$(filter-out $(LAST_SUBDIRS),$(SUBDIRS))) \
$(foreach DIR,$(LAST_SUBDIRS),$(filter $(DIR),$(SUBDIRS)))
all:
for subdir in $(ORDERED_SUBDIRS); do $(MAKE) -C $$subdir || exit 1; done
install:
for subdir in $(ORDERED_SUBDIRS); do $(MAKE) -C $$subdir install || exit 1; done
clean:
for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir clean; done
distclean: clean
rm -f Makefile config.status $(addsuffix /Makefile,$(SUBDIRS))
configure: configure.in
autoconf
cp configure $(CONFIGDIR)/
configure.in: $(addsuffix /aclocal.m4,$(SRCTREES)) \
$(CONFIGDIR)/configstart \
$(addsuffix /configrules,$(SRCTREES))
cat $^ >$@
endif