source: trunk/target/sdk/files/Makefile @ 9692

Last change on this file since 9692 was 9692, checked in by nbd, 9 years ago

suppress bug after compiling last package in kamikaze SDK.

This patch corrects https://dev.openwrt.org/ticket/2508
An error was raised when no Config.in file was found in package/
Signed-off-by: Julien Pinon <julien.pinon@…>

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1# Makefile for OpenWrt
2#
3# Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name>
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 2 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 GNU
13# 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, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19
20RELEASE:=Kamikaze
21#VERSION:=2.0 # uncomment for final release
22
23#--------------------------------------------------------------
24# Just run 'make menuconfig', configure stuff, then run 'make'.
25# You shouldn't need to mess with anything beyond this point...
26#--------------------------------------------------------------
27TOPDIR=${shell pwd}
28export TOPDIR
29
30DEVELOPER=1
31export DEVELOPER
32
33SDK=1
34export SDK
35
36export IS_TTY=$(shell tty -s && echo 1 || echo 0)
37include $(TOPDIR)/include/verbose.mk
38
39all: world
40
41define stamp
42tmp/info/.stamp-$(1)-$(shell ls $(2)/*/Makefile $(5) | (md5sum || md5) 2>/dev/null | cut -d' ' -f1)
43endef
44
45STAMP=$(call stamp,packageinfo,package)
46
47$(STAMP):
48        @mkdir -p tmp/info
49        @rm -f tmp/info/.stamp-packageinfo*
50        @touch $@
51
52define filedep
53$(foreach FILE,$(shell ls package/*/Makefile),
54tmp/.packageinfo: $(FILE)
55$(FILE):
56        @true
57)
58endef
59
60$(eval $(filedep))
61
62tmp/.packageinfo: $(STAMP)
63        @echo -n Collecting package info...
64        @$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS=""
65
66package/%: FORCE
67        @$(NO_TRACE_MAKE) -s tmp/.packageinfo
68        $(MAKE) -C package $(patsubst package/%,%,$@) SDK=1
69
70download: FORCE
71        $(MAKE) package/download
72
73world: FORCE
74        $(MAKE) package/compile
75        -( \
76                cd package; \
77                for configfile in `find . -maxdepth 2 -name Config.in` ; do \
78                        $(MAKE) compile -C `dirname $$configfile` ; \
79                done \
80        )
81
82clean: FORCE
83        rm -rf build_* bin
84
85distclean: clean
86        rm -rf dl .pkg*
87
88.PHONY: FORCE
89FORCE:
Note: See TracBrowser for help on using the repository browser.