# $Id$ ## @file # # The kNIX Essentials. # This is not a standard kBuild makefile, the footer is not included. # # Copyright (c) 2007 knut st. osmundsen # # # This file is part of kNIX. # # kNIX is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # kNIX is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kNIX; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # DEPTH = .. include $(PATH_KBUILD)/header.kmk ## BOOTSTRAPPING_SUBDIRS # The bootstrapping subdirectories to traverse depth first. BOOTSTRAPPING_SUBDIRS = \ sys-devel/make \ sys-devel/flex \ sys-devel/m4 \ sys-devel/automake-1.4 \ sys-devel/automake-1.7 \ sys-devel/automake-1.8 \ sys-devel/automake-1.9 \ sys-devel/automake-wrapper \ sys-devel/autoconf-2.13 \ sys-devel/autoconf \ sys-devel/autoconf-wrapper \ sys-devel/patch \ sys-libs/ncurses \ sys-libs/zlib \ sys-apps/coreutils \ sys-apps/diffutils \ sys-apps/findutils \ sys-apps/sed \ sys-apps/gawk \ sys-apps/grep \ sys-apps/texinfo \ app-arch/bzip2 \ app-arch/cpio \ app-arch/tar \ app-shells/bash \ # sys-devel/automake-1.10 - either it depends on libtool or it's not working here... ## NOT_BOOTSTRAPPING_SUBDIRS # The not bootstrapping subdirectories to traverse depth first. NOT_BOOTSTRAPPING_SUBDIRS = \ app-arch/gzip \ dev-lang/perl \ dev-lang/python \ net-misc/wget \ sys-apps/prefix-portage \ ## def_do_subdir # Generate rules to do one subdirectory. # @remark This is evaluated twice. define def_do_subdir # build and install subdir_$(subdir)_all: +$$(MAKE) -C $(subdir) $(make_extra) $(def_target) # install subdir_$(subdir)_install: +$$(MAKE) -C $(subdir) $(make_extra) install # packing subdir_$(subdir)_packing: +$$(MAKE) -C $(subdir) $(make_extra) packing .NOTPARALLEL: subdir_$(subdir)_all subdir_$(subdir)_install subdir_$(subdir)_packing endef def_target := all make_extra := $(foreach subdir,$(BOOTSTRAPPING_SUBDIRS),$(eval $(def_do_subdir))) # not bootstrapping. def_target := all make_extra := NOT_BOOTSTRAPPING_KNIX=1 $(foreach subdir,$(NOT_BOOTSTRAPPING_SUBDIRS),$(eval $(def_do_subdir))) # # A pass # all_subdirs: | $(foreach subdir,$(BOOTSTRAPPING_SUBDIRS) $(NOT_BOOTSTRAPPING_SUBDIRS), subdir_$(subdir)_all) .NOTPARALLEL: all_subdirs # # The default rule. # all_recursive: | all_subdirs .NOTPARALLEL: all_recursive