source: trunk/config/config.mk @ 724

Last change on this file since 724 was 724, checked in by amain, 5 years ago

Simplyfy patch / release management. Restructure make menuconfig. Add auto upload for buildbot builds. Latest OpenWrt trunk fixes.

File size: 2.6 KB
Line 
1# DebWrt - Debian on Embedded devices
2#
3# Copyright (C) 2010 Johan van Zoomeren
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18TOPDIR:=$(CURDIR)
19MCONF_DIR=$(TOPDIR)/config/mconf
20CONF:=$(TOPDIR)/config/mconf/conf
21MCONF:=$(TOPDIR)/config/mconf/mconf
22
23config/mconf/mconf:
24        @$(MAKE) -s -C $(MCONF_DIR) all
25
26config/mconf/conf:
27        @$(MAKE) -s -C $(MCONF_DIR) conf
28
29# Create new config-target.in from OpenWrt's targets config generated file
30# note: include the select <target> lines, exlcude all other selects
31config/target: openwrt/menuconfig
32        LC_ALL=C cat $(OPENWRT_BUILD_DIR)/tmp/.config-target.in \
33          | awk \
34            '/select\W+[[:lower:]]/ { \
35               print $0 \
36             } \
37             \
38             /select.*HAS_SUBTARGETS/ { \
39               print $0 \
40             } \
41             ! /select/ { \
42               print $0 \
43             }' \
44             | sed \
45                -e 's/prompt "Target System"/prompt "Target System" if DO_CONF_TARGETS/' \
46                -e 's/prompt "Target Profile"/prompt "Target Profile" if DO_CONF_TARGETS/' \
47             >$(TOPDIR)/config/target.in
48        cat $(OPENWRT_BUILD_DIR)/target/Config.in \
49          | grep -v "source " \
50          >$(TOPDIR)/config/archs.in
51
52config/clean:
53        $(MAKE) -C $(MCONF_DIR) clean
54
55.config:
56        @echo "Please run make menuconfig to create a configuration. Then run make again. Type make help to get a list of available DebWrt make commands"
57        @exit 1
58
59# stop our value from leaking into the config tool, which can be problematic
60config defconfig oldconfig menuconfig: TARGET_ARCH=
61
62config: plugins/generate-config config/mconf/conf FORCE
63        $(CONF) Config.in
64        @echo "Type make help to get a list of available DebWrt make commands"
65
66defconfig: plugins/generate-config config/mconf/conf FORCE
67        touch .config
68        $(CONF) -D .config Config.in
69        @echo "Type make help to get a list of available DebWrt make commands"
70
71oldconfig: plugins/generate-config config/mconf/conf FORCE
72        $(CONF) -o Config.in
73        @echo "Type make help to get a list of available DebWrt make commands"
74
75menuconfig: plugins/generate-config config/mconf/mconf FORCE
76        $(MCONF) Config.in
77        @echo "Type make help to get a list of available DebWrt make commands"
78
79.PHONY: config/clean
80
Note: See TracBrowser for help on using the repository browser.