mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 23:32:49 +02:00
partial cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3758 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7d56399044
commit
64c71ec5d9
2
Makefile
2
Makefile
@ -38,6 +38,8 @@ endif
|
|||||||
endif
|
endif
|
||||||
export OPENWRTVERSION
|
export OPENWRTVERSION
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
.pkginfo: FORCE
|
.pkginfo: FORCE
|
||||||
ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package)
|
ifeq ($(shell ./scripts/timestamp.pl -p .pkginfo package),package)
|
||||||
@echo Collecting package info...
|
@echo Collecting package info...
|
||||||
|
@ -5,20 +5,18 @@ all: compile
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
define Build/DefaultTargets
|
define Build/DefaultTargets
|
||||||
$(PKG_BUILD_DIR)/.prepared:
|
$(PKG_BUILD_DIR)/.prepared: FORCE $(DL_DIR)/$(PKG_SOURCE)
|
||||||
rm -rf $(PKG_BUILD_DIR)
|
ifeq ($(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),.)
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
@-rm -rf $(PKG_BUILD_DIR)
|
||||||
|
@mkdir -p $(PKG_BUILD_DIR)
|
||||||
$(call Build/Prepare)
|
$(call Build/Prepare)
|
||||||
touch $$@
|
@touch $$@
|
||||||
|
endif
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
||||||
$(call Build/Configure)
|
$(call Build/Configure)
|
||||||
touch $$@
|
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
|
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
|
||||||
$(call Build/Compile)
|
$(call Build/Compile)
|
||||||
touch $$@
|
touch $$@
|
||||||
@ -32,8 +30,8 @@ package-recompile:
|
|||||||
|
|
||||||
.PHONY: package-clean package-recompile
|
.PHONY: package-clean package-recompile
|
||||||
|
|
||||||
define Build/DefaultTargets
|
# define Build/DefaultTargets
|
||||||
endef
|
# endef
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/Default
|
define Package/Default
|
||||||
@ -52,22 +50,18 @@ TITLE:=
|
|||||||
DESCRIPTION:=
|
DESCRIPTION:=
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define RequiredField
|
||||||
|
ifeq ($$($(1)),)
|
||||||
|
$$(error Package/$$(1) is missing the $(1) field)
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
define BuildPackage
|
define BuildPackage
|
||||||
$(eval $(call Package/Default))
|
$(eval $(call Package/Default))
|
||||||
$(eval $(call Package/$(1)))
|
$(eval $(call Package/$(1)))
|
||||||
|
|
||||||
ifeq ($(TITLE),)
|
$(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, $(eval $(call RequiredField,$(FIELD))))
|
||||||
$$(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
|
|
||||||
ifeq ($(PKGARCH),)
|
ifeq ($(PKGARCH),)
|
||||||
PKGARCH:=$(ARCH)
|
PKGARCH:=$(ARCH)
|
||||||
endif
|
endif
|
||||||
@ -165,18 +159,16 @@ endef
|
|||||||
ifneq ($(strip $(PKG_SOURCE)),)
|
ifneq ($(strip $(PKG_SOURCE)),)
|
||||||
$(DL_DIR)/$(PKG_SOURCE):
|
$(DL_DIR)/$(PKG_SOURCE):
|
||||||
$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
|
$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(PKG_CAT)),)
|
ifneq ($(strip $(PKG_CAT)),)
|
||||||
define Build/Prepare/Default
|
define Build/Prepare/Default
|
||||||
if [ "$(PKG_CAT)" = "unzip" ]; then \
|
@if [ "$(PKG_CAT)" = "unzip" ]; then \
|
||||||
unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \
|
unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \
|
||||||
else \
|
else \
|
||||||
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \
|
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \
|
||||||
fi
|
fi
|
||||||
if [ -d ./patches ]; then \
|
@if [ -d ./patches ]; then \
|
||||||
$(PATCH) $(PKG_BUILD_DIR) ./patches ; \
|
$(PATCH) $(PKG_BUILD_DIR) ./patches ; \
|
||||||
fi
|
fi
|
||||||
endef
|
endef
|
||||||
@ -187,7 +179,7 @@ $(call Build/Prepare/Default)
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure/Default
|
define Build/Configure/Default
|
||||||
(cd $(PKG_BUILD_DIR); \
|
@(cd $(PKG_BUILD_DIR); \
|
||||||
[ -x configure ] && \
|
[ -x configure ] && \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
18
rules.mk
18
rules.mk
@ -5,9 +5,23 @@ endif
|
|||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
export SHELL
|
export SHELL
|
||||||
|
|
||||||
ifeq ($(V),)
|
ifdef V
|
||||||
V=5
|
ifeq ("$(origin V)", "command line")
|
||||||
|
KBUILD_VERBOSE = $(V)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifndef KBUILD_VERBOSE
|
||||||
|
KBUILD_VERBOSE = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(KBUILD_VERBOSE),0)
|
||||||
|
quiet =
|
||||||
|
Q =
|
||||||
|
else
|
||||||
|
quiet=quiet_
|
||||||
|
Q = @
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
CP=cp -fpR
|
CP=cp -fpR
|
||||||
MAKE1=make
|
MAKE1=make
|
||||||
|
Loading…
Reference in New Issue
Block a user