2006-07-21 09:15:06 +00:00
|
|
|
#
|
2007-07-30 21:14:08 +00:00
|
|
|
# Copyright (C) 2006-2007 OpenWrt.org
|
2006-07-21 09:15:06 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
2007-07-30 18:22:01 +00:00
|
|
|
curdir:=package
|
|
|
|
|
|
|
|
-include $(TMP_DIR)/.packagedeps
|
|
|
|
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
|
2007-07-30 18:39:20 +00:00
|
|
|
$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
|
2007-07-30 18:22:01 +00:00
|
|
|
$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
|
2007-07-30 18:39:20 +00:00
|
|
|
$(curdir)/builddirs-install:=. $(sort $(package-y))
|
2007-07-30 18:22:01 +00:00
|
|
|
|
|
|
|
$(curdir)/install:=$(curdir)/install-cleanup
|
|
|
|
$(curdir)/install-cleanup:
|
2006-05-31 20:58:13 +00:00
|
|
|
rm -rf $(BUILD_DIR)/root
|
|
|
|
$(MAKE) install-targets
|
2007-03-16 03:02:31 +00:00
|
|
|
$(MAKE) preconfig
|
2006-12-01 14:01:31 +00:00
|
|
|
@if [ -d $(TOPDIR)/files ]; then \
|
|
|
|
$(CP) $(TOPDIR)/files/. $(BUILD_DIR)/root; \
|
|
|
|
fi
|
2007-05-31 12:05:37 +00:00
|
|
|
@mkdir -p $(BUILD_DIR)/root/etc/rc.d
|
2006-10-15 21:03:30 +00: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 03:02:31 +00:00
|
|
|
done || true \
|
2006-10-15 21:03:30 +00:00
|
|
|
)
|
2007-04-29 01:30:48 +00: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
|
2006-05-16 00:32:57 +00:00
|
|
|
|
2007-07-30 18:22:01 +00:00
|
|
|
$(curdir)/index: FORCE
|
2006-10-10 23:04:00 +00:00
|
|
|
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)
|
2006-07-30 17:09:22 +00:00
|
|
|
|
2007-07-30 21:14:08 +00:00
|
|
|
$(curdir)/flags-install:= -j1
|
|
|
|
|
2007-07-30 18:22:01 +00:00
|
|
|
$(eval $(call stampfile,$(curdir),package,prereq))
|
2007-07-30 21:14:08 +00:00
|
|
|
$(eval $(call stampfile,$(curdir),package,compile))
|
|
|
|
$(eval $(call stampfile,$(curdir),package,install))
|
|
|
|
|
|
|
|
$($(curdir)/stamp-install): $($(curdir)/stamp-compile)
|
|
|
|
|
2007-07-30 18:22:01 +00:00
|
|
|
$(eval $(call subdir,$(curdir)))
|