Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Makefile: generate a Makefile wrapper in $(O)
From: Peter Korsgaard @ 2010-09-26 21:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285491372-19364-1-git-send-email-yann.morin.1998@anciens.enib.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> If building out-of-tree, add a Makefile wrapper that calls-out to the real
 Yann> Makefile with proper args.

 Yann> Avoids having to pass -C and O= every time we call make.

 Yann> This is highly inspired from how the Linux kernel does it, and portions of
 Yann> it have been used. We can't use exactly the same implementation as the
 Yann> kernel does, because:

 Yann>  - the kernel always overwrites the wrapper at each call: doing so in
 Yann>    buildroot makes the kconfig stuff be rebuilt every time;

Huh? We do call mkmakefile every time, but you do the extra trick about
.Makefile (why?). I guess the reason why you have the kconfig stuff
rebuilding is that you added the phony outputmake dependency to the
kconfig binaries rather than the phony menuconfig/oldconfig/.. targets.

 Yann>  - the script writing the wrapper has been expunged of the few lines
 Yann>    that were too kernel-related: in buildroot we do not need the version
 Yann>    string in the wrapper, and we do not have a patchlevel version;

 Yann> +
 Yann> +ifeq ($(NEED_WRAPPER),y)
 Yann> +# outputmakefile generates a Makefile in the output directory, if using a
 Yann> +# separate output directory. This allows convenient use of make in the
 Yann> +# output directory.
 Yann> +outputmakefile:
 Yann> +	$(Q)$(SHELL) $(TOPDIR)/scripts/mkmakefile $(CURDIR) $(O)
 Yann> +else
 Yann> +outputmakefile:
 Yann> +	@true
 Yann> +endif

A makefile target without any rules is OK, so you could get rid of the
true. We use TOPDIR everywhere else instead of CURDIR, so I would prefer
to use it here. It also makes more sense to make mkmakefile executable
and get rid of the SHELL.

 Yann> +
 Yann> +if ! cmp $2/.Makefile $2/Makefile >/dev/null 2>&1; then
 Yann> +    echo "  GEN    Makefile"
 Yann> +    rm -f $2/Makefile
 Yann> +    mv $2/.Makefile $2/Makefile
 Yann> +else
 Yann> +    rm -f $2/.Makefile
 Yann> +fi

I would prefer to stick as close as possible to the version in the
kernel sources, so I'll remove this. What is the reason for it? You
already created the Makefile, so it cannot be because of performance.

I've committed a slightly tweaked version of it, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] Makefile: generate a Makefile wrapper in $(O)
From: Peter Korsgaard @ 2010-09-26 21:47 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=aefad5317f2fd1645ace5a62b6b9643143093173
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

If building out-of-tree, add a Makefile wrapper that calls-out to the real
Makefile with proper args.

Avoids having to pass -C and O= every time we call make.

This is highly inspired from how the Linux kernel does it, and portions of
it have been used. We can't use exactly the same implementation as the
kernel does, because:

 - the script writing the wrapper has been expunged of the few lines
   that were too kernel-related: in buildroot we do not need the version
   string in the wrapper, and we do not have a patchlevel version;

 - "in-tree build" does not have the same meaning for the kernel and for
   buildroot: for the kernel, $(O) point to the $(TOPDIR), while for
   buildroot $(O) points to $(TOPDIR)/output.

For more complete explanations, see:
  http://lists.busybox.net/pipermail/buildroot/2010-September/037815.html

[Peter: minor tweaks]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES            |    3 +++
 Makefile           |   45 ++++++++++++++++++++++++++++-----------------
 scripts/mkmakefile |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+), 17 deletions(-)
 create mode 100755 scripts/mkmakefile

diff --git a/CHANGES b/CHANGES
index b01da23..4fa011f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,9 @@
 	Download handling reworked and support for git/svn downloads
 	added.
 
+	A convenience Makefile wrapper is created when using
+	out-of-tree building, similar to how it is done for the kernel.
+
 	New packages: xz
 
 	Updated/fixed packages: alsa-lib, at, avahi, axel, berkeleydb,
diff --git a/Makefile b/Makefile
index faa802b..aab346e 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ space:=$(empty) $(empty)
 ifneq ("$(origin O)", "command line")
 O:=output
 CONFIG_DIR:=$(TOPDIR)
+NEED_WRAPPER=
 else
 # other packages might also support Linux-style out of tree builds
 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
@@ -60,6 +61,7 @@ override O:=$(O)
 CONFIG_DIR:=$(O)
 # we need to pass O= everywhere we call back into the toplevel makefile
 EXTRAMAKEARGS = O=$(O)
+NEED_WRAPPER=y
 endif
 
 # $(shell find . -name *_defconfig |sed 's/.*\///')
@@ -324,7 +326,7 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 world: prepare dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
 
 
-.PHONY: all world dirs clean distclean source \
+.PHONY: all world dirs clean distclean source outputmakefile \
 	$(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
 	$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
 	$(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
@@ -463,52 +465,52 @@ COMMON_CONFIG_ENV = \
 	KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
 	BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
 
-xconfig: $(BUILD_DIR)/buildroot-config/qconf
+xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
-gconfig: $(BUILD_DIR)/buildroot-config/gconf
+gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@if ! $(COMMON_CONFIG_ENV) srctree=$(TOPDIR) \
 		$< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
-menuconfig: $(BUILD_DIR)/buildroot-config/mconf
+menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
-nconfig: $(BUILD_DIR)/buildroot-config/nconf
+nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
-config: $(BUILD_DIR)/buildroot-config/conf
+config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
 
-oldconfig: $(BUILD_DIR)/buildroot-config/conf
+oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
 
-randconfig: $(BUILD_DIR)/buildroot-config/conf
+randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
 
-allyesconfig: $(BUILD_DIR)/buildroot-config/conf
+allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
 
-allnoconfig: $(BUILD_DIR)/buildroot-config/conf
+allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
 
-randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
+randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
 	@$(COMMON_CONFIG_ENV) \
@@ -516,7 +518,7 @@ randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
 		$< --randconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
-allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
+allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
 	@$(COMMON_CONFIG_ENV) \
@@ -524,7 +526,7 @@ allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
 		$< --allyesconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
-allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
+allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
 	@$(COMMON_CONFIG_ENV) \
@@ -532,19 +534,19 @@ allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
 		$< --allnoconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
-silentoldconfig: $(BUILD_DIR)/buildroot-config/conf
+silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	$(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
 
-defconfig: $(BUILD_DIR)/buildroot-config/conf
+defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
 
-%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
 
-savedefconfig: $(BUILD_DIR)/buildroot-config/conf
+savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --savedefconfig=$(TOPDIR)/defconfig $(CONFIG_CONFIG_IN)
 
@@ -559,6 +561,15 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 # Cleanup and misc junk
 #
 #############################################################
+
+# outputmakefile generates a Makefile in the output directory, if using a
+# separate output directory. This allows convenient use of make in the
+# output directory.
+outputmakefile:
+ifeq ($(NEED_WRAPPER),y)
+	$(Q)$(TOPDIR)/scripts/mkmakefile $(TOPDIR) $(O)
+endif
+
 clean:
 	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
 		$(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR)
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
new file mode 100755
index 0000000..38d8268
--- /dev/null
+++ b/scripts/mkmakefile
@@ -0,0 +1,47 @@
+#!/bin/sh
+# Generates a small Makefile used in the root of the output
+# directory, to allow make to be started from there.
+# The Makefile also allow for more convinient build of external modules
+
+# Usage
+# $1 - Kernel src directory
+# $2 - Output directory
+
+
+test ! -r $2/Makefile -o -O $2/Makefile || exit 0
+# Only overwrite automatically generated Makefiles
+# (so we do not overwrite buildroot Makefile)
+if test -e $2/Makefile && ! grep -q Automatically $2/Makefile
+then
+	exit 0
+fi
+if [ "${quiet}" != "silent_" ]; then
+	echo "  GEN     $2/Makefile"
+fi
+
+cat << EOF > $2/Makefile
+# Automatically generated by $0: don't edit
+
+lastword = \$(word \$(words \$(1)),\$(1))
+makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
+
+MAKEARGS := -C $1
+MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
+
+MAKEFLAGS += --no-print-directory
+
+.PHONY: all \$(MAKECMDGOALS)
+
+all	:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
+
+all:
+	\$(MAKE) \$(MAKEARGS) \$(all)
+
+Makefile:;
+
+\$(all): all
+	@:
+
+%/: all
+	@:
+EOF
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH 05/18] boa: convert to autotargets
From: Martin Banky @ 2010-09-26 21:22 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87sk0w46v4.fsf@macbook.be.48ers.dk>

Peter,
     Sorry, I missed that when I was putting the patch set together. I meant
to merge the two, when I was cherry picking them into a new branch. It was
the end of my night when I put this together. One question, does the
stripping happen automatically for gentargets? I was under the impression
that you had to specify it. I'm still trying to get a grasp on all the
different things that happen behind the scenes.

Martin

On Sun, Sep 26, 2010 at 12:55 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:

> >>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:
>
>  Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
>  Martin> ---
>  Martin>  package/boa/boa.mk |   38 +++-----------------------------------
>
> Ahh, missed this one - Would probably have made more sense if you had
> merged it with the gentargets one.
>
> --
> Bye, Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100926/f4af7583/attachment.html>

^ permalink raw reply

* [Buildroot] [PATCH 02/18] axel: convert to gentargets and bump to 2.4
From: Peter Korsgaard @ 2010-09-26 21:12 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-2-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Thanks, committed with small tweaks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] axel: convert to gentargets and bump to 2.4
From: Peter Korsgaard @ 2010-09-26 21:11 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=0f9da87c1d18598f308ed129d027f65cdffcde77
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: fix build with locale, pass LDFLAGS, simplify install]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                |    4 +-
 package/axel/Config.in |    2 +
 package/axel/axel.mk   |   78 +++++++++++++++++++++--------------------------
 3 files changed, 39 insertions(+), 45 deletions(-)

