cleanup & add whitespace

SVN-Revision: 3764
owl
Mike Baker 2006-05-11 22:36:20 +00:00
parent be9cc65a95
commit 3b1260256e
1 changed files with 94 additions and 95 deletions

View File

@ -5,28 +5,24 @@ all: compile
endif
define Build/DefaultTargets
$(PKG_BUILD_DIR)/.prepared: FORCE $(DL_DIR)/$(PKG_SOURCE)
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 $$@
endif
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: prepared
$(call Build/Configure)
touch $$@
$(PKG_BUILD_DIR)/.built: FORCE $(PKG_BUILD_DIR)/.configured
#$#$#(error $$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)))
ifeq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $$(IPKG_$(1)) $(PKG_BUILD_DIR)),$(PKG_BUILD_DIR))
built: FORCE $(PKG_BUILD_DIR)/.configured
ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1)))
$(call Build/Compile)
touch $$@
endif
package-clean: FORCE
$(call Build/Clean)
rm -f $(PKG_BUILD_DIR)/.built
define Build/DefaultTargets
endef
@ -48,17 +44,15 @@ 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)))
$(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, $(eval $(call RequiredField,$(FIELD))))
$(foreach FIELD, TITLE CATEGORY PRIORITY VERSION,
ifeq ($($(FIELD)),)
$$(error Package/$(1) is missing the $(FIELD) field)
endif
)
ifeq ($(PKGARCH),)
PKGARCH:=$(ARCH)
@ -88,30 +82,34 @@ IDEPEND_$(1):=$$(strip $$(DEPENDS))
DUMPINFO += \
echo "Package: $(1)";
ifneq ($(MENU),)
DUMPINFO += \
echo "Menu: $(MENU)";
endif
ifneq ($(DEFAULT),)
DUMPINFO += \
echo "Default: $(DEFAULT)";
endif
DUMPINFO += \
echo "Version: $(VERSION)"; \
echo "Depends: $$(IDEPEND_$(1))"; \
echo "Category: $(CATEGORY)"; \
echo "Title: $(TITLE)"; \
echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
ifneq ($(URL),)
DUMPINFO += \
echo; \
echo "$(URL)";
endif
DUMPINFO += \
echo "@@";
$$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared
$$(IDIR_$(1))/CONTROL/control: prepared
mkdir -p $$(IDIR_$(1))/CONTROL
echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
@ -127,7 +125,7 @@ $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared
[ -f ./ipkg/$(1).$$$$file ] && cp ./ipkg/$(1).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \
done
$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built
$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control built
$(call Package/$(1)/install,$$(IDIR_$(1)))
mkdir -p $(PACKAGE_DIR)
$(RSTRIP) $$(IDIR_$(1))
@ -138,6 +136,7 @@ $$(INFO_$(1)): $$(IPKG_$(1))
$(1)-clean:
rm -f $(PACKAGE_DIR)/$(1)_*
clean: $(1)-clean
ifneq ($(__DEFAULT_TARGETS),1)
@ -223,7 +222,7 @@ $(PACKAGE_DIR):
mkdir -p $@
source: FORCE $(DL_DIR)/$(PKG_SOURCE)
prepare: FORCE $(PKG_BUILD_DIR)/.prepared
prepare: FORCE prepared
configure: FORCE $(PKG_BUILD_DIR)/.configured
compile-targets: FORCE