1 | # $Id: Makefile.kmk 3043 2007-04-08 12:14:22Z bird $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # The kNIX Essentials.
|
---|
5 | # This is not a standard kBuild makefile, the footer is not included.
|
---|
6 | #
|
---|
7 | # Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
|
---|
8 | #
|
---|
9 | #
|
---|
10 | # This file is part of kNIX.
|
---|
11 | #
|
---|
12 | # kNIX is free software; you can redistribute it and/or modify
|
---|
13 | # it under the terms of the GNU General Public License as published by
|
---|
14 | # the Free Software Foundation; either version 2 of the License, or
|
---|
15 | # (at your option) any later version.
|
---|
16 | #
|
---|
17 | # kNIX is distributed in the hope that it will be useful,
|
---|
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
20 | # GNU General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with kNIX; if not, write to the Free Software
|
---|
24 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
25 | #
|
---|
26 | #
|
---|
27 |
|
---|
28 |
|
---|
29 |
|
---|
30 | DEPTH = ..
|
---|
31 | include $(PATH_KBUILD)/header.kmk
|
---|
32 |
|
---|
33 | ## SUBDIRS
|
---|
34 | # The subdirectories to traverse depth first.
|
---|
35 | SUBDIRS = \
|
---|
36 | baselayout \
|
---|
37 | coreutils \
|
---|
38 | flex \
|
---|
39 | diffutils \
|
---|
40 | ncurses \
|
---|
41 | texinfo \
|
---|
42 |
|
---|
43 | ## def_do_subdir
|
---|
44 | # Generate rules to do one subdirectory.
|
---|
45 | # @remark This is evaluated twice.
|
---|
46 | define def_do_subdir
|
---|
47 |
|
---|
48 | # build and install
|
---|
49 | subdir_$(subdir)_all:
|
---|
50 | $$(MAKE) -C $(subdir)
|
---|
51 |
|
---|
52 | # install
|
---|
53 | subdir_$(subdir)_install:
|
---|
54 | $$(MAKE) -C $(subdir) install
|
---|
55 |
|
---|
56 | # packing
|
---|
57 | subdir_$(subdir)_packing:
|
---|
58 | $$(MAKE) -C $(subdir) packing
|
---|
59 |
|
---|
60 | .NOTPARALLEL: subdir_$(subdir)_all subdir_$(subdir)_install subdir_$(subdir)_packing
|
---|
61 | endef
|
---|
62 |
|
---|
63 | $(foreach subdir,$(SUBDIRS),$(eval $(def_do_subdir)))
|
---|
64 |
|
---|
65 | #
|
---|
66 | # A pass
|
---|
67 | #
|
---|
68 | all_subdirs: | $(foreach subdir,$(SUBDIRS), subdir_$(subdir)_all)
|
---|
69 |
|
---|
70 | .NOTPARALLEL: all_subdirs
|
---|
71 |
|
---|
72 |
|
---|
73 | #
|
---|
74 | # The default rule.
|
---|
75 | #
|
---|
76 | all_recursive: | all_subdirs
|
---|
77 |
|
---|
78 | .NOTPARALLEL: all_recursive
|
---|
79 |
|
---|