diff --git a/CHANGES b/CHANGES
index 33299a0..b01da23 100644
--- a/CHANGES
+++ b/CHANGES
@@ -17,8 +17,8 @@
 
 	New packages: xz
 
-	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
-	bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
+	Updated/fixed packages: alsa-lib, at, avahi, axel, berkeleydb,
+	bind, bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
 	docker, dosfstools, dropbear, e2fsprogs, expat, ezxml, fbset,
 	freetype, gawk, gvfs, haserl, hostapd, hwdata, ifplugd, iperf,
 	iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
diff --git a/package/axel/Config.in b/package/axel/Config.in
index c706d4c..cb9af32 100644
--- a/package/axel/Config.in
+++ b/package/axel/Config.in
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_AXEL
 	bool "axel"
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  HTTP/FTP download accelerator.
 
diff --git a/package/axel/axel.mk b/package/axel/axel.mk
index 8891795..1bf4d81 100644
--- a/package/axel/axel.mk
+++ b/package/axel/axel.mk
@@ -3,53 +3,45 @@
 # axel
 #
 #############################################################
-AXEL_VERSION:=1.1
-AXEL_SOURCE:=axel-$(AXEL_VERSION).tar.gz
-AXEL_SITE:=http://alioth.debian.org/frs/download.php/2287
-AXEL_CAT:=$(ZCAT)
-AXEL_DIR:=$(BUILD_DIR)/axel-$(AXEL_VERSION)
-AXEL_BINARY:=axel
-AXEL_TARGET_BINARY:=usr/bin/axel
-
-$(DL_DIR)/$(AXEL_SOURCE):
-	 $(call DOWNLOAD,$(AXEL_SITE),$(AXEL_SOURCE))
-
-axel-source: $(DL_DIR)/$(AXEL_SOURCE)
-
-$(AXEL_DIR)/.unpacked: $(DL_DIR)/$(AXEL_SOURCE)
-	$(AXEL_CAT) $(DL_DIR)/$(AXEL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	#toolchain/patch-kernel.sh $(AXEL_DIR) package/axel axel\*.patch
-	touch $@
-
-$(AXEL_DIR)/Makefile.settings: $(AXEL_DIR)/.unpacked
-	(cd $(AXEL_DIR); \
-		./configure --i18n=0 --prefix=/usr \
-	)
-	touch $@
+AXEL_VERSION = 2.4
+AXEL_SOURCE = axel-$(AXEL_VERSION).tar.gz
+AXEL_SITE = https://alioth.debian.org/frs/download.php/3015
 
-$(AXEL_DIR)/$(AXEL_BINARY): $(AXEL_DIR)/Makefile.settings
-	$(MAKE) CC="$(TARGET_CC)" STRIP="$(TARGET_STRIP)" -C $(AXEL_DIR)
+AXEL_LDFLAGS = -lpthread
 
-$(TARGET_DIR)/$(AXEL_TARGET_BINARY): $(AXEL_DIR)/$(AXEL_BINARY)
-	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(AXEL_DIR) install-bin
-ifeq ($(BR2_HAVE_DOCUMENTATION),y)
-	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(AXEL_DIR) install-man
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+AXEL_DEPENDENCIES += gettext libintl
+AXEL_LDFLAGS += -lintl
 endif
 
-axel: $(TARGET_DIR)/$(AXEL_TARGET_BINARY)
+ifneq ($(BR2_ENABLE_LOCALE),y)
+AXEL_DISABLE_I18N=--i18n=0
+endif
 
-axel-clean:
-	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(AXEL_DIR) uninstall
-	-$(MAKE) -C $(AXEL_DIR) clean
+define AXEL_CONFIGURE_CMDS
+	(cd $(@D); \
+		./configure \
+			--prefix=/usr \
+			--debug=1 \
+			$(AXEL_DISABLE_I18N) \
+	)
+endef
 
-axel-dirclean:
-	rm -rf $(AXEL_DIR)
+define AXEL_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+	LFLAGS="$(TARGET_LDFLAGS) $(AXEL_LDFLAGS)" -C $(@D)
+endef
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_AXEL),y)
-TARGETS+=axel
-endif
+define AXEL_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+define AXEL_UNINSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
+
+define AXEL_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,axel))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH 18/18] logrotate: convert to gentargets and bump to 3.7.9
From: Peter Korsgaard @ 2010-09-26 20:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-18-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Thanks, committed with small tweaks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] logrotate: convert to gentargets and bump to 3.7.9
From: Peter Korsgaard @ 2010-09-26 20:53 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=f09275968cac629ea964474b7184be2dad3f1a36
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: pass LDFLAGS, remove manpages, get rid _BINARY vars only used once]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                        |    8 ++--
 package/logrotate/logrotate.mk |   62 ++++++++++++++++++----------------------
 2 files changed, 32 insertions(+), 38 deletions(-)

diff --git a/CHANGES b/CHANGES
index 4f6ed1e..33299a0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -24,10 +24,10 @@
 	iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
 	libdnet, libevent, libglade, libgtk2, libiconv, libidn,
 	libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
-	libxslt, lighttpd, lite, m4, mdadm, metacity, mtd-utils,
-	mysql_client, nano, nbd, ncftp, neon, netperf, ntfsprogs, ntp,
-	openntpd, openssh, openvpn, oprofile, pango, pcre, php,
-	prboom, radvd, qt, samba, sdl_mixer, sdl_sound,
+	libxslt, lighttpd, lite, logrotate, m4, mdadm, metacity,
+	mtd-utils, mysql_client, nano, nbd, ncftp, neon, netperf,
+	ntfsprogs, ntp, openntpd, openssh, openvpn, oprofile, pango,
+	pcre, php, prboom, radvd, qt, samba, sdl_mixer, sdl_sound,
 	shared-mime-info, speex, sqlite, squashfs, strace, taglib,
 	tcpdump, tiff, tn5250, udev, udpcast, usbmount, usbutils,
 	which, xlib_libX11, zlib
