aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2006-05-11 00:18:12 +0000
committerMike Baker <mbm@openwrt.org>2006-05-11 00:18:12 +0000
commit8b7d9fc053b56827d196da7d2dced619a9d6504d (patch)
tree29711a0aebbf2387d85e7ae971b3dd253edebf6b
parent0ce063db66999ec583f94a2ecd07ea208730b769 (diff)
downloadupstream-8b7d9fc053b56827d196da7d2dced619a9d6504d.tar.gz
upstream-8b7d9fc053b56827d196da7d2dced619a9d6504d.tar.bz2
upstream-8b7d9fc053b56827d196da7d2dced619a9d6504d.zip
partial cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3758 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--Makefile2
-rw-r--r--package/rules.mk46
-rw-r--r--rules.mk18
3 files changed, 37 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index c323a9c24c..06288de6b8 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,8 @@ endif
endif
export OPENWRTVERSION
+all:
+
.pkginfo: FORCE
ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package)
@echo Collecting package info...
diff --git a/package/rules.mk b/package/rules.mk
index 3d2f957d3b..20fa5d4c82 100644
--- a/package/rules.mk
+++ b/package/rules.mk
@@ -5,20 +5,18 @@ all: compile
endif
define Build/DefaultTargets
-$(PKG_BUILD_DIR)/.prepared:
- rm -rf $(PKG_BUILD_DIR)
- mkdir -p $(PKG_BUILD_DIR)
+$(PKG_BUILD_DIR)/.prepared: FORCE $(DL_DIR)/$(PKG_SOURCE)
+ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.)
+ @-rm -rf $(PKG_BUILD_DIR)
+ @mkdir -p $(PKG_BUILD_DIR)
$(call Build/Prepare)
- touch $$@
+ @touch $$@
+endif
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
$(call Build/Configure)
touch $$@
-ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.)
-$(PKG_BUILD_DIR)/.prepared: clean
-endif
-
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
$(call Build/Compile)
touch $$@
@@ -32,8 +30,8 @@ package-recompile:
.PHONY: package-clean package-recompile
-define Build/DefaultTargets
-endef
+# define Build/DefaultTargets
+# endef
endef
define Package/Default
@@ -52,22 +50,18 @@ TITLE:=
DESCRIPTION:=
endef
+define RequiredField
+ifeq ($$($(1)),)
+$$(error Package/$$(1) is missing the $(1) field)
+endif
+endef
+
define BuildPackage
$(eval $(call Package/Default))
$(eval $(call Package/$(1)))
-ifeq ($(TITLE),)
-$$(error Package $(1) has no TITLE)
-endif
-ifeq ($(CATEGORY),)
-$$(error Package $(1) has no CATEGORY)
-endif
-ifeq ($(PRIORITY),)
-$$(error Package $(1) has no PRIORITY)
-endif
-ifeq ($(VERSION),)
-$$(error Package $(1) has no VERSION)
-endif
+$(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, $(eval $(call RequiredField,$(FIELD))))
+
ifeq ($(PKGARCH),)
PKGARCH:=$(ARCH)
endif
@@ -165,18 +159,16 @@ endef
ifneq ($(strip $(PKG_SOURCE)),)
$(DL_DIR)/$(PKG_SOURCE):
$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
-
-$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
endif
ifneq ($(strip $(PKG_CAT)),)
define Build/Prepare/Default
- if [ "$(PKG_CAT)" = "unzip" ]; then \
+ @if [ "$(PKG_CAT)" = "unzip" ]; then \
unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \
else \
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \
fi
- if [ -d ./patches ]; then \
+ @if [ -d ./patches ]; then \
$(PATCH) $(PKG_BUILD_DIR) ./patches ; \
fi
endef
@@ -187,7 +179,7 @@ $(call Build/Prepare/Default)
endef
define Build/Configure/Default
- (cd $(PKG_BUILD_DIR); \
+ @(cd $(PKG_BUILD_DIR); \
[ -x configure ] && \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
diff --git a/rules.mk b/rules.mk
index 417dae7de0..d94a818441 100644
--- a/rules.mk
+++ b/rules.mk
@@ -5,9 +5,23 @@ endif
SHELL=/bin/bash
export SHELL
-ifeq ($(V),)
-V=5
+ifdef V
+ ifeq ("$(origin V)", "command line")
+ KBUILD_VERBOSE = $(V)
+ endif
endif
+ifndef KBUILD_VERBOSE
+ KBUILD_VERBOSE = 0
+endif
+
+ifneq ($(KBUILD_VERBOSE),0)
+ quiet =
+ Q =
+else
+ quiet=quiet_
+ Q = @
+endif
+
CP=cp -fpR
MAKE1=make