aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2006-05-16 00:32:57 +0000
committerMike Baker <mbm@openwrt.org>2006-05-16 00:32:57 +0000
commitcd466375e1cff138808173308b7d3d9446fc7303 (patch)
tree88fda948e849796a6d442f04047e3e5de2d32c2d
parent398ca3a233d6fb0e9b5d30ebcd660007f61e4172 (diff)
downloadmaster-187ad058-cd466375e1cff138808173308b7d3d9446fc7303.tar.gz
master-187ad058-cd466375e1cff138808173308b7d3d9446fc7303.tar.bz2
master-187ad058-cd466375e1cff138808173308b7d3d9446fc7303.zip
finish up package makefile
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3786 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--Config.in7
-rw-r--r--package/Makefile19
-rw-r--r--package/ipsec-tools/Makefile6
-rwxr-xr-xscripts/gen_deps.pl17
4 files changed, 39 insertions, 10 deletions
diff --git a/Config.in b/Config.in
index 71db916c6e..ae959f683e 100644
--- a/Config.in
+++ b/Config.in
@@ -18,6 +18,10 @@ config ALL
bool "Select all packages by default"
default n
+config WGET
+ string
+ default "wget --passive-ftp -nd"
+
menuconfig BUILDOPTS
bool "Build Options" if DEVEL
@@ -37,3 +41,6 @@ source "toolchain/Config.in"
source "target/linux/Config.in"
source ".config.in"
+menu "busybox"
+source "package/busybox/config/Config.in"
+endmenu
diff --git a/package/Makefile b/package/Makefile
index e0bd23c7ec..af746715ba 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -1,13 +1,11 @@
# Main makefile for the packages
include $(TOPDIR)/rules.mk
+include $(TOPDIR)/.config
+include .pkgdeps
+
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
-all: compile
-clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
-compile: $(COMPILE_PACKAGES)
-install: base-files-install $(INSTALL_PACKAGES)
-
$(STAMP_DIR) $(TARGET_DIR):
mkdir -p $@
@@ -15,8 +13,19 @@ $(STAMP_DIR) $(TARGET_DIR):
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare
%-compile: $(STAMP_DIR) $(TARGET_DIR)
+ @echo "-> make $@"
$(MAKE) -C $(patsubst %-compile,%,$@) compile
%-clean: $(STAMP_DIR) $(TARGET_DIR)
$(MAKE) -C $(patsubst %-clean,%,$@) clean
+
+.pkgdeps: $(TOPDIR)/.pkginfo FORCE
+ @$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@
+
+all: compile
+clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
+compile: $(COMPILE_PACKAGES)
+install: base-files-install $(INSTALL_PACKAGES)
+
+
diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile
index 9e14b40075..e85f09d89c 100644
--- a/package/ipsec-tools/Makefile
+++ b/package/ipsec-tools/Makefile
@@ -12,6 +12,8 @@ PKG_SOURCE_URL:=@SF/ipsec-tools
PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21
PKG_CAT:=bzcat
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
include $(TOPDIR)/package/rules.mk
define Package/ipsec-tools
@@ -66,6 +68,10 @@ define Build/Configure
);
endef
+define Build/Compile
+ $(call Build/Compile/Default,install)
+endef
+
define Package/ipsec-tools/install
install -d -m0755 $(1)/etc
install -d -m0755 $(1)/usr/lib/
diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl
index a910a9937b..ef49fa3f41 100755
--- a/scripts/gen_deps.pl
+++ b/scripts/gen_deps.pl
@@ -24,16 +24,23 @@ while ($line = <>) {
};
}
+$line="";
+
foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
+ print "package-\$(CONFIG_PACKAGE_$name) += $pkg{$name}->{src}\n";
+
my $hasdeps = 0;
- $line = "$pkg{$name}->{src}-compile:";
+ my $depline = "";
foreach my $dep (@{$pkg{$name}->{depends}}) {
if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) {
- $hasdeps = 1;
- $line .= " $pkg{$dep}->{src}-compile";
+ $depline .= " $pkg{$dep}->{src}-compile";
}
}
- if ($hasdeps) {
- print "$line\n";
+ if ($depline ne "") {
+ $line .= "$pkg{$name}->{src}-compile: $depline\n";
}
}
+
+if ($line ne "") {
+ print "\n$line";
+}