diff --git a/package/logrotate/logrotate.mk b/package/logrotate/logrotate.mk
index 337fd8e..0e41d6a 100644
--- a/package/logrotate/logrotate.mk
+++ b/package/logrotate/logrotate.mk
@@ -1,42 +1,36 @@
-LOGROTATE_VERSION:=3.7.7
-LOGROTATE_SOURCE:=logrotate-$(LOGROTATE_VERSION).tar.gz
-LOGROTATE_SITE:=https://fedorahosted.org/releases/l/o/logrotate/
-LOGROTATE_DIR:=$(BUILD_DIR)/logrotate-$(LOGROTATE_VERSION)
-LOGROTATE_BINARY:=logrotate
-LOGROTATE_TARGET_BINARY:=usr/sbin/$(LOGROTATE_BINARY)
-
-$(DL_DIR)/$(LOGROTATE_SOURCE):
-	$(call DOWNLOAD,$(LOGROTATE_SITE),$(LOGROTATE_SOURCE))
-
-$(LOGROTATE_DIR)/.source: $(DL_DIR)/$(LOGROTATE_SOURCE)
-	$(ZCAT) $(DL_DIR)/$(LOGROTATE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(LOGROTATE_DIR) package/logrotate/ logrotate\*.patch
-	touch $@
-
-$(LOGROTATE_DIR)/$(LOGROTATE_BINARY): $(LOGROTATE_DIR)/.source
-	$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" -C $(LOGROTATE_DIR)
-
-$(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY): $(LOGROTATE_DIR)/$(LOGROTATE_BINARY)
-	$(MAKE) PREFIX=$(TARGET_DIR) -C $(LOGROTATE_DIR) install
+#############################################################
+#
+# logrotate
+#
+#############################################################
+LOGROTATE_VERSION = 3.7.9
+LOGROTATE_SOURCE = logrotate-$(LOGROTATE_VERSION).tar.gz
+LOGROTATE_SITE = https://fedorahosted.org/releases/l/o/logrotate/
+
+LOGROTATE_DEPENDENCIES = popt
+
+define LOGROTATE_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" LDFLAGS="$(LDFLAGS)" -C $(@D)
+endef
+
+define LOGROTATE_INSTALL_TARGET_CMDS
+	$(MAKE) PREFIX=$(TARGET_DIR) -C $(@D) install
 	if [ ! -f $(TARGET_DIR)/etc/logrotate.conf ]; then \
 		$(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf; \
 	fi
 	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
+endef
 
-logrotate: popt $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
-
-logrotate-source: $(DL_DIR)/$(LOGROTATE_SOURCE)
-
-logrotate-clean:
-	rm -f $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
+define LOGROTATE_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/logrotate
 	rm -f $(TARGET_DIR)/etc/logrotate.conf
-	-rmdir $(TARGET_DIR)/etc/logrotate.d
-	-$(MAKE) -C $(LOGROTATE_DIR) clean
-
-logrotate-dirclean:
-	rm -rf $(LOGROTATE_DIR)
+	rm -f $(TARGET_DIR)/usr/man/man5/logrotate.conf.5
+	rm -f $(TARGET_DIR)/usr/man/man8/logrotate.8
+	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/logrotate.d
+endef
 
-ifeq ($(BR2_PACKAGE_LOGROTATE),y)
-TARGETS+=logrotate
-endif
+define LOGROTATE_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
 
+$(eval $(call GENTARGETS,package,logrotate))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] hwdata: convert to gentargets and bump to 0.230
From: Peter Korsgaard @ 2010-09-26 20:53 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=231449e1d5615f7092b49fab65a88f898bc16de3
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: get rid of unused vars, use install -D]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                  |    2 +-
 package/hwdata/hwdata.mk |   51 ++++++++++------------------------------------
 2 files changed, 12 insertions(+), 41 deletions(-)

diff --git a/CHANGES b/CHANGES
index 26c17e7..4f6ed1e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -20,7 +20,7 @@
 	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
 	bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
 	docker, dosfstools, dropbear, e2fsprogs, expat, ezxml, fbset,
-	freetype, gawk, gvfs, haserl, hostapd, ifplugd, iperf,
+	freetype, gawk, gvfs, haserl, hostapd, hwdata, ifplugd, iperf,
 	iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
 	libdnet, libevent, libglade, libgtk2, libiconv, libidn,
 	libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
diff --git a/package/hwdata/hwdata.mk b/package/hwdata/hwdata.mk
index ed81cd7..7a0cef8 100644
--- a/package/hwdata/hwdata.mk
+++ b/package/hwdata/hwdata.mk
@@ -3,48 +3,19 @@
 # hwdata
 #
 #############################################################
-HWDATA_VERSION:=0.191
-HWDATA_SOURCE:=hwdata_$(HWDATA_VERSION).orig.tar.gz
-HWDATA_PATCH:=hwdata_$(HWDATA_VERSION)-1.diff.gz
-HWDATA_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/h/hwdata/
-HWDATA_CAT:=$(ZCAT)
-HWDATA_DIR:=$(BUILD_DIR)/hwdata-$(HWDATA_VERSION)
-HWDATA_BINARY:=pci.ids
-HWDATA_TARGET_BINARY:=usr/share/hwdata/pci.ids
+HWDATA_VERSION = 0.230
+HWDATA_SOURCE = hwdata_$(HWDATA_VERSION).orig.tar.gz
+HWDATA_PATCH = hwdata_$(HWDATA_VERSION)-1.diff.gz
+HWDATA_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/h/hwdata/
 
-$(DL_DIR)/$(HWDATA_SOURCE):
-	 $(call DOWNLOAD,$(HWDATA_SITE),$(HWDATA_SOURCE))
+define HWDATA_INSTALL_TARGET_CMDS
+	install -D -m 644 $(@D)/pci.ids $(TARGET_DIR)/usr/share/hwdata/pci.ids
+	install -D -m 644 $(@D)/usb.ids $(TARGET_DIR)/usr/share/hwdata/usb.ids
+endef
 
