mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-06 11:09:31 +00:00
finish up package makefile
SVN-Revision: 3786
This commit is contained in:
parent
4db216c4de
commit
b64d24928b
@ -18,6 +18,10 @@ config ALL
|
|||||||
bool "Select all packages by default"
|
bool "Select all packages by default"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config WGET
|
||||||
|
string
|
||||||
|
default "wget --passive-ftp -nd"
|
||||||
|
|
||||||
menuconfig BUILDOPTS
|
menuconfig BUILDOPTS
|
||||||
bool "Build Options" if DEVEL
|
bool "Build Options" if DEVEL
|
||||||
|
|
||||||
@ -37,3 +41,6 @@ source "toolchain/Config.in"
|
|||||||
source "target/linux/Config.in"
|
source "target/linux/Config.in"
|
||||||
source ".config.in"
|
source ".config.in"
|
||||||
|
|
||||||
|
menu "busybox"
|
||||||
|
source "package/busybox/config/Config.in"
|
||||||
|
endmenu
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
# Main makefile for the packages
|
# Main makefile for the packages
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
include $(TOPDIR)/.config
|
||||||
|
include .pkgdeps
|
||||||
|
|
||||||
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
|
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
|
||||||
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
|
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):
|
$(STAMP_DIR) $(TARGET_DIR):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
@ -15,8 +13,19 @@ $(STAMP_DIR) $(TARGET_DIR):
|
|||||||
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare
|
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare
|
||||||
|
|
||||||
%-compile: $(STAMP_DIR) $(TARGET_DIR)
|
%-compile: $(STAMP_DIR) $(TARGET_DIR)
|
||||||
|
@echo "-> make $@"
|
||||||
$(MAKE) -C $(patsubst %-compile,%,$@) compile
|
$(MAKE) -C $(patsubst %-compile,%,$@) compile
|
||||||
|
|
||||||
%-clean: $(STAMP_DIR) $(TARGET_DIR)
|
%-clean: $(STAMP_DIR) $(TARGET_DIR)
|
||||||
$(MAKE) -C $(patsubst %-clean,%,$@) clean
|
$(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)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@ PKG_SOURCE_URL:=@SF/ipsec-tools
|
|||||||
PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21
|
PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21
|
||||||
PKG_CAT:=bzcat
|
PKG_CAT:=bzcat
|
||||||
|
|
||||||
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
include $(TOPDIR)/package/rules.mk
|
include $(TOPDIR)/package/rules.mk
|
||||||
|
|
||||||
define Package/ipsec-tools
|
define Package/ipsec-tools
|
||||||
@ -66,6 +68,10 @@ define Build/Configure
|
|||||||
);
|
);
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(call Build/Compile/Default,install)
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/ipsec-tools/install
|
define Package/ipsec-tools/install
|
||||||
install -d -m0755 $(1)/etc
|
install -d -m0755 $(1)/etc
|
||||||
install -d -m0755 $(1)/usr/lib/
|
install -d -m0755 $(1)/usr/lib/
|
||||||
|
@ -24,16 +24,23 @@ while ($line = <>) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$line="";
|
||||||
|
|
||||||
foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
|
foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
|
||||||
|
print "package-\$(CONFIG_PACKAGE_$name) += $pkg{$name}->{src}\n";
|
||||||
|
|
||||||
my $hasdeps = 0;
|
my $hasdeps = 0;
|
||||||
$line = "$pkg{$name}->{src}-compile:";
|
my $depline = "";
|
||||||
foreach my $dep (@{$pkg{$name}->{depends}}) {
|
foreach my $dep (@{$pkg{$name}->{depends}}) {
|
||||||
if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) {
|
if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) {
|
||||||
$hasdeps = 1;
|
$depline .= " $pkg{$dep}->{src}-compile";
|
||||||
$line .= " $pkg{$dep}->{src}-compile";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($hasdeps) {
|
if ($depline ne "") {
|
||||||
print "$line\n";
|
$line .= "$pkg{$name}->{src}-compile: $depline\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($line ne "") {
|
||||||
|
print "\n$line";
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user