commit profile support for base-files... patches still need to be done
[openwrt.git] / include / target.mk
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 define AddProfile
9   $(eval $(call Profile/Default))
10   $(eval $(call Profile/$(1)))
11   ifneq ($(ID),)
12     PROFILE:=$(ID)
13         $(ID)_NAME:=$(NAME)
14         $(ID)_PACKAGES:=$(PACKAGES)
15     ifneq ($(KCONFIG),)
16       PROFILE_LIST += \
17                 echo '$(ID):'; [ -z '$(NAME)' ] || echo '       $(NAME)'; echo '        Packages: $(PACKAGES)';
18     endif
19   endif
20 endef
21
22
23 include $(TMP_DIR)/.target.mk
24
25 ifeq ($(IB),1)
26 $(TMP_DIR)/.target.mk: $(TOPDIR)/.target.mk
27         $(CP) $< $@
28 else
29 $(TMP_DIR)/.target.mk: $(TMP_DIR)/.targetinfo
30         $(SCRIPT_DIR)/metadata.pl target_mk < $(TMP_DIR)/.targetinfo > $@
31 endif
32