2006-07-21 11:15:06 +02:00
|
|
|
#
|
2007-07-30 23:14:08 +02:00
|
|
|
# Copyright (C) 2006-2007 OpenWrt.org
|
2006-07-21 11:15:06 +02:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
2007-07-30 20:22:01 +02:00
|
|
|
curdir:=package
|
|
|
|
|
|
|
|
-include $(TMP_DIR)/.packagedeps
|
|
|
|
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
|
2007-07-30 20:39:20 +02:00
|
|
|
$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
|
2007-07-30 20:22:01 +02:00
|
|
|
$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
|
2007-07-30 20:39:20 +02:00
|
|
|
$(curdir)/builddirs-install:=. $(sort $(package-y))
|
2007-07-30 20:22:01 +02:00
|
|
|
|
|
|
|
$(curdir)/install:=$(curdir)/install-cleanup
|
2007-08-01 00:54:21 +02:00
|
|
|
|
2007-08-01 10:21:15 +02:00
|
|
|
$(curdir)/cleanup: $(TMP_DIR)/.build
|
2006-05-31 22:58:13 +02:00
|
|
|
rm -rf $(BUILD_DIR)/root
|
2007-08-01 00:54:21 +02:00
|
|
|
|
2007-08-01 10:21:15 +02:00
|
|
|
$(curdir)/rootfs-prepare: $(TMP_DIR)/.build
|
2006-12-01 15:01:31 +01:00
|
|
|
@if [ -d $(TOPDIR)/files ]; then \
|
|
|
|
$(CP) $(TOPDIR)/files/. $(BUILD_DIR)/root; \
|
|
|
|
fi
|
2007-05-31 14:05:37 +02:00
|
|
|
@mkdir -p $(BUILD_DIR)/root/etc/rc.d
|
2006-10-15 23:03:30 +02:00
|
|
|
@( \
|
|
|
|
cd $(BUILD_DIR)/root; \
|
|
|
|
for script in ./etc/init.d/*; do \
|
|
|
|
grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \
|
|
|
|
IPKG_INSTROOT=$(BUILD_DIR)/root $(which bash) ./etc/rc.common $$script enable; \
|
2007-03-16 04:02:31 +01:00
|
|
|
done || true \
|
2006-10-15 23:03:30 +02:00
|
|
|
)
|
2007-04-29 03:30:48 +02:00
|
|
|
@-find $(BUILD_DIR)/root -name CVS | $(XARGS) rm -rf
|
|
|
|
@-find $(BUILD_DIR)/root -name .svn | $(XARGS) rm -rf
|
|
|
|
@-find $(BUILD_DIR)/root -name '.#*' | $(XARGS) rm -f
|
2007-08-01 10:21:15 +02:00
|
|
|
|
|
|
|
$(curdir)/index: FORCE
|
2007-08-01 00:54:21 +02:00
|
|
|
@(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)
|
2006-07-30 19:09:22 +02:00
|
|
|
|
2007-07-30 23:14:08 +02:00
|
|
|
$(curdir)/flags-install:= -j1
|
|
|
|
|
2007-07-30 20:22:01 +02:00
|
|
|
$(eval $(call stampfile,$(curdir),package,prereq))
|
2007-08-01 00:54:21 +02:00
|
|
|
$(eval $(call stampfile,$(curdir),package,cleanup))
|
2007-07-30 23:14:08 +02:00
|
|
|
$(eval $(call stampfile,$(curdir),package,compile))
|
|
|
|
$(eval $(call stampfile,$(curdir),package,install))
|
2007-08-01 00:54:21 +02:00
|
|
|
$(eval $(call stampfile,$(curdir),package,rootfs-prepare))
|
2007-07-30 23:14:08 +02:00
|
|
|
|
2007-08-01 00:54:21 +02:00
|
|
|
$($(curdir)/stamp-cleanup): $(TMP_DIR)/.build
|
|
|
|
$($(curdir)/stamp-compile): $($(curdir)/stamp-cleanup) $(TMP_DIR)/.build
|
|
|
|
$($(curdir)/stamp-install): $($(curdir)/stamp-compile) $(TMP_DIR)/.build
|
|
|
|
$($(curdir)/stamp-rootfs-prepare): $($(curdir)/stamp-install) $(TMP_DIR)/.build
|
2007-07-30 23:14:08 +02:00
|
|
|
|
2007-07-30 20:22:01 +02:00
|
|
|
$(eval $(call subdir,$(curdir)))
|