source: trunk/Makefile.kmk@ 3232

Last change on this file since 3232 was 3109, checked in by bird, 18 years ago

mark make recursion

  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[3043]1# $Id: Makefile.kmk 3109 2007-04-15 08:26:21Z bird $
[2477]2## @file
3#
[2677]4# Top-Level Makefile.
[2477]5# This is not a standard kBuild makefile, the footer is not included.
6#
[3043]7# Copyright (c) 2005-2007 knut st. osmundsen <bird-src-spam@anduin.net>
[2477]8#
9#
[2677]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#
[2477]27
28
[2677]29
[2477]30DEPTH = .
31include $(PATH_KBUILD)/header.kmk
32
[3043]33## SUBDIRS
34# The subdirectories to traverse depth first.
[2477]35SUBDIRS = \
[2550]36 baselayout \
[3043]37 libc \
[2677]38 emx \
[2477]39 yacc \
[2550]40 ash \
[3043]41 binutils \
42 gcc
[2477]43
44## def_do_subdir
45# Generate rules to do one subdirectory.
46# @remark This is evaluated twice.
47define def_do_subdir
48
49# build and install
50subdir_$(subdir)_all:
[3109]51 +$$(MAKE) -C $(subdir)
[2477]52
53# install
54subdir_$(subdir)_install:
[3109]55 +$$(MAKE) -C $(subdir) install
[2477]56
57# packing
58subdir_$(subdir)_packing:
[3109]59 +$$(MAKE) -C $(subdir) packing
[2477]60
61.NOTPARALLEL: subdir_$(subdir)_all subdir_$(subdir)_install subdir_$(subdir)_packing
62endef
63
64$(foreach subdir,$(SUBDIRS),$(eval $(def_do_subdir)))
65
66#
67# A pass
[3043]68#
[2477]69all_subdirs: | $(foreach subdir,$(SUBDIRS), subdir_$(subdir)_all)
[3043]70
[2477]71.NOTPARALLEL: all_subdirs
72
73
74#
75# The default rule.
[3043]76#
[2477]77all_recursive: | all_subdirs
[3043]78
[2477]79.NOTPARALLEL: all_recursive
[3043]80
Note: See TracBrowser for help on using the repository browser.