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