source: trunk/package/Makefile @ 8238

Last change on this file since 8238 was 8238, checked in by nbd, 9 years ago

more cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id$
8
9curdir:=package
10
11include .config
12-include $(TMP_DIR)/.packagedeps
13$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
14$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
15$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
16$(curdir)/builddirs-install:=. $(sort $(package-y))
17
18$(curdir)//compile:=.config prereq
19$(curdir)/install:=$(curdir)/install-cleanup
20$(curdir)/install-cleanup:
21        rm -rf $(BUILD_DIR)/root
22        $(MAKE) install-targets
23        $(MAKE) preconfig
24        @if [ -d $(TOPDIR)/files ]; then \
25                $(CP) $(TOPDIR)/files/. $(BUILD_DIR)/root; \
26        fi
27        @mkdir -p $(BUILD_DIR)/root/etc/rc.d
28        @( \
29                cd $(BUILD_DIR)/root; \
30                for script in ./etc/init.d/*; do \
31                        grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \
32                        IPKG_INSTROOT=$(BUILD_DIR)/root $(which bash) ./etc/rc.common $$script enable; \
33                done || true \
34        )
35        @-find $(BUILD_DIR)/root -name CVS   | $(XARGS) rm -rf
36        @-find $(BUILD_DIR)/root -name .svn  | $(XARGS) rm -rf
37        @-find $(BUILD_DIR)/root -name '.#*' | $(XARGS) rm -f
38
39$(curdir)/index: FORCE
40        (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)
41
42$(eval $(call stampfile,$(curdir),package,prereq))
43$(eval $(call subdir,$(curdir)))
Note: See TracBrowser for help on using the repository browser.