| [3043] | 1 | # $Id: Makefile.kmk 3646 2008-05-18 23:42:56Z 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] | 30 | DEPTH = . | 
|---|
|  | 31 | include $(PATH_KBUILD)/header.kmk | 
|---|
|  | 32 |  | 
|---|
| [3043] | 33 | ## SUBDIRS | 
|---|
|  | 34 | # The subdirectories to traverse depth first. | 
|---|
| [3293] | 35 | # (This is bootstrap order.) | 
|---|
| [2477] | 36 | SUBDIRS = \ | 
|---|
| [2550] | 37 | baselayout \ | 
|---|
| [3480] | 38 | essentials/app-arch/gzip \ | 
|---|
| [3293] | 39 | essentials/sys-apps/gawk \ | 
|---|
|  | 40 | essentials/sys-apps/diffutils \ | 
|---|
| [2477] | 41 | yacc \ | 
|---|
| [3301] | 42 | bsdmisc \ | 
|---|
| [3293] | 43 | essentials/sys-apps/coreutils \ | 
|---|
|  | 44 | essentials/sys-apps/sed \ | 
|---|
| [3308] | 45 | essentials/sys-devel/flex \ | 
|---|
| [3507] | 46 | essentials/sys-devel/m4 \ | 
|---|
| [3646] | 47 | essentials/sys-apps/grep \ | 
|---|
| [2550] | 48 | ash \ | 
|---|
| [3293] | 49 | essentials | 
|---|
| [2477] | 50 |  | 
|---|
| [3301] | 51 | ## Skip these for now: | 
|---|
|  | 52 | #       libc \ | 
|---|
|  | 53 | #       emx \ | 
|---|
|  | 54 |  | 
|---|
| [3293] | 55 | ## @todo | 
|---|
|  | 56 | #       binutils \ | 
|---|
|  | 57 | #       gcc \ | 
|---|
|  | 58 |  | 
|---|
| [2477] | 59 | ## def_do_subdir | 
|---|
|  | 60 | # Generate rules to do one subdirectory. | 
|---|
|  | 61 | # @remark       This is evaluated twice. | 
|---|
|  | 62 | define def_do_subdir | 
|---|
|  | 63 |  | 
|---|
|  | 64 | # build and install | 
|---|
|  | 65 | subdir_$(subdir)_all: | 
|---|
| [3109] | 66 | +$$(MAKE) -C $(subdir) | 
|---|
| [2477] | 67 |  | 
|---|
|  | 68 | # install | 
|---|
|  | 69 | subdir_$(subdir)_install: | 
|---|
| [3109] | 70 | +$$(MAKE) -C $(subdir) install | 
|---|
| [2477] | 71 |  | 
|---|
|  | 72 | # packing | 
|---|
|  | 73 | subdir_$(subdir)_packing: | 
|---|
| [3109] | 74 | +$$(MAKE) -C $(subdir) packing | 
|---|
| [2477] | 75 |  | 
|---|
|  | 76 | .NOTPARALLEL: subdir_$(subdir)_all subdir_$(subdir)_install subdir_$(subdir)_packing | 
|---|
|  | 77 | endef | 
|---|
|  | 78 |  | 
|---|
|  | 79 | $(foreach subdir,$(SUBDIRS),$(eval $(def_do_subdir))) | 
|---|
|  | 80 |  | 
|---|
|  | 81 | # | 
|---|
|  | 82 | # A pass | 
|---|
| [3043] | 83 | # | 
|---|
| [2477] | 84 | all_subdirs: | $(foreach subdir,$(SUBDIRS), subdir_$(subdir)_all) | 
|---|
| [3043] | 85 |  | 
|---|
| [2477] | 86 | .NOTPARALLEL: all_subdirs | 
|---|
|  | 87 |  | 
|---|
|  | 88 |  | 
|---|
|  | 89 | # | 
|---|
|  | 90 | # The default rule. | 
|---|
| [3043] | 91 | # | 
|---|
| [2477] | 92 | all_recursive: | all_subdirs | 
|---|
| [3043] | 93 |  | 
|---|
| [2477] | 94 | .NOTPARALLEL: all_recursive | 
|---|
| [3043] | 95 |  | 
|---|