-$(DL_DIR)/$(HWDATA_PATCH):
-	 $(call DOWNLOAD,$(HWDATA_SITE),$(HWDATA_PATCH))
-
-hwdata-source: $(DL_DIR)/$(HWDATA_SOURCE) $(DL_DIR)/$(HWDATA_PATCH)
-
-$(HWDATA_DIR)/.unpacked: $(DL_DIR)/$(HWDATA_SOURCE) $(DL_DIR)/$(HWDATA_PATCH)
-	$(HWDATA_CAT) $(DL_DIR)/$(HWDATA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(HWDATA_DIR) $(DL_DIR) $(HWDATA_PATCH)
-	touch $(HWDATA_DIR)/.unpacked
-
-$(TARGET_DIR)/$(HWDATA_TARGET_BINARY): $(HWDATA_DIR)/.unpacked
-	mkdir -p -m 755 $(TARGET_DIR)/usr/share/hwdata
-	cp -a $(HWDATA_DIR)/pci.ids $(TARGET_DIR)/usr/share/hwdata
-	cp -a $(HWDATA_DIR)/usb.ids $(TARGET_DIR)/usr/share/hwdata
-	-touch -c $(TARGET_DIR)/usr/share/hwdata/*
-
-hwdata: $(TARGET_DIR)/$(HWDATA_TARGET_BINARY)
-
-hwdata-clean:
+define HWDATA_UNINSTALL_TARGET_CMDS
 	rm -rf $(TARGET_DIR)/usr/share/hwdata
 	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
+endef
 
-hwdata-dirclean:
-	rm -rf $(HWDATA_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_HWDATA),y)
-TARGETS+=hwdata
-endif
+$(eval $(call GENTARGETS,package,hwdata))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH 14/18] hwdata: convert to gentargets and bump to 0.230
From: Peter Korsgaard @ 2010-09-26 20:35 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-14-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Committed with small tweaks, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 07/18] dosfstools: convert to gentargets and bump to 3.0.10
From: Peter Korsgaard @ 2010-09-26 20:26 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-7-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Committed with minor tweaks, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] boa: convert to autotargets
From: Peter Korsgaard @ 2010-09-26 20:25 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=85fac9e0c8bfa2230ecfaa96b765adec62315ca0
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Based on Martin's patch to convert to gentargets.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                          |    2 +-
 package/boa/boa-config.site-i386 |    1 -
 package/boa/boa.mk               |   98 ++++++++------------------------------
 3 files changed, 21 insertions(+), 80 deletions(-)
 delete mode 100644 package/boa/boa-config.site-i386

diff --git a/CHANGES b/CHANGES
index 82e2bd1..4a0ed4f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -18,7 +18,7 @@
 	New packages: xz
 
 	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
-	bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
+	bmon, boa, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
 	e2fsprogs, expat, ezxml, fbset, freetype, gawk, gvfs, haserl,
 	hostapd, ifplugd, iperf, iproute2, iptables, jpeg, kexec,
 	kismet, less, libcurl, libdnet, libevent, libglade, libgtk2,
diff --git a/package/boa/boa-config.site-i386 b/package/boa/boa-config.site-i386
deleted file mode 100644
index 425d948..0000000
--- a/package/boa/boa-config.site-i386
+++ /dev/null
@@ -1 +0,0 @@
-ac_cv_func_setvbuf_reversed=no
diff --git a/package/boa/boa.mk b/package/boa/boa.mk
index a51de96..702193d 100644
--- a/package/boa/boa.mk
+++ b/package/boa/boa.mk
@@ -3,84 +3,26 @@
 # boa
 #
 #############################################################
-
-BOA_VERSION=0.94.14rc21
-
-# Don't alter below this line unless you (think) you know
-# what you are doing! Danger, Danger!
-
-BOA_SOURCE=boa-$(BOA_VERSION).tar.gz
-BOA_CAT:=$(ZCAT)
-BOA_SITE=http://www.boa.org/
-BOA_DIR=$(BUILD_DIR)/boa-$(BOA_VERSION)
-BOA_WORKDIR=$(BUILD_DIR)/boa_workdir
-
-$(DL_DIR)/$(BOA_SOURCE):
-	$(call DOWNLOAD,$(BOA_SITE),$(BOA_SOURCE))
-
-$(BOA_DIR)/.unpacked: $(DL_DIR)/$(BOA_SOURCE)
-	$(BOA_CAT) $(DL_DIR)/$(BOA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	touch $(BOA_DIR)/.unpacked
-
-$(BOA_WORKDIR)/Makefile: $(BOA_DIR)/.unpacked
-	rm -f $(BOA_WORKDIR)/Makefile
-	mkdir -p $(BOA_WORKDIR)
-	#CONFIG_SITE=package/boa/boa-config.site-$(ARCH)
-	(cd $(BOA_WORKDIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		$(BOA_DIR)/configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--exec-prefix=/usr \
-		--bindir=/usr/bin \
-		--sbindir=/usr/sbin \
-		--libdir=/lib \
-		--libexecdir=/usr/lib \
-		--sysconfdir=/etc \
-		--datadir=/usr/share \
-		--localstatedir=/var \
-		--mandir=/usr/man \
-		--infodir=/usr/info \
-		$(DISABLE_NLS) \
-	)
-	touch $(BOA_WORKDIR)/Makefile
-
-$(BOA_WORKDIR)/src/boa $(BOA_WORKDIR)/src/boa_indexer: $(BOA_WORKDIR)/Makefile
-	rm -f $@
-	$(MAKE) -C $(BOA_WORKDIR)
-
-$(BOA_WORKDIR)/.installed: $(BOA_WORKDIR)/src/boa $(BOA_WORKDIR)/src/boa_indexer
-	mkdir -p $(TARGET_DIR)/usr/sbin
-	cp -f $(BOA_WORKDIR)/src/boa $(TARGET_DIR)/usr/sbin/boa
-	mkdir -p $(TARGET_DIR)/usr/lib/boa
-	cp -f $(BOA_WORKDIR)/src/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer
-	mkdir -p $(TARGET_DIR)/etc/boa
-	cp -f package/boa/boa.conf $(TARGET_DIR)/etc/boa
-	cp -f package/boa/mime.types $(TARGET_DIR)/etc/mime.types
-	$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/boa $(TARGET_DIR)/usr/lib/boa/boa_indexer
-	touch $(BOA_WORKDIR)/.installed
-
-boa: $(BOA_WORKDIR)/.installed
-
-boa-source: $(DL_DIR)/$(BOA_SOURCE)
-
-boa-clean:
-	-$(MAKE) -C $(BOA_WORKDIR) clean
+BOA_VERSION = 0.94.14rc21
+BOA_SOURCE = boa-$(BOA_VERSION).tar.gz
+BOA_SITE = http://www.boa.org/
+
+define BOA_INSTALL_TARGET_CMDS
+	install -D -m 755 $(@D)/src/boa $(TARGET_DIR)/usr/sbin/boa
+	install -D -m 755 $(@D)/src/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer
+	install -D -m 644 package/boa/boa.conf $(TARGET_DIR)/etc/boa/boa.conf
+	install -D -m 644 package/boa/mime.types $(TARGET_DIR)/etc/mime.types
+endef
+
+define BOA_UNINSTALL_STAGING_CMDS
+	# autotools calls uninstall-staging even if staging install
+	# isn't enabled
+endef
+
+define BOA_UNINSTALL_TARGET_CMDS
 	rm -rf $(TARGET_DIR)/usr/sbin/boa \
-		$(TARGET_DIR)/usr/lib/boa/boa_indexer \
+		$(TARGET_DIR)/usr/lib/boa/ \
 		$(TARGET_DIR)/etc/mime.types $(TARGET_DIR)/etc/boa
+endef
 
-boa-dirclean:
-	rm -rf $(BOA_DIR) $(BOA_WORKDIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_BOA),y)
-TARGETS+=boa
-endif
+$(eval $(call AUTOTARGETS,package,boa))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] bsdiff: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 20:25 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=d4f1332110075f7c1eca5e333c906cb274f89407
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: cleanup build, install and uninstall targets]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                  |   24 +++++++-------
 package/bsdiff/bsdiff.mk |   75 ++++++++++++++++------------------------------
 2 files changed, 38 insertions(+), 61 deletions(-)

diff --git a/CHANGES b/CHANGES
index 4a0ed4f..3d9f738 100644
--- a/CHANGES
+++ b/CHANGES
@@ -18,18 +18,18 @@
 	New packages: xz
 
 	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
-	bmon, boa, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
-	e2fsprogs, expat, ezxml, fbset, freetype, gawk, gvfs, haserl,
-	hostapd, ifplugd, iperf, iproute2, iptables, jpeg, kexec,
-	kismet, less, libcurl, libdnet, libevent, libglade, libgtk2,
-	libiconv, libidn, libmms, libnl, liboil, libpcap, libpng,
-	libungif, libxml2, libxslt, lighttpd, lite, m4, mdadm,
-	metacity, mtd-utils, mysql_client, nano, nbd, ncftp, neon,
-	netperf, ntfsprogs, ntp, openntpd, openssh, openvpn, oprofile,
-	pango, pcre, php, prboom, radvd, qt, samba, sdl_mixer,
-	sdl_sound, shared-mime-info, speex, sqlite, squashfs, strace,
-	taglib, tcpdump, tiff, tn5250, udev, udpcast, usbmount,
-	usbutils, which, xlib_libX11, zlib
+	bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
+	docker, dropbear, e2fsprogs, expat, ezxml, fbset, freetype,
+	gawk, gvfs, haserl, hostapd, ifplugd, iperf, iproute2,
+	iptables, jpeg, kexec, kismet, less, libcurl, libdnet,
+	libevent, libglade, libgtk2, libiconv, libidn, libmms, libnl,
+	liboil, libpcap, libpng, libungif, libxml2, libxslt, lighttpd,
+	lite, m4, mdadm, metacity, mtd-utils, mysql_client, nano, nbd,
+	ncftp, neon, netperf, ntfsprogs, ntp, openntpd, openssh,
+	openvpn, oprofile, pango, pcre, php, prboom, radvd, qt, samba,
+	sdl_mixer, sdl_sound, shared-mime-info, speex, sqlite,
+	squashfs, strace, taglib, tcpdump, tiff, tn5250, udev,
+	udpcast, usbmount, usbutils, which, xlib_libX11, zlib
 
 	Deprecated packages: lzma
 
diff --git a/package/bsdiff/bsdiff.mk b/package/bsdiff/bsdiff.mk
index 62608e9..276c6be 100644
--- a/package/bsdiff/bsdiff.mk
+++ b/package/bsdiff/bsdiff.mk
@@ -3,52 +3,29 @@
 # bsdiff
 #
 #############################################################
-BSDIFF_VERSION:=4.3
-BSDIFF_SOURCE:=bsdiff-$(BSDIFF_VERSION).tar.gz
-BSDIFF_SITE:=http://www.daemonology.net/bsdiff
-BSDIFF_DIR:=$(BUILD_DIR)/bsdiff-$(BSDIFF_VERSION)
-BSDIFF_BINARY:=bsdiff
-BSDIFF_TARGET_BINARY:=usr/bin/bsdiff
-BSDIFF_ZCAT=$(ZCAT)
-
-$(DL_DIR)/$(BSDIFF_SOURCE):
-	$(call DOWNLOAD,$(BSDIFF_SITE),$(BSDIFF_SOURCE))
-
-$(BSDIFF_DIR)/.source: $(DL_DIR)/$(BSDIFF_SOURCE)
-	$(BSDIFF_ZCAT) $(DL_DIR)/$(BSDIFF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	touch $(BSDIFF_DIR)/.source
-
-$(BSDIFF_DIR)/$(BSDIFF_BINARY): $(BSDIFF_DIR)/.source
-	(cd $(BSDIFF_DIR); \
-		$(TARGET_CONFIGURE_ARGS) \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 \
-			$(TARGET_CFLAGS) bsdiff.c -o bsdiff; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 \
-			$(TARGET_CFLAGS) bspatch.c -o bspatch; \
-	)
-
-$(TARGET_DIR)/$(BSDIFF_TARGET_BINARY): $(BSDIFF_DIR)/$(BSDIFF_BINARY)
-	cp -dpf $(BSDIFF_DIR)/bsdiff $(TARGET_DIR)/usr/bin/.
-	cp -dpf $(BSDIFF_DIR)/bspatch $(TARGET_DIR)/usr/bin/.
-
-bsdiff: bzip2 $(TARGET_DIR)/$(BSDIFF_TARGET_BINARY)
-
-bsdiff-source: $(DL_DIR)/$(BSDIFF_SOURCE)
-
-bsdiff-clean:
-	-rm $(TARGET_DIR)/usr/bin/{bsdiff,bspatch}
-	-rm $(BSDIFF_DIR)/{bsdiff,bspatch}
-
-bsdiff-dirclean:
-	rm -rf $(BSDIFF_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_BSDIFF),y)
-TARGETS+=bsdiff
-endif
+BSDIFF_VERSION = 4.3
+BSDIFF_SOURCE = bsdiff-$(BSDIFF_VERSION).tar.gz
+BSDIFF_SITE = http://www.daemonology.net/bsdiff
+BSDIFF_DEPENDENCIES = bzip2
+
+define BSDIFF_BUILD_CMDS
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lbz2 \
+		$(@D)/bsdiff.c -o $(@D)/bsdiff
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lbz2 \
+		$(@D)/bspatch.c -o $(@D)/bspatch
+endef
+
+define BSDIFF_INSTALL_TARGET_CMDS
+	install -D -m 755 $(@D)/bsdiff $(TARGET_DIR)/usr/bin/bsdiff
+	install -D -m 755 $(@D)/bspatch $(TARGET_DIR)/usr/bin/bspatch
+endef
+
+define BSDIFF_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/bin/bsdiff $(TARGET_DIR)/usr/bin/bspatch
+endef
+
+define BSDIFF_CLEAN_CMDS
+	rm -f $(@D)/bsdiff $(@D)/bspatch
+endef
+
+$(eval $(call GENTARGETS,package,bsdiff))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] fbset: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 20:25 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=b850ce811fa6749cc14123fe72bb20a85e6f8bd5
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                |   22 +++++++++---------
 package/fbset/fbset.mk |   59 +++++++++++++----------------------------------
 2 files changed, 28 insertions(+), 53 deletions(-)

diff --git a/CHANGES b/CHANGES
index fc5dad8..82e2bd1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,17 +19,17 @@
 
 	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
 	bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
-	e2fsprogs, expat, ezxml, freetype, gawk, gvfs, haserl, hostapd,
-	ifplugd, iperf, iproute2, iptables, jpeg, kexec, kismet, less,
-	libcurl, libdnet, libevent, libglade, libgtk2, libiconv, libidn,
-	libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
-	libxslt, lighttpd, lite, m4, mdadm, metacity, mtd-utils,
-	mysql_client, nano, nbd, ncftp, neon, netperf, ntfsprogs, ntp,
-	openntpd, openssh, openvpn, oprofile, pango, pcre, php,
-	prboom, radvd, qt, samba, sdl_mixer, sdl_sound,
-	shared-mime-info, speex, sqlite, squashfs, strace, taglib,
-	tcpdump, tiff, tn5250, udev, udpcast, usbmount, usbutils,
-	which, xlib_libX11, zlib
+	e2fsprogs, expat, ezxml, fbset, freetype, gawk, gvfs, haserl,
+	hostapd, ifplugd, iperf, iproute2, iptables, jpeg, kexec,
+	kismet, less, libcurl, libdnet, libevent, libglade, libgtk2,
+	libiconv, libidn, libmms, libnl, liboil, libpcap, libpng,
+	libungif, libxml2, libxslt, lighttpd, lite, m4, mdadm,
+	metacity, mtd-utils, mysql_client, nano, nbd, ncftp, neon,
+	netperf, ntfsprogs, ntp, openntpd, openssh, openvpn, oprofile,
+	pango, pcre, php, prboom, radvd, qt, samba, sdl_mixer,
+	sdl_sound, shared-mime-info, speex, sqlite, squashfs, strace,
+	taglib, tcpdump, tiff, tn5250, udev, udpcast, usbmount,
+	usbutils, which, xlib_libX11, zlib
 
 	Deprecated packages: lzma
 
diff --git a/package/fbset/fbset.mk b/package/fbset/fbset.mk
index 32ab4b8..748920d 100644
--- a/package/fbset/fbset.mk
+++ b/package/fbset/fbset.mk
@@ -3,49 +3,24 @@
 # fbset
 #
 #############################################################
-FBSET_VERSION:=2.1
-FBSET_SOURCE:=fbset-$(FBSET_VERSION).tar.gz
-FBSET_SITE:=http://users.telenet.be/geertu/Linux/fbdev
-FBSET_DIR:=$(BUILD_DIR)/fbset-$(FBSET_VERSION)
-FBSET_CAT:=$(ZCAT)
-FBSET_BINARY:=fbset
-FBSET_TARGET_BINARY:=usr/sbin/$(FBSET_BINARY)
-
-$(DL_DIR)/$(FBSET_SOURCE):
-	$(call DOWNLOAD,$(FBSET_SITE),$(FBSET_SOURCE))
-
-$(FBSET_DIR)/.unpacked: $(DL_DIR)/$(FBSET_SOURCE)
-	$(FBSET_CAT) $(DL_DIR)/$(FBSET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(FBSET_DIR) package/fbset/ \
-		fbset-$(FBSET_VERSION)\*.patch \
-		fbset-$(FBSET_VERSION)\*.patch.$(ARCH)
-	touch $@
-
-$(FBSET_DIR)/$(FBSET_BINARY): $(FBSET_DIR)/.unpacked
-	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(FBSET_DIR)
-	touch -c $@
-
-$(TARGET_DIR)/$(FBSET_TARGET_BINARY): $(FBSET_DIR)/$(FBSET_BINARY)
-	$(INSTALL) -m 755 $(FBSET_DIR)/$(FBSET_BINARY) $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
+FBSET_VERSION = 2.1
+FBSET_SOURCE = fbset-$(FBSET_VERSION).tar.gz
+FBSET_SITE = http://users.telenet.be/geertu/Linux/fbdev
+FBSET_BINARY = fbset
+FBSET_TARGET_BINARY = usr/sbin/$(FBSET_BINARY)
+
+define FBSET_BUILD_CMDS
+	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define FBSET_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 755 $(@D)/$(FBSET_BINARY) $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
-	touch -c $@
-
-fbset: $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
-
-fbset-source: $(DL_DIR)/$(FBSET_SOURCE)
+endef
 
-fbset-clean:
+define FBSET_CLEAN_CMDS
 	rm -f $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
-	-$(MAKE) -C $(FBSET_DIR) clean
+	-$(MAKE) -C $(@D) clean
+endef
 
-fbset-dirclean:
-	rm -rf $(FBSET_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_FBSET),y)
-TARGETS+=fbset
-endif
+$(eval $(call GENTARGETS,package,fbset))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] dosfstools: convert to gentargets and bump to 3.0.10
From: Peter Korsgaard @ 2010-09-26 20:25 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=3d840536ccbb99a134a762fc489897a91822c9e2
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: pass LDFLAGS, remove stripping]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                          |   23 ++++----
 package/dosfstools/dosfstools.mk |  105 ++++++++++++--------------------------
 2 files changed, 44 insertions(+), 84 deletions(-)

diff --git a/CHANGES b/CHANGES
index 64f4b05..26c17e7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,17 +19,18 @@
 
 	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
 	bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
-	docker, dropbear, e2fsprogs, expat, ezxml, fbset, freetype,
-	gawk, gvfs, haserl, hostapd, ifplugd, iperf, iproute2,
-	iptables, jpeg, kexec, kismet, less, libcurl, libdnet,
-	libevent, libglade, libgtk2, libiconv, libidn, libmms, libnl,
-	liboil, libpcap, libpng, libungif, libxml2, libxslt, lighttpd,
-	lite, m4, mdadm, metacity, mtd-utils, mysql_client, nano, nbd,
-	ncftp, neon, netperf, ntfsprogs, ntp, openntpd, openssh,
-	openvpn, oprofile, pango, pcre, php, prboom, radvd, qt, samba,
-	sdl_mixer, sdl_sound, shared-mime-info, speex, sqlite,
-	squashfs, strace, taglib, tcpdump, tiff, tn5250, udev,
-	udpcast, usbmount, usbutils, which, xlib_libX11, zlib
+	docker, dosfstools, dropbear, e2fsprogs, expat, ezxml, fbset,
+	freetype, gawk, gvfs, haserl, hostapd, ifplugd, iperf,
+	iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
+	libdnet, libevent, libglade, libgtk2, libiconv, libidn,
+	libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
+	libxslt, lighttpd, lite, m4, mdadm, metacity, mtd-utils,
+	mysql_client, nano, nbd, ncftp, neon, netperf, ntfsprogs, ntp,
+	openntpd, openssh, openvpn, oprofile, pango, pcre, php,
+	prboom, radvd, qt, samba, sdl_mixer, sdl_sound,
+	shared-mime-info, speex, sqlite, squashfs, strace, taglib,
+	tcpdump, tiff, tn5250, udev, udpcast, usbmount, usbutils,
+	which, xlib_libX11, zlib
 
 	Deprecated packages: hotplug, lzma
 
diff --git a/package/dosfstools/dosfstools.mk b/package/dosfstools/dosfstools.mk
index a7f59f0..8e6cfc9 100644
--- a/package/dosfstools/dosfstools.mk
+++ b/package/dosfstools/dosfstools.mk
@@ -3,76 +3,35 @@
 # dosfstools
 #
 #############################################################
-DOSFSTOOLS_VERSION:=3.0.3
-DOSFSTOOLS_SOURCE:=dosfstools-$(DOSFSTOOLS_VERSION).tar.gz
-DOSFSTOOLS_SITE:=http://www.daniel-baumann.ch/software/dosfstools
-DOSFSTOOLS_DIR:=$(BUILD_DIR)/dosfstools-$(DOSFSTOOLS_VERSION)
-DOSFSTOOLS_CAT:=$(ZCAT)
-MKDOSFS_BINARY:=mkdosfs
-MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
-DOSFSCK_BINARY:=dosfsck
-DOSFSCK_TARGET_BINARY:=sbin/dosfsck
-DOSFSLABEL_BINARY:=dosfslabel
-DOSFSLABEL_TARGET_BINARY:=sbin/dosfslabel
-
-$(DL_DIR)/$(DOSFSTOOLS_SOURCE):
-	 $(call DOWNLOAD,$(DOSFSTOOLS_SITE),$(DOSFSTOOLS_SOURCE))
-
-dosfstools-source: $(DL_DIR)/$(DOSFSTOOLS_SOURCE)
-
-$(DOSFSTOOLS_DIR)/.unpacked: $(DL_DIR)/$(DOSFSTOOLS_SOURCE) $(wildcard local/dosfstools/dosfstools*.patch)
-	$(DOSFSTOOLS_CAT) $(DL_DIR)/$(DOSFSTOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(DOSFSTOOLS_DIR) package/dosfstools/ dosfstools\*.patch
-	touch $(DOSFSTOOLS_DIR)/.unpacked
-
-$(DOSFSTOOLS_DIR)/.built : $(DOSFSTOOLS_DIR)/.unpacked
-	$(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" -C $(DOSFSTOOLS_DIR)
-	$(STRIPCMD) $(DOSFSTOOLS_DIR)/$(MKDOSFS_BINARY)
-	$(STRIPCMD) $(DOSFSTOOLS_DIR)/$(DOSFSCK_BINARY)
-	$(STRIPCMD) $(DOSFSTOOLS_DIR)/$(DOSFSLABEL_BINARY)
-	touch $@
-
-$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
-	cp -a $(DOSFSTOOLS_DIR)/$(MKDOSFS_BINARY) $@
-	touch -c $@
-
-$(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
-	cp -a $(DOSFSTOOLS_DIR)/$(DOSFSCK_BINARY) $@
-	touch -c $@
-
-$(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
-	cp -a $(DOSFSTOOLS_DIR)/$(DOSFSLABEL_BINARY) $@
-	touch -c $@
-
-DOSFSTOOLS=
-ifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKDOSFS),y)
-DOSFSTOOLS+=$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
-endif
-
-ifeq ($(BR2_PACKAGE_DOSFSTOOLS_DOSFSCK),y)
-DOSFSTOOLS+=$(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
-endif
-
-ifeq ($(BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL),y)
-DOSFSTOOLS+=$(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY)
-endif
-
-dosfstools: $(DOSFSTOOLS)
-
-dosfstools-clean:
-	rm -f $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
-	rm -f $(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
-	rm -f $(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY)
-	-$(MAKE) -C $(DOSFSTOOLS_DIR) clean
-
-dosfstools-dirclean:
-	rm -rf $(DOSFSTOOLS_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_DOSFSTOOLS),y)
-TARGETS+=dosfstools
-endif
\ No newline at end of file
+DOSFSTOOLS_VERSION = 3.0.10
+DOSFSTOOLS_SOURCE = dosfstools-$(DOSFSTOOLS_VERSION).tar.gz
+DOSFSTOOLS_SITE = http://www.daniel-baumann.ch/software/dosfstools
+MKDOSFS_BINARY = mkdosfs
+DOSFSCK_BINARY = dosfsck
+DOSFSLABEL_BINARY = dosfslabel
+
+define DOSFSTOOLS_BUILD_CMDS
+	$(MAKE) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \
+		CC="$(TARGET_CC)" -C $(@D)
+endef
+
+DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_MKDOSFS)+=$(MKDOSFS_BINARY)
+DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_DOSFSCK)+=$(DOSFSCK_BINARY)
+DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL)+=$(DOSFSLABEL_BINARY)
+
+define DOSFSTOOLS_INSTALL_TARGET_CMDS
+	test -z "$(DOSFSTOOLS_INSTALL_BIN_FILES_y)" || \
+	install -m 755 $(addprefix $(@D)/,$(DOSFSTOOLS_INSTALL_BIN_FILES_y)) $(TARGET_DIR)/sbin/
+endef
+
+define DOSFSTOOLS_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/sbin/$(MKDOSFS_BINARY)
+	rm -f $(TARGET_DIR)/sbin/$(DOSFSCK_BINARY)
+	rm -f $(TARGET_DIR)/sbin/$(DOSFSLABEL_BINARY)
+endef
+
+define DOSFSTOOLS_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,dosfstools))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] fbset: misc cleanup
From: Peter Korsgaard @ 2010-09-26 20:25 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=789f61379afa8d065edeb6f876e9d0025c4f4fe5
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Use install -D so it doesn't fail if usr/sbin doesn't exist, remove
unneeded stripping and move target cleanup to _UNINSTALL_TARGET_CMDS.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/fbset/fbset.mk |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/fbset/fbset.mk b/package/fbset/fbset.mk
index 748920d..8926f4c 100644
--- a/package/fbset/fbset.mk
+++ b/package/fbset/fbset.mk
@@ -6,20 +6,20 @@
 FBSET_VERSION = 2.1
 FBSET_SOURCE = fbset-$(FBSET_VERSION).tar.gz
 FBSET_SITE = http://users.telenet.be/geertu/Linux/fbdev
-FBSET_BINARY = fbset
-FBSET_TARGET_BINARY = usr/sbin/$(FBSET_BINARY)
 
 define FBSET_BUILD_CMDS
 	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D)
 endef
 
 define FBSET_INSTALL_TARGET_CMDS
-	$(INSTALL) -m 755 $(@D)/$(FBSET_BINARY) $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
+	$(INSTALL) -D -m 755 $(@D)/fbset $(TARGET_DIR)/usr/sbin/fbset
+endef
+
+define FBSET_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/fbset
 endef
 
 define FBSET_CLEAN_CMDS
-	rm -f $(TARGET_DIR)/$(FBSET_TARGET_BINARY)
 	-$(MAKE) -C $(@D) clean
 endef
 
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] hotplug: mark as deprecated
From: Peter Korsgaard @ 2010-09-26 20:25 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=91e32e23f01b2f47e5a8479996ff00c4c6f278a6
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

It's ancient (+5yrs), no upstream and stuff like this is better handled
through mdev/udev nowadays.

It will be removed after 2010.11 unless someone complains.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                   |    2 +-
 package/hotplug/Config.in |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/CHANGES b/CHANGES
index 3d9f738..64f4b05 100644
--- a/CHANGES
+++ b/CHANGES
@@ -31,7 +31,7 @@
 	squashfs, strace, taglib, tcpdump, tiff, tn5250, udev,
 	udpcast, usbmount, usbutils, which, xlib_libX11, zlib
 
-	Deprecated packages: lzma
+	Deprecated packages: hotplug, lzma
 
 	Removed packages: dillo, libglib12, libgtk12, microwin,
 	pcmcia
diff --git a/package/hotplug/Config.in b/package/hotplug/Config.in
index 3c740a9..48f1d71 100644
--- a/package/hotplug/Config.in
+++ b/package/hotplug/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_HOTPLUG
 	bool "hotplug"
+	depends on BR2_DEPRECATED
 	help
 	  Plug in new devices and use them immediately.
 
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH 12/18] hotplug: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 20:14 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-12-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> There is one caveat with this, diethotplug-0.5.tar needs to be hosted some
 Martin> place. It's not available anywhere that I can find. It's a custome version
 Martin> written for buildroot.

I think we should just deprecate the package and remove it after
2010.11 instead.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 05/18] boa: convert to autotargets
From: Peter Korsgaard @ 2010-09-26 19:55 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-5-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
 Martin> ---
 Martin>  package/boa/boa.mk |   38 +++-----------------------------------

Ahh, missed this one - Would probably have made more sense if you had
merged it with the gentargets one.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 04/18] bsdiff: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 19:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-4-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Thanks, committed with minor tweaks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 03/18] boa: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 19:21 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-3-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Thanks, but I think it makes more sense to convert to autotargets, so I
did that instead.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 09/18] fbset: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 18:55 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-9-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 08/18] ezxml: convert to gentargets
From: Peter Korsgaard @ 2010-09-26 12:35 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485249-29212-8-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] ezxml: misc fixes
From: Peter Korsgaard @ 2010-09-26 12:34 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=1114b4777495fdc2cd7dbe9397a4b8c07b399d41
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Install into target as well, and use install -D instead of cp, to handle
missing usr/include / usr/lib.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/ezxml/ezxml.mk |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/package/ezxml/ezxml.mk b/package/ezxml/ezxml.mk
index e29a7b5..58d2624 100644
--- a/package/ezxml/ezxml.mk
+++ b/package/ezxml/ezxml.mk
@@ -14,8 +14,23 @@ define EZXML_BUILD_CMDS
 endef
 
 define EZXML_INSTALL_STAGING_CMDS
-	cp $(@D)/ezxml.h $(STAGING_DIR)/usr/include
-	cp $(@D)/libezxml.a $(STAGING_DIR)/usr/lib
+	install -D -m 0644 $(@D)/ezxml.h $(STAGING_DIR)/usr/include/ezxml.h
+	install -D -m 0644 $(@D)/libezxml.a $(STAGING_DIR)/usr/lib/libezxml.a
+endef
+
+define EZXML_INSTALL_TARGET_CMDS
+	install -D -m 0644 $(@D)/ezxml.h $(TARGET_DIR)/usr/include/ezxml.h
+	install -D -m 0644 $(@D)/libezxml.a $(TARGET_DIR)/usr/lib/libezxml.a
+endef
+
+define EZXML_UNINSTALL_STAGING_CMDS
+	rm -f $(STAGING_DIR)/usr/include/ezxml.h
+	rm -f $(STAGING_DIR)/usr/lib/libezxml.a
+endef
+
+define EZXML_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/include/ezxml.h
+	rm -f $(TARGET_DIR)/usr/lib/libezxml.a
 endef
 
 define EZXML_CLEAN_CMDS
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] ezxml: convert to gentargets
From: Martin Banky @ 2010-09-26 12:34 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=5d132c1a81598f580d27d6e37571b9263698900d
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                |    2 +-
 package/ezxml/ezxml.mk |   52 +++++++++++++----------------------------------
 2 files changed, 16 insertions(+), 38 deletions(-)

diff --git a/CHANGES b/CHANGES
index 73b9762..fc5dad8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,7 +19,7 @@
 
 	Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
 	bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
-	e2fsprogs, expat, freetype, gawk, gvfs, haserl, hostapd,
+	e2fsprogs, expat, ezxml, freetype, gawk, gvfs, haserl, hostapd,
 	ifplugd, iperf, iproute2, iptables, jpeg, kexec, kismet, less,
 	libcurl, libdnet, libevent, libglade, libgtk2, libiconv, libidn,
 	libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
diff --git a/package/ezxml/ezxml.mk b/package/ezxml/ezxml.mk
index 3746b51..e29a7b5 100644
--- a/package/ezxml/ezxml.mk
+++ b/package/ezxml/ezxml.mk
@@ -3,45 +3,23 @@
 # ezxml
 #
 #############################################################
+EZXML_VERSION = 0.8.6
+EZXML_SOURCE = ezxml-$(EZXML_VERSION).tar.gz
+EZXML_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ezxml/
+EZXML_INSTALL_STAGING=YES
 
-EZXML_VERSION:=0.8.6
-EZXML_SOURCE:=ezxml-$(EZXML_VERSION).tar.gz
-EZXML_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ezxml/
-EZXML_DIR:=$(BUILD_DIR)/ezxml
-
-$(DL_DIR)/$(EZXML_SOURCE):
-	$(call DOWNLOAD,$(EZXML_SITE),$(EZXML_SOURCE))
-
-$(EZXML_DIR)/.unpacked: $(DL_DIR)/$(EZXML_SOURCE)
-	$(ZCAT) $(DL_DIR)/$(EZXML_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(EZXML_DIR) package/ezxml/ ezxml-$(EZXML_VERSION)\*.patch
-	touch $@
-
-$(EZXML_DIR)/.configured: $(EZXML_DIR)/.unpacked
-	touch $@
-
-$(EZXML_DIR)/libezxml.a: $(EZXML_DIR)/.configured
+define EZXML_BUILD_CMDS
 	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" AR=$(TARGET_AR) \
-	-f GNUmakefile -C $(EZXML_DIR)
-
-$(STAGING_DIR)/usr/lib/libezxml.a: $(EZXML_DIR)/libezxml.a
-	cp $(EZXML_DIR)/ezxml.h $(STAGING_DIR)/usr/include
-	cp $(EZXML_DIR)/libezxml.a $(STAGING_DIR)/usr/lib
+	-f GNUmakefile -C $(@D)
+endef
 
-ezxml: $(STAGING_DIR)/usr/lib/libezxml.a
+define EZXML_INSTALL_STAGING_CMDS
+	cp $(@D)/ezxml.h $(STAGING_DIR)/usr/include
+	cp $(@D)/libezxml.a $(STAGING_DIR)/usr/lib
+endef
 
-ezxml-source: $(DL_DIR)/$(EZXML_SOURCE)
+define EZXML_CLEAN_CMDS
+	-$(MAKE) -C $(@D) -f GNUmakefile clean
+endef
 
-ezxml-clean:
-	-$(MAKE) -C $(EZXML_DIR) -f GNUmakefile clean
-
-ezxml-dirclean:
-	rm -rf $(EZXML_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_EZXML),y)
-TARGETS+=ezxml
-endif
+$(eval $(call GENTARGETS,package,ezxml))
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH] Makefile: generate a Makefile wrapper in $(O)
From: Yann E. MORIN @ 2010-09-26  8:56 UTC (permalink / raw)
  To: buildroot

If building out-of-tree, add a Makefile wrapper that calls-out to the real
Makefile with proper args.

Avoids having to pass -C and O= every time we call make.

This is highly inspired from how the Linux kernel does it, and portions of
it have been used. We can't use exactly the same implementation as the
kernel does, because:

 - the kernel always overwrites the wrapper at each call: doing so in
   buildroot makes the kconfig stuff be rebuilt every time;

 - the script writing the wrapper has been expunged of the few lines
   that were too kernel-related: in buildroot we do not need the version
   string in the wrapper, and we do not have a patchlevel version;

 - "in-tree build" does not have the same meaning for the kernel and for
   buildroot: for the kernel, $(O) point to the $(TOPDIR), while for
   buildroot $(O) points to $(TOPDIR)/output.

For more complete explnanations, see:
  http://lists.busybox.net/pipermail/buildroot/2010-September/037815.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
---
 Makefile           |   18 ++++++++++++++-
 scripts/mkmakefile |   53 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index faa802b..ec425c6 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ space:=$(empty) $(empty)
 ifneq ("$(origin O)", "command line")
 O:=output
 CONFIG_DIR:=$(TOPDIR)
+NEED_WRAPPER=
 else
 # other packages might also support Linux-style out of tree builds
 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
@@ -60,6 +61,7 @@ override O:=$(O)
 CONFIG_DIR:=$(O)
 # we need to pass O= everywhere we call back into the toplevel makefile
 EXTRAMAKEARGS = O=$(O)
+NEED_WRAPPER=y
 endif
 
 # $(shell find . -name *_defconfig |sed 's/.*\///')
@@ -324,7 +326,7 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 world: prepare dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
 
 
-.PHONY: all world dirs clean distclean source \
+.PHONY: all world dirs clean distclean source outputmakefile \
 	$(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
 	$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
 	$(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
@@ -453,7 +455,7 @@ all: menuconfig
 HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
 export HOSTCFLAGS
 
-$(BUILD_DIR)/buildroot-config/%onf:
+$(BUILD_DIR)/buildroot-config/%onf: |outputmakefile
 	mkdir -p $(@D)/lxdialog
 	$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
 
@@ -559,6 +561,18 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 # Cleanup and misc junk
 #
 #############################################################
+
+ifeq ($(NEED_WRAPPER),y)
+# outputmakefile generates a Makefile in the output directory, if using a
+# separate output directory. This allows convenient use of make in the
+# output directory.
+outputmakefile:
+	$(Q)$(SHELL) $(TOPDIR)/scripts/mkmakefile $(CURDIR) $(O)
+else
+outputmakefile:
+	@true
+endif
+
 clean:
 	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
 		$(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR)
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
new file mode 100644
index 0000000..39dd292
--- /dev/null
+++ b/scripts/mkmakefile
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Generates a small Makefile used in the root of the output
+# directory, to allow make to be started from there.
+# The Makefile also allow for more convinient build of external modules
+
+# Usage
+# $1 - Kernel src directory
+# $2 - Output directory
+
+
+test ! -r $2/Makefile -o -O $2/Makefile || exit 0
+# Only overwrite automatically generated Makefiles
+# (so we do not overwrite buildroot Makefile)
+if test -e $2/Makefile && ! grep -E "^# Buildroot Makefile wrapper$" $2/Makefile >/dev/null 2>&1
+then
+        exit 0
+fi
+
+cat << EOF > $2/.Makefile
+# Buildroot Makefile wrapper
+# Automatically generated by $0: don't edit
+
+lastword = \$(word \$(words \$(1)),\$(1))
+makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
+
+MAKEARGS := -C $1
+MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
+
+MAKEFLAGS += --no-print-directory
+
+.PHONY: all \$(MAKECMDGOALS)
+
+all     := \$(filter-out all Makefile,\$(MAKECMDGOALS))
+
+all:
+	\$(MAKE) \$(MAKEARGS) \$(all)
+
+Makefile:;
+
+\$(all): all
+	@:
+
+%/: all
+	@:
+EOF
+
+if ! cmp $2/.Makefile $2/Makefile >/dev/null 2>&1; then
+    echo "  GEN    Makefile"
+    rm -f $2/Makefile
+    mv $2/.Makefile $2/Makefile
+else
+    rm -f $2/.Makefile
+fi
-- 
1.7.1

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox