* [Buildroot] [PATCH 01/39] Add generic package infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 02/39] Define TARGET_MAKE_ENV similarly to HOST_MAKE_ENV Thomas Petazzoni
` (39 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
This new infrastructure allows to write simpler .mk files for packages
not using the autotools as their build system, by factorizing many
common steps (download, extract, patching), and will more easily allow
Buildroot-wide changes in how the packages are handled.
The main macro is called GENTARGETS and works similarly to the
AUTOTARGETS macro that already exists for autotools-based
packages. However, the set of variables to be defined before calling
the macro is different. Refer to the documentation for details.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.in | 1 +
package/Makefile.package.in | 397 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 398 insertions(+), 0 deletions(-)
create mode 100644 package/Makefile.package.in
diff --git a/package/Makefile.in b/package/Makefile.in
index 25dd6da..8edd193 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -349,3 +349,4 @@ endif
X11_PREFIX:=$(call qstrip,$(BR2_X11_PREFIX))
include package/Makefile.autotools.in
+include package/Makefile.package.in
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
new file mode 100644
index 0000000..fbd7f69
--- /dev/null
+++ b/package/Makefile.package.in
@@ -0,0 +1,397 @@
+################################################################################
+# Generic package infrastructure
+#
+# This file implements an infrastructure that eases development of
+# package .mk files. It should be used for all non-autotools based
+# packages. Autotools-based packages should use the specialized
+# autotools infrastructure in package/Makefile.autotools.in.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this generic infrastructure requires the
+# .mk file to specify:
+#
+# 1. Metadata informations about the package: name, version,
+# download URL, etc.
+#
+# 2. Description of the commands to be executed to configure, build
+# and install the package
+#
+# The autotools infrastructure specializes this generic infrastructure
+# by already implementing the configure, build and install steps.
+################################################################################
+
+# UPPERCASE Macro -- transform its argument to uppercase and replace dots and
+# hyphens to underscores
+UPPERCASE = $(shell echo $(1) | tr "a-z.-" "A-Z__")
+
+# Define extrators for different archive suffixes
+INFLATE.bz2 = $(BZCAT)
+INFLATE.gz = $(ZCAT)
+INFLATE.tbz = $(BZCAT)
+INFLATE.tgz = $(ZCAT)
+INFLATE.tar = cat
+
+# MESSAGE Macro -- display a message in bold type
+MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+TERM_BOLD := $(shell tput smso)
+TERM_RESET := $(shell tput rmso)
+
+################################################################################
+# DOWNLOAD -- Download helper. Will try to download source from:
+# 1) BR2_PRIMARY_SITE if enabled
+# 2) Download site
+# 3) BR2_BACKUP_SITE if enabled
+#
+# Argument 1 is the source location
+# Argument 2 is the source filename
+#
+# E.G. use like this:
+# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE))
+################################################################################
+
+# support make source-check/external-deps
+ifneq ($(SPIDER),)
+DOWNLOAD=$(WGET) -P $(DL_DIR) $(1)/$(2)
+else
+define DOWNLOAD
+ $(Q)test -e $(DL_DIR)/$(2) || \
+ for site in $(call qstrip,$(BR2_PRIMARY_SITE)) $(1) $(call qstrip,$(BR2_BACKUP_SITE)); \
+ do $(WGET) -P $(DL_DIR) $$site/$(2) && exit; done
+endef
+endif
+
+# Utility programs used to build packages
+TAR ?= tar
+
+# Automatically detect tar --strip-path/components option
+TAR_STRIP_COMPONENTS := \
+ $(shell $(TAR) --help | grep strip-path > /dev/null ; \
+ if test $$? = 0 ; then \
+ echo '--strip-path' ; \
+ else \
+ echo '--strip-components' ; \
+ fi)
+
+# Needed for the foreach loops to loop over the list of hooks, so that
+# each hook call is properly separated by a newline.
+define sep
+
+
+endef
+
+################################################################################
+# Implicit targets -- produce a stamp file for each step of a package build
+################################################################################
+
+# Retrieve the archive
+$(BUILD_DIR)/%/.stamp_downloaded:
+# support make source-check/external-deps
+ifeq ($(SPIDER),)
+# Only show the download message if it isn't already downloaded
+ $(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \
+ (test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \
+ $(call MESSAGE,"Downloading")
+endif
+ $(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE))
+ $(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH)))
+ifeq ($(SPIDER),)
+ $(Q)mkdir -p $(@D)
+ $(Q)touch $@
+endif
+
+# Unpack the archive
+$(BUILD_DIR)/%/.stamp_extracted:
+ @$(call MESSAGE,"Extracting")
+ $(Q)mkdir -p $(@D)
+ $(Q)$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+# some packages have messed up permissions inside
+ $(Q)chmod -R ug+rw $(@D)
+ $(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
+ $(Q)touch $@
+
+# Patch
+#
+# The NOHOSTPKG variable is the uppercased package name, without the
+# HOST_ prefix, even for host packages. This allows to find the
+# patches in the package directory, because $($(NOHOSTPKG)_NAME)
+# expands to the package directory name.
+#
+$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION)
+$(BUILD_DIR)/%/.stamp_patched:
+ @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)")
+ $(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
+ $(Q)( \
+ if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \
+ if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \
+ toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
+ else \
+ toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $($(NOHOSTPKG)_NAME)\*.patch $($(NOHOSTPKG)_NAME)\*.patch.$(ARCH) || exit 1; \
+ if test -d $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)/$(NAMEVER); then \
+ toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
+ fi; \
+ fi; \
+ fi; \
+ )
+ $(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep))
+ $(Q)touch $@
+
+# Configure
+$(BUILD_DIR)/%/.stamp_configured:
+ @$(call MESSAGE,"Configuring")
+ $($(PKG)_CONFIGURE_CMDS)
+ $(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep))
+ $(Q)touch $@
+
+# Build
+$(BUILD_DIR)/%/.stamp_built::
+ @$(call MESSAGE,"Building")
+ $($(PKG)_BUILD_CMDS)
+ $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
+ $(Q)touch $@
+
+# Install to host dir
+$(BUILD_DIR)/%/.stamp_host_installed:
+ @$(call MESSAGE,'Installing to host directory')
+ $($(PKG)_INSTALL_CMDS)
+ $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
+ $(Q)touch $@
+
+# Install to staging dir
+$(BUILD_DIR)/%/.stamp_staging_installed:
+ @$(call MESSAGE,'Installing to staging directory')
+ $($(PKG)_INSTALL_STAGING_CMDS)
+ $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
+ $(Q)touch $@
+
+# Install to target dir
+$(BUILD_DIR)/%/.stamp_target_installed:
+ @$(call MESSAGE,"Installing to target")
+ $($(PKG)_INSTALL_TARGET_CMDS)
+ $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
+ $(if $(BR2_HAVE_MANPAGES),,for d in man share/man; do \
+ rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
+ done)
+ $(if $(BR2_HAVE_INFOPAGES),,for d in info share/info; do \
+ rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
+ done)
+ $(if $(BR2_HAVE_DOCUMENTATION),,for d in doc share/doc; do \
+ rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
+ done)
+ $(Q)touch $@
+
+# Clean package
+$(BUILD_DIR)/%/.stamp_cleaned:
+ @$(call MESSAGE,"Cleaning up")
+ $($(PKG)_CLEAN_CMDS)
+ rm -f $(@D)/.stamp_built
+
+# Uninstall package from target and staging
+$(BUILD_DIR)/%/.stamp_uninstalled:
+ @$(call MESSAGE,"Uninstalling")
+ $($(PKG)_UNINSTALL_STAGING_CMDS)
+ rm -f $($(PKG)_TARGET_INSTALL_STAGING)
+ $($(PKG)_UNINSTALL_TARGET_CMDS)
+ rm -f $($(PKG)_TARGET_INSTALL_TARGET) $($(PKG)_HOOK_POST_INSTALL)
+
+# Remove package sources
+$(BUILD_DIR)/%/.stamp_dircleaned:
+ rm -Rf $(@D)
+
+################################################################################
+# GENTARGETS_INNER -- generates the make targets needed to build a
+# generic package
+#
+# argument 1 is the lowercase package name
+# argument 2 is the uppercase package name, including an HOST_ prefix
+# for host packages
+# argument 3 is the uppercase package name, without the HOST_ prefix
+# for host packages
+# argument 4 is the package directory prefix
+# argument 5 is the type (target or host)
+################################################################################
+
+define GENTARGETS_INNER
+
+# Define default values for various package-related variables, if not
+# already defined. For some variables (version, source, site and
+# subdir), if they are undefined, we try to see if a variable without
+# the HOST_ prefix is defined. If so, we use such a variable, so that
+# these informations have only to be specified once, for both the
+# target and host packages of a given .mk file.
+
+$(2)_TYPE = $(5)
+$(2)_NAME = $(1)
+
+ifndef $(2)_VERSION
+ ifdef $(3)_VERSION
+ $(2)_VERSION = $($(3)_VERSION)
+ else
+ $(2)_VERSION = undefined
+ endif
+endif
+
+$(2)_DIR = $$(BUILD_DIR)/$(1)-$$($(2)_VERSION)
+
+ifndef $(2)_SOURCE
+ ifdef $(3)_SOURCE
+ $(2)_SOURCE = $($(3)_SOURCE)
+ else
+ $(2)_SOURCE ?= $(1)-$$($(2)_VERSION).tar.gz
+ endif
+endif
+
+ifndef $(2)_PATCH
+ ifdef $(3)_PATCH
+ $(2)_PATCH = $($(3)_PATCH)
+ endif
+endif
+
+ifndef $(2)_SITE
+ ifdef $(3)_SITE
+ $(2)_SITE = $($(3)_SITE)
+ else
+ $(2)_SITE ?= \
+ http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/$(1)
+ endif
+endif
+
+$(2)_DEPENDENCIES ?=
+$(2)_INSTALL_STAGING ?= NO
+$(2)_INSTALL_TARGET ?= YES
+$(2)_DIR_PREFIX = $(if $(4),$(4),$(TOP_SRCDIR)/package)
+
+# define sub-target stamps
+$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed
+$(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed
+$(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed
+$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built
+$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured
+$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched
+$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted
+$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded
+$(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled
+$(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned
+$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned
+
+# new-style hooks
+$(2)_POST_EXTRACT_HOOKS ?=
+$(2)_POST_PATCH_HOOKS ?=
+$(2)_POST_CONFIGURE_HOOKS ?=
+$(2)_POST_BUILD_HOOKS ?=
+$(2)_POST_INSTALL_HOOKS ?=
+$(2)_POST_INSTALL_STAGING_HOOKS ?=
+$(2)_POST_INSTALL_TARGET_HOOKS ?=
+
+# old-style hooks
+$(2)_HOOK_POST_EXTRACT = $$($(2)_DIR)/.stamp_hook_post_extract
+$(2)_HOOK_POST_CONFIGURE = $$($(2)_DIR)/.stamp_hook_post_configure
+$(2)_HOOK_POST_BUILD = $$($(2)_DIR)/.stamp_hook_post_build
+$(2)_HOOK_POST_INSTALL = $$($(2)_DIR)/.stamp_hook_post_install
+
+# human-friendly targets and target sequencing
+$(1): $(1)-install
+
+ifeq ($$($(2)_TYPE),host)
+$(1)-install: $(1)-install-host $$($(2)_HOOK_POST_INSTALL)
+else
+$(1)-install: $(1)-install-staging $(1)-install-target \
+ $$($(2)_HOOK_POST_INSTALL)
+endif
+
+ifeq ($$($(2)_INSTALL_TARGET),YES)
+$(1)-install-target: $(1)-build \
+ $$($(2)_TARGET_INSTALL_TARGET)
+else
+$(1)-install-target:
+endif
+
+ifeq ($$($(2)_INSTALL_STAGING),YES)
+$(1)-install-staging: $(1)-build \
+ $$($(2)_TARGET_INSTALL_STAGING)
+else
+$(1)-install-staging:
+endif
+
+$(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST)
+
+$(1)-build: $(1)-configure \
+ $$($(2)_TARGET_BUILD) \
+ $$($(2)_HOOK_POST_BUILD)
+
+$(1)-configure: $(1)-patch \
+ $$($(2)_TARGET_CONFIGURE) \
+ $$($(2)_HOOK_POST_CONFIGURE)
+
+$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH)
+
+$(1)-extract: $(1)-depends \
+ $$($(2)_TARGET_EXTRACT) \
+ $$($(2)_HOOK_POST_EXTRACT)
+
+$(1)-depends: $(1)-source $$($(2)_DEPENDENCIES)
+
+$(1)-source: $$($(2)_TARGET_SOURCE)
+
+$(1)-uninstall: $(1)-configure $$($(2)_TARGET_UNINSTALL)
+
+$(1)-clean: $(1)-uninstall \
+ $$($(2)_TARGET_CLEAN)
+
+$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN)
+
+# define the PKG variable for all targets, containing the
+# uppercase package variable prefix
+$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2)
+$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2)
+$$($(2)_TARGET_INSTALL_HOST): PKG=$(2)
+$$($(2)_TARGET_BUILD): PKG=$(2)
+$$($(2)_TARGET_CONFIGURE): PKG=$(2)
+$$($(2)_TARGET_PATCH): PKG=$(2)
+$$($(2)_TARGET_PATCH): NOHOSTPKG=$(3)
+$$($(2)_TARGET_EXTRACT): PKG=$(2)
+$$($(2)_TARGET_SOURCE): PKG=$(2)
+$$($(2)_TARGET_UNINSTALL): PKG=$(2)
+$$($(2)_TARGET_CLEAN): PKG=$(2)
+$$($(2)_TARGET_DIRCLEAN): PKG=$(2)
+$$($(2)_HOOK_POST_EXTRACT): PKG=$(2)
+$$($(2)_HOOK_POST_CONFIGURE): PKG=$(2)
+$$($(2)_HOOK_POST_BUILD): PKG=$(2)
+$$($(2)_HOOK_POST_INSTALL): PKG=$(2)
+
+# define hook targets
+# default hook behaviour: do nothing
+$$($(2)_HOOK_POST_EXTRACT):
+$$($(2)_HOOK_POST_CONFIGURE):
+$$($(2)_HOOK_POST_BUILD):
+$$($(2)_HOOK_POST_INSTALL):
+
+# add package to the general list of targets if requested by the buildroot
+# configuration
+
+ifeq ($$(BR2_PACKAGE_$(2)),y)
+TARGETS += $(1)
+endif
+endef
+
+################################################################################
+# GENTARGETS -- the target generator macro for generic packages
+#
+# Argument 1 is the package directory prefix [mandatory]
+# Argument 2 is the lowercase package name [mandatory]
+# Argument 3 is "target" or "host" [optional, default: "target"]
+################################################################################
+
+define GENTARGETS
+ifeq ($(3),host)
+# In the case of host packages, turn the package name "pkg" into "host-pkg"
+$(call GENTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
+else
+# In the case of target packages, keep the package name "pkg"
+$(call GENTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
+endif
+endef
+
+# :mode=makefile:
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 02/39] Define TARGET_MAKE_ENV similarly to HOST_MAKE_ENV
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 01/39] Add generic package infrastructure Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 03/39] Rework autotools infrastructure on top of the generic infrastructure Thomas Petazzoni
` (38 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.in | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index 8edd193..5b6161b 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -236,6 +236,8 @@ TARGET_CONFIGURE_ENV=\
LDFLAGS="$(TARGET_LDFLAGS)" \
FCFLAGS="$(TARGET_FCFLAGS)" \
+TARGET_MAKE_ENV=PATH=$(TARGET_PATH)
+
HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
AR="$(HOSTAR)" \
AS="$(HOSTAS)" \
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 03/39] Rework autotools infrastructure on top of the generic infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 01/39] Add generic package infrastructure Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 02/39] Define TARGET_MAKE_ENV similarly to HOST_MAKE_ENV Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 04/39] olsr: rework " Thomas Petazzoni
` (37 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Now that the previous commit implemented a generic package
infrastructure, we make the autotools infrastructure inherit from the
generic one so that the code is not duplicated.
The new AUTOTARGETS macro works by defining what should be done at the
configure, build and install steps of a package and then calls the
GENTARGETS macro of the generic package infrastructure.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.autotools.in | 624 ++++++++++++++---------------------------
1 files changed, 216 insertions(+), 408 deletions(-)
diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in
index c3257cf..09f44b4 100644
--- a/package/Makefile.autotools.in
+++ b/package/Makefile.autotools.in
@@ -1,348 +1,63 @@
################################################################################
+# Autotools package infrastructure
#
-# Makefile.autotools.in --
+# This file implements an infrastructure that eases development of
+# package .mk files for autotools packages. It should be used for all
+# packages that use the autotools as their build system. Non-autotools
+# packages should use the generic infrastructure in
+# package/Makefile.package.in.
#
-# Implicit and Generated Rules for easily creating autotools-compatible
-# buildroot packages
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
#
-## Example minimal makefile for a package named 'foo'
+# In terms of implementation, this autotools infrastructure requires
+# the .mk file to only specify metadata informations about the
+# package: name, version, download URL, etc.
#
-# | FOO_VERSION = 1.0
-# | FOO_SOURCE = foo-$(FOO_VERSION).tar.gz
-# | FOO_SITE = http://www.libfoo.org/dist
-# | $(eval $(call AUTOTARGETS,package,foo))
+# We still allow the package .mk file to override what the different
+# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is
+# already defined, it is used as the list of commands to perform to
+# build the package, instead of the default autotools behaviour. The
+# package can also define some post operation hooks.
#
-## The following targets can be called from the shell:
-#
-# foo, foo-source, foo-patch, foo-configure, foo-build, foo-install,
-# foo-install-target, foo-install-staging, foo-uninstall, foo-clean,
-# foo-dirclean
-#
-## The following variables which can be (re)defined in the package makefile:
-#
-# FOO_VERSION [mandatory]
-# version string of the package
-# FOO_SOURCE [default foo-$(FOO_VERSION).tar.gz]
-# file name of the package source
-# FOO_SITE [default sourceforge project "foo"]
-# URL under wich $(FOO_SOURCE) can be found
-# FOO_DEPENDENCIES [default empty]
-# list of (package) targets that must be built before foo
-# FOO_AUTORECONF [YES/NO, default NO]
-# run <autoreconf> before <configure>
-# FOO_AUTORECONF_OPT [default empty]
-# arguments passed to the <autoreconf> script
-# FOO_LIBTOOL_PATCH [YES/NO, default YES]
-# Do you want the standard buildroot patch applied to ltmain.sh? (libtool)
-# FOO_USE_CONFIG_CACHE [YES/NO default $(BR2_CONFIG_CACHE)]
-# Do you wany to use the central configure cache file? See BR2_CONFIG_CACHE.
-# FOO_CONF_ENV [default empty]
-# environment passed to the <configure> script
-# FOO_CONF_OPT [default empty]
-# arguments passed to the <configure> script
-# FOO_MAKE [default $(MAKE)]
-# command to use to execute <make>
-# FOO_MAKE_ENV [default empty]
-# environment passed to all calls to <make> in the package source
-# directory
-# FOO_MAKE_OPT [default empty]
-# arguments passed to <make> while building
-# FOO_INSTALL_STAGING [YES/NO, default NO]
-# install the package to the staging directory
-# FOO_INSTALL_TARGET [YES/NO, default YES]
-# install the package to the target directory
-# FOO_INSTALL_STAGING_OPT [default DESTDIR=$(STAGING_DIR) install]
-# arguments passed to <make> while installing to the staging directory
-# FOO_INSTALL_TARGET_OPT [default DESTDIR=$(TARGET_DIR) install-exec/install-strip]
-# arguments passed to <make> while installing to the target directory
-# FOO_CLEAN_OPT [default clean]
-# arguments passed to <make> while installing to the staging directory
-# FOO_UNINSTALL_STAGING_OPT [default DESTDIR=$(STAGING_DIR) uninstall]
-# arguments passed to <make> while uninstalling from the staging
-# directory
-# FOO_UNINSTALL_TARGET_OPT [default DESTDIR=$(TARGET_DIR) uninstall]
-# arguments passed to <make> while uninstalling from the target
-# directory
-# FOO_SUBDIR [default empty]
-# relative path in the package source from which to run configure and
-# make
-# FOO_DIR_PREFIX [default empty]
-# toplevel relative path to package *.mk file and corresponding patches
-#
-## The following variables contain hook target names
-## by default they do nothing, they can be overriden in package makefiles
-#
-# FOO_HOOK_POST_EXTRACT, FOO_HOOK_POST_CONFIGURE,
-# FOO_HOOK_POST_BUILD, FOO_HOOK_POST_INSTALL
-#
-## The following variables contain targets that can be overriden
-#
-# FOO_TARGET_INSTALL_TARGET FOO_TARGET_INSTALL_STAGING FOO_TARGET_BUILD
-# FOO_TARGET_CONFIGURE FOO_TARGET_PATCH FOO_TARGET_EXTRACT FOO_TARGET_SOURCE
-# FOO_TARGET_UNINSTALL FOO_TARGET_CLEAN FOO_TARGET_DIRCLEAN
-#
-# E.g. if your package has a no <configure> script you can place the following
-# in your package makefile:
-#
-# | $(FOO_TARGET_INSTALL):
-# | touch $@
-#
-## The following variables are defined automatically and can be used in
-## overriden targets:
-#
-# PKG
-# is always the current package name ("foo" in the example)
-# FOO_DIR
-# the directory in which the package source is extracted.
-# the base name will always be foo-$(FOO_VERSION), no matter what the
-# archive name or the directory-in-archive name are.
-# MESSAGE
-# macro that outputs a pretty message to stdout, e.g. use
-# $(call MESSAGE,"Hello World")
-# in a target.
-#
-# Caveats:
-# - the 'eval' line (final line in the example) must be placed
-# after all variable settings, but before all target re-definition
-# (including hooks)
################################################################################
-# UPPERCASE Macro -- transform its argument to uppercase and replace dots and
-# hyphens to underscores
-UPPERCASE = $(shell echo $(1) | tr "a-z.-" "A-Z__")
-
-# Define extrators for different archive suffixes
-INFLATE.bz2 = $(BZCAT)
-INFLATE.gz = $(ZCAT)
-INFLATE.tbz = $(BZCAT)
-INFLATE.tgz = $(ZCAT)
-INFLATE.tar = cat
-
-# MESSAGE Macro -- display a message in bold type
-MESSAGE = @echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
-TERM_BOLD := $(shell tput smso)
-TERM_RESET := $(shell tput rmso)
-
################################################################################
-# DOWNLOAD -- Download helper. Will try to download source from:
-# 1) BR2_PRIMARY_SITE if enabled
-# 2) Download site
-# 3) BR2_BACKUP_SITE if enabled
-#
-# Argument 1 is the source location
-# Argument 2 is the source filename
+# AUTOTARGETS_INNER -- defines how the configuration, compilation and
+# installation of an autotools package should be done, implements a
+# few hooks to tune the build process for autotools specifities and
+# calls the generic package infrastructure to generate the necessary
+# make targets
#
-# E.G. use like this:
-# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE))
-################################################################################
-
-# support make source-check/external-deps
-ifneq ($(SPIDER),)
-DOWNLOAD=$(WGET) -P $(DL_DIR) $(1)/$(2)
-else
-define DOWNLOAD
- $(Q)test -e $(DL_DIR)/$(2) || \
- for site in $(call qstrip,$(BR2_PRIMARY_SITE)) $(1) $(call qstrip,$(BR2_BACKUP_SITE)); \
- do $(WGET) -P $(DL_DIR) $$site/$(2) && exit; done
-endef
-endif
-
-# Utility programs used to build packages
-TAR ?= tar
-#ACLOCAL_STAGING_DIR ?= $(STAGING_DIR)/usr/share/aclocal
-#ACLOCAL ?= aclocal -I $(ACLOCAL_STAGING_DIR)
-#AUTORECONF ?= autoreconf -v -i -f -I $(ACLOCAL_STAGING_DIR)
-# ACLOCAL="$(ACLOCAL)"
-
-# Automatically detect tar --strip-path/components option
-TAR_STRIP_COMPONENTS := $(shell $(TAR) --help | grep strip-path > /dev/null ; if test $$? = 0 ; then echo '--strip-path' ; else echo '--strip-components' ; fi)
-
-################################################################################
-# Implicit targets -- produce a stamp file for each step of a package build
+# argument 1 is the lowercase package name
+# argument 2 is the uppercase package name, including an HOST_ prefix
+# for host packages
+# argument 3 is the uppercase package name, without the HOST_ prefix
+# for host packages
+# argument 4 is the package directory prefix
+# argument 5 is the type (target or host)
################################################################################
-# Retrieve and unpack the archive
-$(BUILD_DIR)/%/.stamp_downloaded:
-# support make source-check/external-deps
-ifeq ($(SPIDER),)
- $(call MESSAGE,"Downloading")
-endif
- $(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE))
- $(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH)))
-ifeq ($(SPIDER),)
- $(Q)mkdir -p $(@D)
- $(Q)touch $@
-endif
-
-# Retrieve and unpack the archive
-$(BUILD_DIR)/%/.stamp_extracted:
- $(call MESSAGE,"Extracting")
- $(Q)mkdir -p $(@D)
- $(Q)$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
-# some packages have messed up permissions inside
- $(Q)chmod -R ug+rw $(@D)
- $(Q)touch $@
-
-# Fix libtool support if required by the package
-$(BUILD_DIR)/%/.stamp_libtool_patch:
- $(call MESSAGE,"Patching libtool")
-# if the package uses libtool, patch it for cross-compiling in buildroot
- $(Q)if test "$($(PKG)_LIBTOOL_PATCH)" = "YES" -a \
- "$($(PKG)_AUTORECONF)" != "YES"; then \
- for i in `find $(@D) -name ltmain.sh`; do \
- toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
- done \
- fi
- $(Q)touch $@
-
-# Patch
-# XXX: FIXME: This has to be done differently and path-independent, i.e. use
-# XXX: FIXME: the dir-part of the stem as base-dir (instead of hardcoding
-# XXX: FIXME: "package/".
-$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(PKG)_NAME)-$($(PKG)_VERSION)
-$(BUILD_DIR)/%/.stamp_patched:
- $(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)")
- $(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
- $(Q)( \
- if test -d $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME); then \
- if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)/$(NAMEVER)*.patch*)"; then \
- toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
- else \
- toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME) $($(PKG)_NAME)\*.patch $($(PKG)_NAME)\*.patch.$(ARCH) || exit 1; \
- if test -d $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)/$(NAMEVER); then \
- toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
- fi; \
- fi; \
- fi; \
- )
-ifeq ($(BR2_UPDATE_CONFIG),y)
- $(Q)(for file in config.guess config.sub; do \
- for i in $$(find $(@D) -name $$file); do \
- cp package/gnuconfig/$$file $$i; \
- done; \
- done)
-endif
- $(Q)touch $@
-
-# Running autoreconf
-$(BUILD_DIR)/%/.stamp_autoconfigured:
- $(call MESSAGE,"Running autoreconf")
- $(Q)cd $(@D)/$($(PKG)_SUBDIR) && $(AUTORECONF) $($(PKG)_AUTORECONF_OPT)
-# if the package uses libtool, patch it for cross-compiling in buildroot
- $(Q)if test "$($(PKG)_LIBTOOL_PATCH)" = "YES"; then \
- for i in `find $(@D)/$($(PKG)_SUBDIR) -name ltmain.sh`; do \
- toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
- done \
- fi
- $(Q)touch $@
-
-# Configuring
-$(BUILD_DIR)/%/.stamp_configured:
- $(call MESSAGE,"Configuring")
- cd $(@D)/$($(PKG)_SUBDIR) && rm -f config.cache && \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- $(TARGET_CONFIGURE_ENV) \
- $($(PKG)_CONF_ENV) \
- $(if $(THIS_SRCDIR),$(THIS_SRCDIR)/,./)configure \
- $(if $(filter YES,$($(PKG)_USE_CONFIG_CACHE)),--cache-file="$(BUILD_DIR)/tgt-config.cache",) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --exec-prefix=/usr \
- --sysconfdir=/etc \
- $(DISABLE_DOCUMENTATION) \
- $(DISABLE_NLS) \
- $(DISABLE_LARGEFILE) \
- $(DISABLE_IPV6) \
- $(QUIET) $($(PKG)_CONF_OPT)
- $(Q)touch $@
-
-# Build
-$(BUILD_DIR)/%/.stamp_built:
- $(call MESSAGE,"Building")
- PATH=$(TARGET_PATH) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_MAKE_OPT) -C $(@D)/$($(PKG)_SUBDIR)
- $(Q)touch $@
-
-# Install to staging dir
-$(BUILD_DIR)/%/.stamp_staging_installed:
- $(call MESSAGE,'Installing to host (staging directory)')
- $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_INSTALL_STAGING_OPT) -C $(@D)/$($(PKG)_SUBDIR)
-# toolchain/replace.sh $(STAGING_DIR)/usr/lib ".*\.la" "\(['= ]\)/usr" "\\1$(STAGING_DIR)/usr"
- for i in $$(find $(STAGING_DIR)/usr/lib/ -name "*.la"); do \
- cp $$i $$i~; \
- $(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$i; \
- done
- touch $@
-
-# Install to target dir
-$(BUILD_DIR)/%/.stamp_target_installed:
- $(call MESSAGE,"Installing to target")
- $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_INSTALL_TARGET_OPT) -C $($(PKG)_DIR)/$($(PKG)_SUBDIR)
- $(if $(BR2_HAVE_MANPAGES),,for d in man share/man; do \
- rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
- done)
- $(if $(BR2_HAVE_INFOPAGES),,for d in info share/info; do \
- rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
- done)
- $(if $(BR2_HAVE_DOCUMENTATION),,for d in doc share/doc; do \
- rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
- done)
- touch $@
-
-$(BUILD_DIR)/%/.stamp_cleaned:
- $(call MESSAGE,"Cleaning up")
- -$($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_CLEAN_OPT) -C $(@D)/$($(PKG)_SUBDIR)
- rm -f $(@D)/.stamp_built
-
-$(BUILD_DIR)/%/.stamp_uninstalled:
- $(call MESSAGE,"Uninstalling")
- $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_UNINSTALL_STAGING_OPT) -C $(@D)/$($(PKG)_SUBDIR)
- rm -f $(@D)/.stamp_staging_installed
- $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_UNINSTALL_TARGET_OPT) -C $(@D)/$($(PKG)_SUBDIR)
- rm -f $($(PKG)_TARGET_INSTALL_TARGET) $($(PKG)_HOOK_POST_INSTALL)
-
-$(BUILD_DIR)/%/.stamp_dircleaned:
- rm -Rf $(@D)
-
-
-################################################################################
-# AUTOTARGETS -- the target generator macro; define a set of human-readable
-# make targets, stamps, and default per-package variables.
-# Argument 1 is the package directory prefix.
-# Argument 2 is the (lowercase) package name.
-################################################################################
-
-define AUTOTARGETS
-$(call AUTOTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(1))
-endef
-
-# AUTOTARGETS_INNER -- does the job for AUTOTARGETS; argument 1 is the
-# lowercase package name, argument 2 the uppercase package name,
-# argument 3 the package directory prefix
define AUTOTARGETS_INNER
# define package-specific variables to default values
-$(2)_NAME = $(1)
-$(2)_VERSION ?= undefined
-$(2)_DIR = $$(BUILD_DIR)/$(1)-$$($(2)_VERSION)
-$(2)_SOURCE ?= $(1)-$$($(2)_VERSION).tar.gz
-$(2)_SITE ?= \
- http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/$(1)
-$(2)_DEPENDENCIES ?=
-$(2)_AUTORECONF ?= NO
-$(2)_AUTORECONF_OPT ?=
-$(2)_LIBTOOL_PATCH ?= YES
-$(2)_USE_CONFIG_CACHE ?= $(if $(BR2_CONFIG_CACHE),YES,NO)
+ifndef $(2)_SUBDIR
+ ifdef $(3)_SUBDIR
+ $(2)_SUBDIR = $($(3)_SUBDIR)
+ else
+ $(2)_SUBDIR ?=
+ endif
+endif
+
$(2)_CONF_ENV ?=
$(2)_CONF_OPT ?=
$(2)_MAKE ?= $(MAKE)
$(2)_MAKE_ENV ?=
$(2)_MAKE_OPT ?=
-$(2)_INSTALL_STAGING ?= NO
-$(2)_INSTALL_TARGET ?= YES
+$(2)_AUTORECONF ?= NO
+$(2)_AUTORECONF_OPT ?=
+$(2)_LIBTOOL_PATCH ?= YES
+$(2)_USE_CONFIG_CACHE ?= $(if $(BR2_CONFIG_CACHE),YES,NO)
$(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install
ifeq ($(BR2_ENABLE_DEBUG),y)
$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install-exec
@@ -352,111 +67,204 @@ endif
$(2)_CLEAN_OPT ?= clean
$(2)_UNINSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) uninstall
$(2)_UNINSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) uninstall
-$(2)_SUBDIR ?=
-$(2)_DIR_PREFIX = $(if $(3),$(3),$(TOP_SRCDIR)/package)
+$(2)_SRCDIR = $$($(2)_DIR)/$($(2)_SUBDIR)
-# define sub-target stamps
-$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed
-$(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed
-$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built
-$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured
-$(2)_TARGET_AUTORECONF = $$($(2)_DIR)/.stamp_autoconfigured
-$(2)_TARGET_LIBTOOL_PATCH = $$($(2)_DIR)/.stamp_libtool_patch
-$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched
-$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted
-$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded
-$(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled
-$(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned
-$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file. And take care of the differences between host and target
+# packages.
+#
+ifndef $(2)_CONFIGURE_CMDS
+ifeq ($(5),target)
+
+# Configure package for target
+define $(2)_CONFIGURE_CMDS
+ (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \
+ $$(TARGET_CONFIGURE_OPTS) \
+ $$(TARGET_CONFIGURE_ARGS) \
+ $$(TARGET_CONFIGURE_ENV) \
+ $$($$(PKG)_CONF_ENV) \
+ ./configure \
+ $(if $(filter YES,$$($$(PKG)_USE_CONFIG_CACHE)),--cache-file="$(BUILD_DIR)/tgt-config.cache",) \
+ --target=$$(GNU_TARGET_NAME) \
+ --host=$$(GNU_TARGET_NAME) \
+ --build=$$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --sysconfdir=/etc \
+ $$(DISABLE_DOCUMENTATION) \
+ $$(DISABLE_NLS) \
+ $$(DISABLE_LARGEFILE) \
+ $$(DISABLE_IPV6) \
+ $$(QUIET) $$($$(PKG)_CONF_OPT) \
+ )
+endef
+else
-$(2)_HOOK_POST_EXTRACT = $$($(2)_DIR)/.stamp_hook_post_extract
-$(2)_HOOK_POST_CONFIGURE = $$($(2)_DIR)/.stamp_hook_post_configure
-$(2)_HOOK_POST_BUILD = $$($(2)_DIR)/.stamp_hook_post_build
-$(2)_HOOK_POST_INSTALL = $$($(2)_DIR)/.stamp_hook_post_install
+# Configure package for host
+define $(2)_CONFIGURE_CMDS
+ (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
+ $$(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$$(HOST_CFLAGS)" \
+ LDFLAGS="$$(HOST_LDFLAGS)" \
+ ./configure \
+ --prefix="$$(HOST_DIR)/usr" \
+ --sysconfdir="$$(HOST_DIR)/etc" \
+ $$($$(PKG)_CONF_OPT) \
+ )
+endef
+endif
+endif
-# human-friendly targets and target sequencing
-$(1): $(1)-install
-$(1)-install: $(1)-install-staging $(1)-install-target \
- $$($(2)_HOOK_POST_INSTALL)
+#
+# Hook to update config.sub and config.guess if needed
+#
+define UPDATE_CONFIG_HOOK
+ for file in config.guess config.sub; do \
+ for i in $$$$(find $$(@D) -name $$$$file); do \
+ cp package/gnuconfig/$$$$file $$$$i; \
+ done; \
+ done
+endef
-ifeq ($$($(2)_INSTALL_TARGET),YES)
-$(1)-install-target: $(1)-build $$($(2)_TARGET_INSTALL_TARGET)
-else
-$(1)-install-target:
+ifeq ($(BR2_UPDATE_CONFIG),y)
+$(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
endif
-ifeq ($$($(2)_INSTALL_STAGING),YES)
-$(1)-install-staging: $(1)-build $$($(2)_TARGET_INSTALL_STAGING)
-else
-$(1)-install-staging:
-endif
+#
+# Hook to patch libtool to make it work properly for cross-compilation
+#
+define LIBTOOL_PATCH_HOOK
+ @$(call MESSAGE,"Patching libtool")
+ $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" -a \
+ "$$($$(PKG)_AUTORECONF)" != "YES"; then \
+ for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
+ toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
+ done \
+ fi
+endef
-$(1)-build: $(1)-configure \
- $$($(2)_TARGET_BUILD) \
- $$($(2)_HOOK_POST_BUILD)
+ifeq ($($(2)_LIBTOOL_PATCH),YES)
+$(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK
+endif
-$(1)-configure: $(1)-autoreconf \
- $$($(2)_TARGET_CONFIGURE) \
- $$($(2)_HOOK_POST_CONFIGURE)
+#
+# Hook to autoreconf the package if needed
+#
+define AUTORECONF_HOOK
+ @$(call MESSAGE,"Autoreconfiguring")
+ $(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
+ $(Q)if test "$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \
+ for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
+ toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
+ done \
+ fi
+endef
-ifeq ($$($(2)_AUTORECONF),YES)
-$(1)-autoreconf: $(1)-patch $$($(2)_TARGET_AUTORECONF)
+ifeq ($($(2)_AUTORECONF),YES)
+$(2)_POST_PATCH_HOOKS += AUTORECONF_HOOK
$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
+endif
+
+#
+# Build step. Only define it if not already defined by the package .mk
+# file.
+#
+ifndef $(2)_BUILD_CMDS
+ifeq ($(5),target)
+define $(2)_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR)
+endef
else
-$(1)-autoreconf: $(1)-patch
+define $(2)_BUILD_CMDS
+ $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR)
+endef
+endif
endif
-$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH)
+#
+# Host installation step. Only define it if not already defined by the
+# package .mk file.
+#
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $$($$(PKG)_SRCDIR) install
+endef
+endif
-$(1)-extract: $(1)-depends \
- $$($(2)_TARGET_EXTRACT) \
- $$($(2)_HOOK_POST_EXTRACT) \
- $$($(2)_TARGET_LIBTOOL_PATCH)
+#
+# Staging installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_STAGING_CMDS
+define $(2)_INSTALL_STAGING_CMDS
+ $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
+ for i in $$$$(find $(STAGING_DIR)/usr/lib/ -name "*.la"); do \
+ cp $$$$i $$$$i~; \
+ $$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \
+ done
+endef
+endif
-$(1)-depends: $(1)-source $$($(2)_DEPENDENCIES)
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+ $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR)
+endef
+endif
-$(1)-source: $$($(2)_TARGET_SOURCE)
+#
+# Clean step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_CLEAN_CMDS
+define $(2)_CLEAN_CMDS
+ -$$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_SRCDIR)
+endef
+endif
-# non-build targets
-$(1)-uninstall: $(1)-configure $$($(2)_TARGET_UNINSTALL)
+#
+# Uninstall from staging step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_UNINSTALL_STAGING_CMDS
+define $(2)_UNINSTALL_STAGING_CMDS
+ $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
+endef
+endif
-$(1)-clean: $(1)-uninstall \
- $$($(2)_TARGET_CLEAN)
+#
+# Uninstall from target step. Only define it if not already defined
+# by the package .mk file.
+#
+ifndef $(2)_UNINSTALL_TARGET_CMDS
+define $(2)_UNINSTALL_TARGET_CMDS
+ $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR)
+endef
+endif
-$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN)
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call GENTARGETS_INNER,$(1),$(2),$(3),$(4),$(5))
-# define the PKG variable for all targets, containing the
-# uppercase package variable prefix
-$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2)
-$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2)
-$$($(2)_TARGET_BUILD): PKG=$(2)
-$$($(2)_TARGET_CONFIGURE): PKG=$(2)
-$$($(2)_TARGET_LIBTOOL_PATCH): PKG=$(2)
-$$($(2)_TARGET_AUTORECONF): PKG=$(2)
-$$($(2)_TARGET_PATCH): PKG=$(2)
-$$($(2)_TARGET_EXTRACT): PKG=$(2)
-$$($(2)_TARGET_SOURCE): PKG=$(2)
-$$($(2)_TARGET_UNINSTALL): PKG=$(2)
-$$($(2)_TARGET_CLEAN): PKG=$(2)
-$$($(2)_TARGET_DIRCLEAN): PKG=$(2)
-$$($(2)_HOOK_POST_EXTRACT): PKG=$(2)
-$$($(2)_HOOK_POST_CONFIGURE): PKG=$(2)
-$$($(2)_HOOK_POST_BUILD): PKG=$(2)
-$$($(2)_HOOK_POST_INSTALL): PKG=$(2)
+endef
-# define hook targets
-# default hook behaviour: do nothing
-$$($(2)_HOOK_POST_EXTRACT):
-$$($(2)_HOOK_POST_CONFIGURE):
-$$($(2)_HOOK_POST_BUILD):
-$$($(2)_HOOK_POST_INSTALL):
+################################################################################
+# AUTOTARGETS -- the target generator macro for autotools packages
+#
+# Argument 1 is the package directory prefix [mandatory]
+# Argument 2 is the lowercase package name [mandatory]
+# Argument 3 is "target" or "host" [optional, default: "target"]
+################################################################################
-# add package to the general list of targets if requested by the buildroot
-# configuration
-ifeq ($$(BR2_PACKAGE_$(2)),y)
-TARGETS += $(1)
+define AUTOTARGETS
+ifeq ($(3),host)
+$(call AUTOTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
+else
+$(call AUTOTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
endif
endef
-
-# :mode=makefile:
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 04/39] olsr: rework on top of the generic infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (2 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 03/39] Rework autotools infrastructure on top of the generic infrastructure Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 05/39] zlib: " Thomas Petazzoni
` (36 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/olsr/olsr.mk | 60 +++++++++++++++----------------------------------
1 files changed, 19 insertions(+), 41 deletions(-)
diff --git a/package/olsr/olsr.mk b/package/olsr/olsr.mk
index 9107653..75d5d66 100644
--- a/package/olsr/olsr.mk
+++ b/package/olsr/olsr.mk
@@ -9,55 +9,33 @@ OLSR_VERSION_MINOR=6
OLSR_VERSION:=$(OLSR_VERSION_MAJOR).$(OLSR_VERSION_MINOR)
OLSR_SOURCE:=olsrd-$(OLSR_VERSION).tar.bz2
OLSR_SITE:=http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR)
-OLSR_DIR:=$(BUILD_DIR)/olsrd-$(OLSR_VERSION)
-OLSR_CAT:=$(BZCAT)
OLSR_BINARY:=olsrd
OLSR_TARGET_BINARY:=usr/sbin/olsrd
#OLSR_PLUGINS=httpinfo tas dot_draw nameservice dyn_gw dyn_gw_plain pgraph bmf quagga secure
OLSR_PLUGINS=dot_draw dyn_gw secure
OLSR_TARGET_PLUGIN=usr/lib/
-$(DL_DIR)/$(OLSR_SOURCE):
- $(call DOWNLOAD,$(OLSR_SITE),$(OLSR_SOURCE))
-
-olsr-source: $(DL_DIR)/$(OLSR_SOURCE)
-
-olsr-unpacked: $(OLSR_DIR)/.unpacked
-$(OLSR_DIR)/.unpacked: $(DL_DIR)/$(OLSR_SOURCE)
- $(OLSR_CAT) $(DL_DIR)/$(OLSR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(OLSR_DIR)/$(OLSR_BINARY): $(OLSR_DIR)/.unpacked
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(OLSR_DIR) olsrd $(OLSR_PLUGINS)
-
-$(TARGET_DIR)/$(OLSR_TARGET_BINARY): $(OLSR_DIR)/$(OLSR_BINARY)
- rm -f $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
- cp -dpf $(OLSR_DIR)/$(OLSR_BINARY) $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
- cp -R $(OLSR_DIR)/lib/*/olsrd_*.so* $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)
- mkdir -p $(TARGET_DIR)/etc/init.d
- cp -dpf package/olsr/S50olsr $(TARGET_DIR)/etc/init.d/
- test -r $(TARGET_DIR)/etc/olsrd.conf || \
- cp -dpf $(OLSR_DIR)/files/olsrd.conf.default.lq $(TARGET_DIR)/etc/olsrd.conf
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so*
- $(STRIPCMD) $(STRIP_STRIP_ALL) $@
-
-olsr: $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
-
-olsr-clean:
+define OLSR_BUILD_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) olsrd $(OLSR_PLUGINS)
+endef
+
+define OLSR_INSTALL_TARGET_CMDS
+ cp -dpf $(@D)/$(OLSR_BINARY) $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
+ cp -R $(@D)/lib/*/olsrd_*.so* $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)
+ mkdir -p $(TARGET_DIR)/etc/init.d
+ cp -dpf package/olsr/S50olsr $(TARGET_DIR)/etc/init.d/
+ test -r $(TARGET_DIR)/etc/olsrd.conf || \
+ cp -dpf $(@D)/files/olsrd.conf.default.lq $(TARGET_DIR)/etc/olsrd.conf
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so*
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
+endef
+
+define OLSR_CLEAN_CMDS
rm -f $(TARGET_DIR)/$(OLSR_TARGET_BINARY) \
$(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so* \
$(TARGET_DIR)/etc/init.d/S50olsr \
$(TARGET_DIR)/etc/olsrd.conf
- -$(MAKE) -C $(OLSR_DIR) clean
+ -$(MAKE) -C $(@D) clean
+endef
-olsr-dirclean:
- rm -rf $(OLSR_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_OLSR),y)
-TARGETS+=olsr $(OLSR_PLUGINS)
-endif
+$(eval $(call GENTARGETS,package,olsr))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 05/39] zlib: rework on top of the generic infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (3 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 04/39] olsr: rework " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 06/39] Add $(HOST_DIR)/usr/sbin to the PATH Thomas Petazzoni
` (35 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/zlib/zlib.mk | 93 +++++++++++++++----------------------------------
1 files changed, 29 insertions(+), 64 deletions(-)
diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk
index f207bcf..5365b30 100644
--- a/package/zlib/zlib.mk
+++ b/package/zlib/zlib.mk
@@ -5,31 +5,19 @@
#############################################################
ZLIB_VERSION:=1.2.3
ZLIB_SOURCE:=zlib-$(ZLIB_VERSION).tar.bz2
-ZLIB_CAT:=$(BZCAT)
ZLIB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
-ZLIB_DIR:=$(BUILD_DIR)/zlib-$(ZLIB_VERSION)
-
-$(DL_DIR)/$(ZLIB_SOURCE):
- $(call DOWNLOAD,$(ZLIB_SITE),$(ZLIB_SOURCE))
-
-$(ZLIB_DIR)/.patched: $(DL_DIR)/$(ZLIB_SOURCE)
- $(ZLIB_CAT) $(DL_DIR)/$(ZLIB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(ZLIB_DIR) package/zlib/ zlib\*.patch
- $(CONFIG_UPDATE) $(@D)
- touch $@
+ZLIB_INSTALL_STAGING=YES
ifeq ($(BR2_PREFER_STATIC_LIB),y)
ZLIB_PIC :=
ZLIB_SHARED :=
-ZLIB_TARGET := $(STAGING_DIR)/usr/lib/libz.a
else
ZLIB_PIC := -fPIC
ZLIB_SHARED := --shared
-ZLIB_TARGET := $(TARGET_DIR)/usr/lib/libz.so
endif
-$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
- (cd $(ZLIB_DIR); rm -rf config.cache; \
+define ZLIB_CONFIGURE_CMDS
+ (cd $(@D); rm -rf config.cache; \
$(TARGET_CONFIGURE_ARGS) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) $(ZLIB_PIC)" \
@@ -40,55 +28,32 @@ $(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
--libdir=$(STAGING_DIR)/usr/lib \
--includedir=$(STAGING_DIR)/usr/include \
)
- touch $@
-
-$(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
- $(MAKE) -C $(ZLIB_DIR) all libz.a
- touch -c $@
-
-$(STAGING_DIR)/usr/lib/libz.a: $(ZLIB_DIR)/libz.a
- $(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/libz.a
- $(INSTALL) -D $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/zlib.h
- $(INSTALL) $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/
- touch -c $@
-
-$(STAGING_DIR)/usr/lib/libz.so: $(STAGING_DIR)/usr/lib/libz.a
- cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/usr/lib/
- touch -c $@
+endef
+
+define ZLIB_BUILD_CMDS
+ $(MAKE) -C $(@D) all libz.a
+endef
+
+define ZLIB_INSTALL_STAGING_CMDS
+ $(INSTALL) -D $(@D)/libz.a $(STAGING_DIR)/usr/lib/libz.a
+ $(INSTALL) -D $(@D)/zlib.h $(STAGING_DIR)/usr/include/zlib.h
+ $(INSTALL) $(@D)/zconf.h $(STAGING_DIR)/usr/include/
+ cp -dpf $(@D)/libz.so* $(STAGING_DIR)/usr/lib/
+endef
+
+ifeq ($(BR2_HAVE_DEVFILES),y)
+define ZLIB_INSTALL_TARGET_HEADERS
+ $(INSTALL) -D $(@D)/zlib.h $(STAGING_DIR)/usr/include/zlib.h
+ $(INSTALL) $(@D)/zconf.h $(STAGING_DIR)/usr/include/
+endef
+endif
-$(TARGET_DIR)/usr/lib/libz.so: $(STAGING_DIR)/usr/lib/libz.so
+define ZLIB_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/lib
- cp -dpf $(STAGING_DIR)/usr/lib/libz.so* $(TARGET_DIR)/usr/lib
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/usr/lib/libz.a
- $(INSTALL) -D $(STAGING_DIR)/usr/include/zlib.h $(TARGET_DIR)/usr/include/zlib.h
- $(INSTALL) $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
- $(INSTALL) -D $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/libz.a
- touch -c $@
-
-zlib: $(ZLIB_TARGET) $(if $(BR2_HAVE_DEVFILES),$(TARGET_DIR)/usr/lib/libz.a)
+ cp -dpf $(@D)/libz.so* $(TARGET_DIR)/usr/lib
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libz.so*
+ $(INSTALL) -D $(@D)/libz.a $(TARGET_DIR)/usr/lib/libz.a
+ $(ZLIB_INSTALL_TARGET_HEADERS)
+endef
-zlib-source: $(DL_DIR)/$(ZLIB_SOURCE)
-
-zlib-clean:
- rm -f $(TARGET_DIR)/usr/lib/libz.* \
- $(TARGET_DIR)/usr/include/zlib.h \
- $(TARGET_DIR)/usr/include/zconf.h \
- $(STAGING_DIR)/usr/include/zlib.h \
- $(STAGING_DIR)/usr/include/zconf.h \
- $(STAGING_DIR)/usr/lib/libz.*
- -$(MAKE) -C $(ZLIB_DIR) clean
-
-zlib-dirclean:
- rm -rf $(ZLIB_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_ZLIB),y)
-TARGETS+=zlib
-endif
+$(eval $(call GENTARGETS,package,zlib))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 06/39] Add $(HOST_DIR)/usr/sbin to the PATH
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (4 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 05/39] zlib: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 07/39] pkg-config: convert to autotools infrastructure for host package Thomas Petazzoni
` (34 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index 5b6161b..e643577 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -109,7 +109,7 @@ ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TOOLCHAIN_DIR=$(BASE_DIR)/toolchain
# Quotes are needed for spaces et al in path components.
-TARGET_PATH="$(TOOLCHAIN_DIR)/bin:$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(PATH)"
+TARGET_PATH="$(TOOLCHAIN_DIR)/bin:$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(PATH)"
IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(ROOTFS_SUFFIX)
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)
@@ -119,7 +119,7 @@ else
TOOLCHAIN_EXTERNAL_PREFIX:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
TOOLCHAIN_EXTERNAL_PATH:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
TOOLCHAIN_DIR=$(BASE_DIR)/toolchain
-TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(TOOLCHAIN_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)"
+TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(TOOLCHAIN_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)"
#IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX)
IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(ROOTFS_SUFFIX)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 07/39] pkg-config: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (5 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 06/39] Add $(HOST_DIR)/usr/sbin to the PATH Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 08/39] host-pkgconfig is now host-pkg-config Thomas Petazzoni
` (33 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pkg-config/pkg-config.mk | 51 ++++++-------------------------------
1 files changed, 9 insertions(+), 42 deletions(-)
diff --git a/package/pkg-config/pkg-config.mk b/package/pkg-config/pkg-config.mk
index e328544..7caf37b 100644
--- a/package/pkg-config/pkg-config.mk
+++ b/package/pkg-config/pkg-config.mk
@@ -15,51 +15,18 @@ PKG_CONFIG_DEPENDENCIES = libglib2
PKG_CONFIG_CONF_OPT = --with-installed-glib
-$(eval $(call AUTOTARGETS,package,pkg-config))
-
-# pkg-config for the host
-PKG_CONFIG_HOST_DIR:=$(BUILD_DIR)/pkg-config-$(PKG_CONFIG_VERSION)-host
-PKG_CONFIG_HOST_BINARY:=$(HOST_DIR)/usr/bin/pkg-config
-
-$(DL_DIR)/$(PKG_CONFIG_SOURCE):
- $(call DOWNLOAD,$(PKG_CONFIG_SITE),$(PKG_CONFIG_SOURCE))
-
-$(STAMP_DIR)/host_pkgconfig_unpacked: $(DL_DIR)/$(PKG_CONFIG_SOURCE)
- mkdir -p $(PKG_CONFIG_HOST_DIR)
- $(INFLATE$(suffix $(PKG_CONFIG_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(PKG_CONFIG_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(PKG_CONFIG_HOST_DIR) package/pkg-config/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_pkgconfig_configured: $(STAMP_DIR)/host_pkgconfig_unpacked
- (cd $(PKG_CONFIG_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_PKG_CONFIG_CONF_OPT = \
--with-pc-path="$(STAGING_DIR)/usr/lib/pkgconfig" \
- --disable-static \
- )
- touch $@
-
-$(STAMP_DIR)/host_pkgconfig_compiled: $(STAMP_DIR)/host_pkgconfig_configured
- $(MAKE) -C $(PKG_CONFIG_HOST_DIR)
- touch $@
+ --disable-static
-$(STAMP_DIR)/host_pkgconfig_installed: $(STAMP_DIR)/host_pkgconfig_compiled
- $(MAKE) -C $(PKG_CONFIG_HOST_DIR) install
- install -D -m 0644 $(HOST_DIR)/usr/share/aclocal/pkg.m4 \
+define HOST_PKG_CONFIG_INSTALL_M4
+install -D -m 0644 $(HOST_DIR)/usr/share/aclocal/pkg.m4 \
$(STAGING_DIR)/usr/share/aclocal/pkg.m4
- touch $@
+endef
-host-pkgconfig: $(STAMP_DIR)/host_pkgconfig_installed
+HOST_PKG_CONFIG_POST_INSTALL_HOOKS += HOST_PKG_CONFIG_INSTALL_M4
-host-pkgconfig-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_pkgconfig_,unpacked configured compiled installed)
- -$(MAKE) -C $(PKG_CONFIG_HOST_DIR) uninstall
- -$(MAKE) -C $(PKG_CONFIG_HOST_DIR) clean
+$(eval $(call AUTOTARGETS,package,pkg-config))
+$(eval $(call AUTOTARGETS,package,pkg-config,host))
-host-pkgconfig-dirclean:
- rm -rf $(PKG_CONFIG_HOST_DIR)
+PKG_CONFIG_HOST_BINARY:=$(HOST_DIR)/usr/bin/pkg-config
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 08/39] host-pkgconfig is now host-pkg-config
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (6 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 07/39] pkg-config: convert to autotools infrastructure for host package Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 09/39] Add package statistics script Thomas Petazzoni
` (32 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/atk/atk.mk | 2 +-
package/cairo/cairo.mk | 2 +-
package/dbus-glib/dbus-glib.mk | 2 +-
package/dbus/dbus.mk | 2 +-
package/dnsmasq/dnsmasq.mk | 2 +-
package/docker/docker.mk | 2 +-
package/editors/vim/vim.mk | 2 +-
package/enchant/enchant.mk | 2 +-
package/expat/expat.mk | 2 +-
package/freetype/freetype.mk | 2 +-
package/gettext/gettext.mk | 2 +-
package/gob2/gob2.mk | 2 +-
package/gqview/gqview.mk | 2 +-
package/gvfs/gvfs.mk | 2 +-
package/hal/hal.mk | 2 +-
package/java/classpath/classpath.mk | 2 +-
package/java/jamvm/jamvm.mk | 2 +-
package/libdaemon/libdaemon.mk | 2 +-
package/libdrm/libdrm.mk | 2 +-
package/libglade/libglade.mk | 2 +-
package/libglib2/libglib2.mk | 2 +-
package/libgtk2/libgtk2.mk | 2 +-
package/libidn/libidn.mk | 2 +-
package/libpng/libpng.mk | 2 +-
package/libsoup/libsoup.mk | 2 +-
package/libusb/libusb.mk | 2 +-
package/matchbox/matchbox.mk | 2 +-
package/midori/midori.mk | 2 +-
package/multimedia/gstreamer/gstreamer.mk | 2 +-
package/multimedia/libmms/libmms.mk | 2 +-
package/multimedia/libogg/libogg.mk | 2 +-
package/multimedia/libtheora/libtheora.mk | 2 +-
package/multimedia/libvorbis/libvorbis.mk | 3 +--
package/multimedia/swfdec/swfdec.mk | 2 +-
package/neon/neon.mk | 2 +-
package/pango/pango.mk | 2 +-
package/pcmanfm/pcmanfm.mk | 2 +-
package/shared-mime-info/shared-mime-info.mk | 2 +-
package/sylpheed/sylpheed.mk | 2 +-
package/tiff/tiff.mk | 2 +-
package/usbutils/usbutils.mk | 2 +-
package/wpa_supplicant/wpa_supplicant.mk | 2 +-
package/x11r7/xfont_font-util/xfont_font-util.mk | 2 +-
43 files changed, 43 insertions(+), 44 deletions(-)
diff --git a/package/atk/atk.mk b/package/atk/atk.mk
index 93b9e9e..1e8e576 100644
--- a/package/atk/atk.mk
+++ b/package/atk/atk.mk
@@ -51,7 +51,7 @@ else
ATK_CONF_OPT += --without-x
endif
-ATK_DEPENDENCIES = libglib2 host-pkgconfig
+ATK_DEPENDENCIES = libglib2 host-pkg-config
$(eval $(call AUTOTARGETS,package,atk))
diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index e160bf9..2608e14 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -36,7 +36,7 @@ CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
ac_cv_func_working_mktime=yes jm_cv_func_working_re_compile_pattern=yes \
ac_use_included_regex=no gl_cv_c_restrict=no
-CAIRO_DEPENDENCIES = host-pkgconfig fontconfig pixman
+CAIRO_DEPENDENCIES = host-pkg-config fontconfig pixman
ifeq ($(BR2_PACKAGE_DIRECTFB),y)
CAIRO_CONF_OPT += --enable-directfb
diff --git a/package/dbus-glib/dbus-glib.mk b/package/dbus-glib/dbus-glib.mk
index e9b1bf0..c6cebe6 100644
--- a/package/dbus-glib/dbus-glib.mk
+++ b/package/dbus-glib/dbus-glib.mk
@@ -23,7 +23,7 @@ DBUS_GLIB_CONF_OPT = --localstatedir=/var \
--disable-doxygen-docs \
--enable-asserts=yes
-DBUS_GLIB_DEPENDENCIES = host-pkgconfig dbus host-dbus host-dbus-glib libglib2 expat
+DBUS_GLIB_DEPENDENCIES = host-pkg-config dbus host-dbus host-dbus-glib libglib2 expat
$(eval $(call AUTOTARGETS,package,dbus-glib))
diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk
index eb97e76..2780df6 100644
--- a/package/dbus/dbus.mk
+++ b/package/dbus/dbus.mk
@@ -17,7 +17,7 @@ else
DBUS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-strip STRIPPROG="$(STRIPCMD)"
endif
-DBUS_DEPENDENCIES = host-pkgconfig
+DBUS_DEPENDENCIES = host-pkg-config
DBUS_CONF_ENV = ac_cv_have_abstract_sockets=yes
DBUS_CONF_OPT = --program-prefix="" \
diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk
index 07b3c48..6d66d09 100644
--- a/package/dnsmasq/dnsmasq.mk
+++ b/package/dnsmasq/dnsmasq.mk
@@ -34,7 +34,7 @@ DNSMASQ_COPTS += -DNO_LARGEFILE
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
-DNSMASQ_DEPENDENCIES += host-pkgconfig dbus
+DNSMASQ_DEPENDENCIES += host-pkg-config dbus
endif
$(eval $(call AUTOTARGETS,package,dnsmasq))
diff --git a/package/docker/docker.mk b/package/docker/docker.mk
index 2dfe0f3..8525d64 100644
--- a/package/docker/docker.mk
+++ b/package/docker/docker.mk
@@ -19,7 +19,7 @@ DOCKER_MAKE_OPT = CC=$(TARGET_CC) CXX=$(TARGET_CXX) LD=$(TARGET_LD) \
DOCKER_INSTALL_TARGET_OPT = PREFIX=$(TARGET_DIR)/usr install
-DOCKER_DEPENDENCIES = host-pkgconfig libglib2 xserver_xorg-server
+DOCKER_DEPENDENCIES = host-pkg-config libglib2 xserver_xorg-server
$(eval $(call AUTOTARGETS,package,docker))
diff --git a/package/editors/vim/vim.mk b/package/editors/vim/vim.mk
index 63f6c12..fea7f18 100644
--- a/package/editors/vim/vim.mk
+++ b/package/editors/vim/vim.mk
@@ -75,7 +75,7 @@ ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
)
endif
-vim: host-pkgconfig ncurses vim-source $(TARGET_DIR)/usr/bin/vim
+vim: host-pkg-config ncurses vim-source $(TARGET_DIR)/usr/bin/vim
#############################################################
#
diff --git a/package/enchant/enchant.mk b/package/enchant/enchant.mk
index 63cd311..9c12231 100644
--- a/package/enchant/enchant.mk
+++ b/package/enchant/enchant.mk
@@ -11,6 +11,6 @@ ENCHANT_INSTALL_STAGING = YES
ENCHANT_INSTALL_TARGET = YES
ENCHANT_LIBTOOL_PATCH = NO
-ENCHANT_DEPENDENCIES = libglib2 host-pkgconfig
+ENCHANT_DEPENDENCIES = libglib2 host-pkg-config
$(eval $(call AUTOTARGETS,package,enchant))
diff --git a/package/expat/expat.mk b/package/expat/expat.mk
index e1d5668..9dcb0e7 100644
--- a/package/expat/expat.mk
+++ b/package/expat/expat.mk
@@ -16,7 +16,7 @@ EXPAT_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) installlib
EXPAT_CONF_OPT = --enable-shared
-EXPAT_DEPENDENCIES = host-pkgconfig
+EXPAT_DEPENDENCIES = host-pkg-config
$(eval $(call AUTOTARGETS,package,expat))
diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk
index 7a837aa..06bf6f4 100644
--- a/package/freetype/freetype.mk
+++ b/package/freetype/freetype.mk
@@ -11,7 +11,7 @@ FREETYPE_INSTALL_STAGING = YES
FREETYPE_INSTALL_TARGET = YES
FREETYPE_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
FREETYPE_MAKE_OPT = CCexe="$(HOSTCC)"
-FREETYPE_DEPENDENCIES = host-pkgconfig $(if $(BR2_PACKAGE_ZLIB),zlib)
+FREETYPE_DEPENDENCIES = host-pkg-config $(if $(BR2_PACKAGE_ZLIB),zlib)
$(eval $(call AUTOTARGETS,package,freetype))
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index a0955c1..dbc1f2c 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -114,7 +114,7 @@ $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY)
autopoint envsubst gettext.sh gettextize msg* ?gettext)
touch -c $@
-gettext: host-pkgconfig $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
+gettext: host-pkg-config $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
gettext-unpacked: $(GETTEXT_DIR)/.unpacked
diff --git a/package/gob2/gob2.mk b/package/gob2/gob2.mk
index 8679f4a..e640ca9 100644
--- a/package/gob2/gob2.mk
+++ b/package/gob2/gob2.mk
@@ -7,7 +7,7 @@ GOB2_VERSION = 2.0.15
GOB2_SOURCE = gob2-$(GOB2_VERSION).tar.gz
GOB2_SITE = http://ftp.5z.com/pub/gob/
-GOB2_DEPENDENCIES = libglib2 flex bison host-pkgconfig
+GOB2_DEPENDENCIES = libglib2 flex bison host-pkg-config
$(eval $(call AUTOTARGETS,package,gob2))
diff --git a/package/gqview/gqview.mk b/package/gqview/gqview.mk
index d5ac861..1bd76e2 100644
--- a/package/gqview/gqview.mk
+++ b/package/gqview/gqview.mk
@@ -10,7 +10,7 @@ GQVIEW_AUTORECONF = NO
GQVIEW_INSTALL_STAGING = NO
GQVIEW_INSTALL_TARGET = YES
-GQVIEW_DEPENDENCIES = host-pkgconfig libgtk2
+GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
$(eval $(call AUTOTARGETS,package,gqview))
diff --git a/package/gvfs/gvfs.mk b/package/gvfs/gvfs.mk
index f8f81cd..cf28862 100644
--- a/package/gvfs/gvfs.mk
+++ b/package/gvfs/gvfs.mk
@@ -14,7 +14,7 @@ GVFS_INSTALL_TARGET = YES
GVFS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
GVFS_AUTORECONF = NO
-GVFS_DEPENDENCIES = host-pkgconfig host-libglib2 libglib2 dbus-glib shared-mime-info
+GVFS_DEPENDENCIES = host-pkg-config host-libglib2 libglib2 dbus-glib shared-mime-info
GVFS_CONF_OPT = \
--disable-gconf \
diff --git a/package/hal/hal.mk b/package/hal/hal.mk
index 07ff046..fb152d6 100644
--- a/package/hal/hal.mk
+++ b/package/hal/hal.mk
@@ -87,7 +87,7 @@ $(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald
done
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libhal*
-hal: host-pkgconfig dbus-glib hwdata udev-volume_id $(TARGET_DIR)/$(HAL_TARGET_BINARY)
+hal: host-pkg-config dbus-glib hwdata udev-volume_id $(TARGET_DIR)/$(HAL_TARGET_BINARY)
hal-clean:
rm -f $(TARGET_DIR)/etc/dbus-1/system.d/hal.conf
diff --git a/package/java/classpath/classpath.mk b/package/java/classpath/classpath.mk
index c63837b..979cc74 100644
--- a/package/java/classpath/classpath.mk
+++ b/package/java/classpath/classpath.mk
@@ -52,7 +52,7 @@ CLASSPATH_CONF_OPT = \
--disable-gconf-peer --disable-examples --disable-plugin \
--disable-Werror
-CLASSPATH_DEPENDENCIES = host-pkgconfig libpng jpeg
+CLASSPATH_DEPENDENCIES = host-pkg-config libpng jpeg
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
CLASSPATH_DEPENDENCIES+= alsa-lib
diff --git a/package/java/jamvm/jamvm.mk b/package/java/jamvm/jamvm.mk
index 65ba096..c7f7eac 100644
--- a/package/java/jamvm/jamvm.mk
+++ b/package/java/jamvm/jamvm.mk
@@ -47,7 +47,7 @@ JAMVM_CONF_OPT = \
--disable-debug --with-classpath-install-dir=/usr
-JAMVM_DEPENDENCIES = host-pkgconfig classpath
+JAMVM_DEPENDENCIES = host-pkg-config classpath
#Include X libraries when we have an X server
ifeq ($(BR2_PACKAGE_XORG7),y)
diff --git a/package/libdaemon/libdaemon.mk b/package/libdaemon/libdaemon.mk
index c73dd8d..7a9d5c8 100644
--- a/package/libdaemon/libdaemon.mk
+++ b/package/libdaemon/libdaemon.mk
@@ -13,6 +13,6 @@ LIBDAEMON_INSTALL_TARGET:=YES
LIBDAEMON_CONF_ENV:=ac_cv_func_setpgrp_void=no
LIBDAEMON_CONF_OPT:=--disable-lynx
-LIBDAEMON_DEPENDENCIES:=host-pkgconfig
+LIBDAEMON_DEPENDENCIES:=host-pkg-config
$(eval $(call AUTOTARGETS,package,libdaemon))
diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
index 5be2bc8..53284b3 100644
--- a/package/libdrm/libdrm.mk
+++ b/package/libdrm/libdrm.mk
@@ -61,7 +61,7 @@ $(TARGET_DIR)/usr/lib/libdrm.so: $(STAGING_DIR)/usr/lib/libdrm.so
cp -dpf $(STAGING_DIR)/usr/lib/libdrm.so* $(TARGET_DIR)/usr/lib/
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libdrm.so
-libdrm: host-pkgconfig $(TARGET_DIR)/usr/lib/libdrm.so
+libdrm: host-pkg-config $(TARGET_DIR)/usr/lib/libdrm.so
libdrm-clean:
-$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LIBDRM_DIR) uninstall
diff --git a/package/libglade/libglade.mk b/package/libglade/libglade.mk
index 7863061..30b7521 100644
--- a/package/libglade/libglade.mk
+++ b/package/libglade/libglade.mk
@@ -7,7 +7,7 @@ LIBGLADE_VERSION = 2.6.3
LIBGLADE_SOURCE = libglade-$(LIBGLADE_VERSION).tar.bz2
LIBGLADE_SITE = http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/
LIBGLADE_INSTALL_STAGING = YES
-LIBGLADE_DEPENDENCIES = host-pkgconfig libglib2 libgtk2 atk libxml2
+LIBGLADE_DEPENDENCIES = host-pkg-config libglib2 libgtk2 atk libxml2
$(eval $(call AUTOTARGETS,package,libglade))
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 2d02b9b..ea96707 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -49,7 +49,7 @@ LIBGLIB2_CONF_ENV = \
LIBGLIB2_CONF_OPT = --enable-shared \
--enable-static
-LIBGLIB2_DEPENDENCIES = gettext libintl host-pkgconfig host-libglib2
+LIBGLIB2_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2
ifneq ($(BR2_ENABLE_LOCALE),y)
LIBGLIB2_DEPENDENCIES+=libiconv
diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk
index 83eab38..a61fde7 100644
--- a/package/libgtk2/libgtk2.mk
+++ b/package/libgtk2/libgtk2.mk
@@ -72,7 +72,7 @@ LIBGTK2_CONF_OPT = --enable-shared \
--enable-explicit-deps=no \
--disable-debug
-LIBGTK2_DEPENDENCIES = host-pkgconfig host-libgtk2 libglib2 cairo pango atk
+LIBGTK2_DEPENDENCIES = host-pkg-config host-libgtk2 libglib2 cairo pango atk
ifeq ($(BR2_PACKAGE_DIRECTFB),y)
LIBGTK2_CONF_OPT += --with-gdktarget=directfb
diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk
index 52f59f2..6ee1a96 100644
--- a/package/libidn/libidn.mk
+++ b/package/libidn/libidn.mk
@@ -10,7 +10,7 @@ LIBIDN_INSTALL_STAGING = YES
LIBIDN_INSTALL_TARGET = YES
LIBIDN_CONF_OPT = --enable-shared --disable-java --enable-csharp=no
LIBIDN_LIBTOOL_PATCH = NO
-LIBIDN_DEPENDENCIES = host-pkgconfig gettext $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN_DEPENDENCIES = host-pkg-config gettext $(if $(BR2_PACKAGE_LIBICONV),libiconv)
$(eval $(call AUTOTARGETS,package,libidn))
diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk
index 3cb03a6..1297c89 100644
--- a/package/libpng/libpng.mk
+++ b/package/libpng/libpng.mk
@@ -9,7 +9,7 @@ LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.bz2
LIBPNG_LIBTOOL_PATCH = NO
LIBPNG_INSTALL_STAGING = YES
LIBPNG_CONF_OPT = --without-libpng-compat
-LIBPNG_DEPENDENCIES = host-pkgconfig zlib
+LIBPNG_DEPENDENCIES = host-pkg-config zlib
$(eval $(call AUTOTARGETS,package,libpng))
diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk
index 64a192c..3e9edd3 100644
--- a/package/libsoup/libsoup.mk
+++ b/package/libsoup/libsoup.mk
@@ -26,6 +26,6 @@ LIBSOUP_CONF_OPT = \
--without-gnome \
--disable-gtk-doc --without-html-dir
-LIBSOUP_DEPENDENCIES = gettext libintl host-pkgconfig host-libglib2 libglib2 libxml2
+LIBSOUP_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2 libglib2 libxml2
$(eval $(call AUTOTARGETS,package,libsoup))
diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk
index e489c9d..b93451b 100644
--- a/package/libusb/libusb.mk
+++ b/package/libusb/libusb.mk
@@ -58,7 +58,7 @@ $(TARGET_DIR)/$(LIBUSB_BINARY): $(STAGING_DIR)/usr/lib/libusb.so
cp -dpf $(STAGING_DIR)/usr/lib/libusb*.so* $(TARGET_DIR)/usr/lib/
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libusb*.so*
-libusb: host-pkgconfig $(TARGET_DIR)/$(LIBUSB_BINARY)
+libusb: host-pkg-config $(TARGET_DIR)/$(LIBUSB_BINARY)
libusb-clean:
rm -f $(STAGING_DIR)/bin/libusb-config
diff --git a/package/matchbox/matchbox.mk b/package/matchbox/matchbox.mk
index c8a3777..06e94cd 100644
--- a/package/matchbox/matchbox.mk
+++ b/package/matchbox/matchbox.mk
@@ -609,7 +609,7 @@ $(TARGET_DIR)/usr/bin/$(MATCHBOX_KB_BIN): $(STAGING_DIR)/usr/bin/$(MATCHBOX_KB_B
cp -af $(STAGING_DIR)/usr/share/matchbox/matchbox-keyboard $(TARGET_DIR)/usr/share/matchbox/
cp -dpf ./package/matchbox/mb-applet-kbd-wrapper.sh $(TARGET_DIR)/usr/bin/
-matchbox: host-pkgconfig expat $(MATCHBOX_WM_DEPS) $(MATCHBOX_SNOTIFY_DEPS) $(MATCHBOX_LIB_DEPS) $(TARGET_DIR)/usr/lib/libmb.so $(TARGET_DIR)/usr/bin/$(MATCHBOX_WM_BIN)
+matchbox: host-pkg-config expat $(MATCHBOX_WM_DEPS) $(MATCHBOX_SNOTIFY_DEPS) $(MATCHBOX_LIB_DEPS) $(TARGET_DIR)/usr/lib/libmb.so $(TARGET_DIR)/usr/bin/$(MATCHBOX_WM_BIN)
matchbox-panel: matchbox $(TARGET_DIR)/usr/bin/$(MATCHBOX_PL_BIN) $(TARGET_DIR)/usr/bin/matchbox-session $(MATCHBOX_PANEL_DEPS)
diff --git a/package/midori/midori.mk b/package/midori/midori.mk
index a82c5b4..400b528 100644
--- a/package/midori/midori.mk
+++ b/package/midori/midori.mk
@@ -11,6 +11,6 @@ MIDORI_AUTORECONF = YES
MIDORI_INSTALL_STAGING = NO
MIDORI_INSTALL_TARGET = YES
-MIDORI_DEPENDENCIES = host-pkgconfig webkit libsexy xserver_xorg-server
+MIDORI_DEPENDENCIES = host-pkg-config webkit libsexy xserver_xorg-server
$(eval $(call AUTOTARGETS,package,midori))
diff --git a/package/multimedia/gstreamer/gstreamer.mk b/package/multimedia/gstreamer/gstreamer.mk
index 76afa44..7f9c739 100644
--- a/package/multimedia/gstreamer/gstreamer.mk
+++ b/package/multimedia/gstreamer/gstreamer.mk
@@ -24,7 +24,7 @@ GSTREAMER_CONF_OPT = \
--disable-tests \
--disable-failing-tests
-GSTREAMER_DEPENDENCIES = libglib2 host-pkgconfig
+GSTREAMER_DEPENDENCIES = libglib2 host-pkg-config
ifeq ($(BR2_PACKAGE_GSTREAMER_LIBXML2),y)
GSTREAMER_DEPENDENCIES += libxml2
diff --git a/package/multimedia/libmms/libmms.mk b/package/multimedia/libmms/libmms.mk
index 2cf89d5..489bf0d 100644
--- a/package/multimedia/libmms/libmms.mk
+++ b/package/multimedia/libmms/libmms.mk
@@ -12,6 +12,6 @@ LIBMMS_LIBTOOL_PATCH = NO
LIBMMS_INSTALL_STAGING = YES
LIBMMS_INSTALL_TARGET = YES
-LIBMMS_DEPENDENCIES = host-pkgconfig libglib2
+LIBMMS_DEPENDENCIES = host-pkg-config libglib2
$(eval $(call AUTOTARGETS,package/multimedia,libmms))
diff --git a/package/multimedia/libogg/libogg.mk b/package/multimedia/libogg/libogg.mk
index 1608c38..02b1976 100644
--- a/package/multimedia/libogg/libogg.mk
+++ b/package/multimedia/libogg/libogg.mk
@@ -10,6 +10,6 @@ LIBOGG_AUTORECONF = NO
LIBOGG_INSTALL_STAGING = YES
LIBOGG_INSTALL_TARGET = YES
-LIBOGG_DEPENDENCIES = host-pkgconfig
+LIBOGG_DEPENDENCIES = host-pkg-config
$(eval $(call AUTOTARGETS,package/multimedia,libogg))
diff --git a/package/multimedia/libtheora/libtheora.mk b/package/multimedia/libtheora/libtheora.mk
index d6a9b2a..81eb83f 100644
--- a/package/multimedia/libtheora/libtheora.mk
+++ b/package/multimedia/libtheora/libtheora.mk
@@ -14,6 +14,6 @@ LIBTHEORA_CONF_OPT = \
--disable-sdltest \
--disable-examples
-LIBTHEORA_DEPENDENCIES = libogg libvorbis host-pkgconfig
+LIBTHEORA_DEPENDENCIES = libogg libvorbis host-pkg-config
$(eval $(call AUTOTARGETS,package/multimedia,libtheora))
diff --git a/package/multimedia/libvorbis/libvorbis.mk b/package/multimedia/libvorbis/libvorbis.mk
index 3cabd5e..d8c7869 100644
--- a/package/multimedia/libvorbis/libvorbis.mk
+++ b/package/multimedia/libvorbis/libvorbis.mk
@@ -13,11 +13,10 @@ LIBVORBIS_INSTALL_TARGET = YES
LIBVORBIS_CONF_OPT = --disable-oggtest
-LIBVORBIS_DEPENDENCIES = host-pkgconfig libogg
+LIBVORBIS_DEPENDENCIES = host-pkg-config libogg
$(eval $(call AUTOTARGETS,package/multimedia,libvorbis))
-
############################################################
#
# Toplevel Makefile options
diff --git a/package/multimedia/swfdec/swfdec.mk b/package/multimedia/swfdec/swfdec.mk
index 015d32e..d55568f 100644
--- a/package/multimedia/swfdec/swfdec.mk
+++ b/package/multimedia/swfdec/swfdec.mk
@@ -13,7 +13,7 @@ SWFDEC_LIBTOOL_PATCH = NO
SWFDEC_INSTALL_STAGING = YES
SWFDEC_INSTALL_TARGET = YES
-SWFDEC_DEPENDENCIES = liboil alsa-lib pango cairo host-pkgconfig
+SWFDEC_DEPENDENCIES = liboil alsa-lib pango cairo host-pkg-config
ifeq ($(BR2_PACKAGE_SWFDEC_GSTREAMER),y)
SWFDEC_DEPENDENCIES += gstreamer gst-plugins-base
diff --git a/package/neon/neon.mk b/package/neon/neon.mk
index 7f7f391..1f26a0c 100644
--- a/package/neon/neon.mk
+++ b/package/neon/neon.mk
@@ -9,7 +9,7 @@ NEON_INSTALL_STAGING:=YES
NEON_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR) install
NEON_CONF_OPT:=--enable-shared --without-gssapi --disable-rpath
-NEON_DEPENDENCIES:=host-pkgconfig
+NEON_DEPENDENCIES:=host-pkg-config
ifeq ($(BR2_PACKAGE_NEON_LIBXML2),y)
NEON_CONF_OPT+=--with-libxml2=yes
diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index f7bf0aa..6a86013 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -40,7 +40,7 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
PANGO_CONF_OPT = --enable-shared --enable-static \
--enable-explicit-deps=no --disable-debug
-PANGO_DEPENDENCIES = gettext libintl host-pkgconfig host-pango libglib2 cairo
+PANGO_DEPENDENCIES = gettext libintl host-pkg-config host-pango libglib2 cairo
ifeq ($(BR2_PACKAGE_XORG7),y)
PANGO_CONF_OPT += --with-x \
diff --git a/package/pcmanfm/pcmanfm.mk b/package/pcmanfm/pcmanfm.mk
index 3a300ca..370cf80 100644
--- a/package/pcmanfm/pcmanfm.mk
+++ b/package/pcmanfm/pcmanfm.mk
@@ -12,7 +12,7 @@ PCMANFM_INSTALL_TARGET = YES
PCMANFM_CONF_OPT = --disable-hal
-PCMANFM_DEPENDENCIES = host-pkgconfig libgtk2 gamin startup-notification xserver_xorg-server
+PCMANFM_DEPENDENCIES = host-pkg-config libgtk2 gamin startup-notification xserver_xorg-server
$(eval $(call AUTOTARGETS,package,pcmanfm))
diff --git a/package/shared-mime-info/shared-mime-info.mk b/package/shared-mime-info/shared-mime-info.mk
index 48895e0..b1833bb 100644
--- a/package/shared-mime-info/shared-mime-info.mk
+++ b/package/shared-mime-info/shared-mime-info.mk
@@ -12,7 +12,7 @@ SHARED_MIME_INFO_INSTALL_TARGET = NO
SHARED_MIME_INFO_AUTORECONF = NO
SHARED_MIME_INFO_CONF_ENV = XMLLINT=$(HOST_DIR)/usr/bin/xmllint
-SHARED_MIME_INFO_DEPENDENCIES = host-pkgconfig host-libglib2 host-libxml2 libxml2 libglib2
+SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config host-libglib2 host-libxml2 libxml2 libglib2
SHARED_MIME_INFO_CONF_OPT = --disable-update-mimedb
diff --git a/package/sylpheed/sylpheed.mk b/package/sylpheed/sylpheed.mk
index 1998523..96eca9c 100644
--- a/package/sylpheed/sylpheed.mk
+++ b/package/sylpheed/sylpheed.mk
@@ -13,7 +13,7 @@ SYLPHEED_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
SYLPHEED_CONF_OPT = --disable-gtkspell --program-prefix=""
-SYLPHEED_DEPENDENCIES = host-pkgconfig
+SYLPHEED_DEPENDENCIES = host-pkg-config
$(eval $(call AUTOTARGETS,package,sylpheed))
diff --git a/package/tiff/tiff.mk b/package/tiff/tiff.mk
index 9ec06a8..8db215e 100644
--- a/package/tiff/tiff.mk
+++ b/package/tiff/tiff.mk
@@ -15,7 +15,7 @@ TIFF_CONF_OPT = \
--disable-cxx \
--without-x \
-TIFF_DEPENDENCIES = host-pkgconfig zlib jpeg
+TIFF_DEPENDENCIES = host-pkg-config zlib jpeg
$(eval $(call AUTOTARGETS,package,tiff))
diff --git a/package/usbutils/usbutils.mk b/package/usbutils/usbutils.mk
index 1d21a08..ef01403 100644
--- a/package/usbutils/usbutils.mk
+++ b/package/usbutils/usbutils.mk
@@ -6,7 +6,7 @@
USBUTILS_VERSION = 0.86
USBUTILS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-usb/
-USBUTILS_DEPENDENCIES = host-pkgconfig
+USBUTILS_DEPENDENCIES = host-pkg-config
ifeq ($(BR2_PACKAGE_USBUTILS_ZLIB),y)
USBUTILS_DEPENDENCIES += zlib
diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index 5d78573..7edab84 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -19,7 +19,7 @@ ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y)
WPA_SUPPLICANT_DEPENDENCIES += openssl
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
- WPA_SUPPLICANT_DEPENDENCIES += host-pkgconfig dbus
+ WPA_SUPPLICANT_DEPENDENCIES += host-pkg-config dbus
WPA_SUPPLICANT_MAKE_ENV = \
PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
diff --git a/package/x11r7/xfont_font-util/xfont_font-util.mk b/package/x11r7/xfont_font-util/xfont_font-util.mk
index 0c9dc29..38e7e80 100644
--- a/package/x11r7/xfont_font-util/xfont_font-util.mk
+++ b/package/x11r7/xfont_font-util/xfont_font-util.mk
@@ -59,7 +59,7 @@ $(XFONT_FONT_UTIL_DIR)/.hacked: $(XFONT_FONT_UTIL_DIR)/.installed
( package/x11r7/xfont_font-util/post-install.sh $(STAGING_DIR) )
touch $@
-xfont_font-util: host-pkgconfig $(XFONT_FONT_UTIL_DIR)/.hacked
+xfont_font-util: host-pkg-config $(XFONT_FONT_UTIL_DIR)/.hacked
xfont_font-util-unpacked: $(XFONT_FONT_UTIL_DIR)/.unpacked
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 09/39] Add package statistics script
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (7 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 08/39] host-pkgconfig is now host-pkg-config Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 10/39] autoconf: convert to autotools infrastructure for host package Thomas Petazzoni
` (31 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
scripts/pkg-stats | 200 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 200 insertions(+), 0 deletions(-)
create mode 100755 scripts/pkg-stats
diff --git a/scripts/pkg-stats b/scripts/pkg-stats
new file mode 100755
index 0000000..0ed420d
--- /dev/null
+++ b/scripts/pkg-stats
@@ -0,0 +1,200 @@
+#!/bin/bash
+
+# Copyright (C) 2009 by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# This script generates an HTML file that contains a report about all
+# Buildroot packages, their usage of the different package
+# infrastructure and possible cleanup actions
+#
+# Run the script from the Buildroot toplevel directory:
+#
+# ./scripts/pkg-stats > /tmp/pkg.html
+#
+
+echo "<head>
+<style type=\"text/css\">
+table {
+ width: 100%;
+}
+td {
+ border: 1px solid black;
+}
+td.centered {
+ text-align: center;
+}
+</style>
+</head>
+
+<a href=\"#results\">Results</a><br/>
+
+<table>
+<tr>
+<td rowspan=\"2\">Id</td>
+<td rowspan=\"2\">Package</td>
+<td colspan=\"2\" class=\"centered\">AUTOTARGETS</td>
+<td colspan=\"2\" class=\"centered\">GENTARGETS</td>
+<td colspan=\"2\" class=\"centered\">manual</td>
+<td rowspan=\"2\" class=\"centered\">Actions</td>
+</tr>
+<tr>
+<td class=\"centered\">host</td>
+<td class=\"centered\">target</td>
+<td class=\"centered\">host</td>
+<td class=\"centered\">target</td>
+<td class=\"centered\">host</td>
+<td class=\"centered\">target</td>
+</tr>"
+
+convert_to_generic_target=0
+convert_to_generic_host=0
+convert_to_autotools=0
+cnt=1
+for i in $(find package/ -name '*.mk') ; do
+
+ if test $i = "package/mtd/mtd.mk" -o \
+ $i = "package/java/java.mk" -o \
+ $i = "package/database/database.mk" -o \
+ $i = "package/editors/editors.mk" -o \
+ $i = "package/games/games.mk" -o \
+ $i = "package/multimedia/multimedia" -o \
+ $i = "package/customize/customize.mk" -o \
+ $i = "package/gnuconfig/gnuconfig.mk" -o \
+ $i = "package/x11r7/x11r7.mk" ; then
+ echo "skipping $i" 1>&2
+ continue
+ fi
+
+ found=0
+
+ echo "<tr>"
+ echo "<td>$cnt</td>"
+ cnt=$((cnt+1))
+ echo "<td>$i</td>"
+
+ is_auto_host=0
+ is_auto_target=0
+ is_pkg_target=0
+ is_pkg_host=0
+ is_manual_target=0
+ is_manual_host=0
+
+ echo "<td class=\"centered\">"
+ if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then
+ is_auto_host=1
+ echo "<b>YES</b>"
+ else
+ echo "NO"
+ fi
+
+ echo "<td class=\"centered\">"
+ if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then
+ found=1
+ is_auto_target=1
+ echo "<b>YES</b>"
+ else
+ echo "NO"
+ fi
+ echo "</td>"
+
+ echo "<td class=\"centered\">"
+ if grep -E "\(call GENTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then
+ found=1
+ is_pkg_host=1
+ echo "<b>YES</b>"
+ else
+ echo "NO"
+ fi
+ echo "</td>"
+
+ echo "<td class=\"centered\">"
+ if grep -E "\(call GENTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then
+ found=1
+ is_pkg_target=1
+ echo "<b>YES</b>"
+ else
+ echo "NO"
+ fi
+ echo "</td>"
+
+ pkg=$(basename $i)
+ pkg=${pkg%.mk}
+
+ echo "<td class=\"centered\">"
+ if grep "^host-$pkg:" $i > /dev/null ; then
+ found=1
+ is_manual_host=1
+ echo "<b>YES</b>"
+ else
+ echo "NO"
+ fi
+ echo "</td>"
+
+ echo "<td class=\"centered\">"
+ if grep "^$pkg:" $i > /dev/null ; then
+ found=1
+ is_manual_target=1
+ echo "<b>YES</b>"
+ else
+ echo "NO"
+ fi
+ echo "</td>"
+
+ echo "<td>"
+ echo "<ul>"
+ if [ $is_manual_target -eq 1 ]; then
+ echo "<li>convert to generic target</li>"
+ convert_to_generic_target=$((convert_to_generic_target+1))
+ fi
+ if [ $is_manual_host -eq 1 ]; then
+ echo "<li>convert to generic host</li>"
+ convert_to_generic_host=$((convert_to_generic_host+1))
+ fi
+ if grep "\./configure" $i > /dev/null ; then
+ if [ $is_manual_host -ne 1 ] ; then
+ echo "<li>convert package to autotools ?</li>"
+ convert_to_autotools=$((convert_to_autotools+1))
+ fi
+ fi
+ if [ $found -eq 0 ] ; then
+ echo "<li>look manually</li>"
+ fi
+ echo "</ul>"
+ echo "</td>"
+
+ echo "</tr>"
+
+done
+echo "</table>"
+
+echo "<table>"
+echo "<tr>"
+echo "<td>Packages to convert to generic target</td>"
+echo "<td>$convert_to_generic_target</td>"
+echo "</tr>"
+echo "<tr>"
+echo "<td>Packages to convert to generic host</td>"
+echo "<td>$convert_to_generic_host</td>"
+echo "</tr>"
+echo "<tr>"
+echo "<td>Packages to convert to autotools</td>"
+echo "<td>$convert_to_autotools</td>"
+echo "</tr>"
+echo "<tr>"
+echo "<td>TOTAL</td>"
+echo "<td>$cnt</td>"
+echo "</tr>"
+echo "</table>"
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 10/39] autoconf: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (8 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 09/39] Add package statistics script Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 11/39] autoconf: bump version to 2.65 Thomas Petazzoni
` (30 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/autoconf/autoconf.mk | 51 +++++-------------------------------------
1 files changed, 6 insertions(+), 45 deletions(-)
diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk
index 931d551..a94f23e 100644
--- a/package/autoconf/autoconf.mk
+++ b/package/autoconf/autoconf.mk
@@ -16,53 +16,14 @@ AUTOCONF_CONF_ENV = EMACS="no" ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \
AUTOCONF_DEPENDENCIES = microperl host-m4
-$(eval $(call AUTOTARGETS,package,autoconf))
+HOST_AUTOCONF_CONF_ENV = ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \
+ ac_cv_prog_gnu_m4_gnu=no
+
+HOST_AUTOCONF_DEPENDENCIES = host-m4 host-libtool
-# autoconf for the host
-AUTOCONF_HOST_DIR:=$(BUILD_DIR)/autoconf-$(AUTOCONF_VERSION)-host
+$(eval $(call AUTOTARGETS,package,autoconf))
+$(eval $(call AUTOTARGETS,package,autoconf,host))
# variables used by other packages
AUTOCONF:=$(HOST_DIR)/usr/bin/autoconf
AUTORECONF=$(HOST_CONFIGURE_OPTS) ACLOCAL="$(ACLOCAL)" $(HOST_DIR)/usr/bin/autoreconf -v -f -i -I "$(ACLOCAL_DIR)"
-
-$(DL_DIR)/$(AUTOCONF_SOURCE):
- $(call DOWNLOAD,$(AUTOCONF_SITE),$(AUTOCONF_SOURCE))
-
-$(STAMP_DIR)/host_autoconf_unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE)
- mkdir -p $(AUTOCONF_HOST_DIR)
- $(INFLATE$(suffix $(AUTOCONF_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(AUTOCONF_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(AUTOCONF_HOST_DIR) package/autoconf/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_autoconf_configured: $(STAMP_DIR)/host_autoconf_unpacked $(STAMP_DIR)/host_m4_installed $(STAMP_DIR)/host_libtool_installed
- (cd $(AUTOCONF_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \
- ac_cv_prog_gnu_m4_gnu=no \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --disable-static \
- )
- touch $@
-
-$(STAMP_DIR)/host_autoconf_compiled: $(STAMP_DIR)/host_autoconf_configured
- $(MAKE) -C $(AUTOCONF_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_autoconf_installed: $(STAMP_DIR)/host_autoconf_compiled
- $(MAKE) -C $(AUTOCONF_HOST_DIR) install
- touch $@
-
-host-autoconf: $(STAMP_DIR)/host_autoconf_installed
-
-host-autoconf-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_autoconf_,unpacked configured compiled installed)
- -$(MAKE) -C $(AUTOCONF_HOST_DIR) uninstall
- -$(MAKE) -C $(AUTOCONF_HOST_DIR) clean
-
-host-autoconf-dirclean:
- rm -rf $(AUTOCONF_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 11/39] autoconf: bump version to 2.65
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (9 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 10/39] autoconf: convert to autotools infrastructure for host package Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 12/39] autoconf: add patch to make it work under dash Thomas Petazzoni
` (29 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/autoconf/autoconf.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk
index a94f23e..d82c2c5 100644
--- a/package/autoconf/autoconf.mk
+++ b/package/autoconf/autoconf.mk
@@ -3,7 +3,7 @@
# autoconf
#
#############################################################
-AUTOCONF_VERSION = 2.64
+AUTOCONF_VERSION = 2.65
AUTOCONF_SOURCE = autoconf-$(AUTOCONF_VERSION).tar.bz2
AUTOCONF_SITE = $(BR2_GNU_MIRROR)/autoconf
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 12/39] autoconf: add patch to make it work under dash
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (10 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 11/39] autoconf: bump version to 2.65 Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 13/39] automake: convert to autotools infrastructure for host package Thomas Petazzoni
` (28 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
autoconf >= 2.64 was broken when /bin/sh is symlinked to dash. This
has been fixed post-2.65 by the commit at
http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=7f75858f577f11a844781764f30cd42cfe8a5669.
Compared to the original patch, the patch included in Buildroot
manually does the change to the ./configure script itself. Otherwise,
the compilation of host-autoconf would require host-autoconf itself.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
...toconf-2.65-fix-m4-detection-test-on-dash.patch | 36 ++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch
diff --git a/package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch b/package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch
new file mode 100644
index 0000000..35f99b2
--- /dev/null
+++ b/package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch
@@ -0,0 +1,36 @@
+Patch taken upstream at
+http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=7f75858f577f11a844781764f30cd42cfe8a5669,
+with the following modifications:
+
+ * Changes to NEWS file removed to avoid conflicts
+
+ * Changes also made manually to the generated configure
+ script. Otherwise, host-autoconf is needed to compile
+ host-autoconf !
+
+Index: autoconf-2.65.old/configure
+===================================================================
+--- autoconf-2.65.old.orig/configure 2009-12-15 16:11:05.175566911 +0100
++++ autoconf-2.65.old/configure 2009-12-15 16:11:37.739562146 +0100
+@@ -2380,7 +2380,7 @@
+ ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
+ ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
+ test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
+- && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
++ && test -z "`$as_echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
+ && test -f conftest.m4f \
+ && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
+ rm -f conftest.m4f
+Index: autoconf-2.65.old/m4/m4.m4
+===================================================================
+--- autoconf-2.65.old.orig/m4/m4.m4 2009-12-15 16:11:05.207566124 +0100
++++ autoconf-2.65.old/m4/m4.m4 2009-12-15 16:11:18.595562030 +0100
+@@ -29,7 +29,7 @@
+ ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
+ ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
+ test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
+- && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
++ && test -z "`AS_ECHO([$ac_snippet]) | $ac_path_M4 --trace=mac 2>&1`" \
+ && test -f conftest.m4f \
+ && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
+ rm -f conftest.m4f],
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 13/39] automake: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (11 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 12/39] autoconf: add patch to make it work under dash Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 14/39] cairo: " Thomas Petazzoni
` (27 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/automake/automake.mk | 47 ++---------------------------------------
1 files changed, 3 insertions(+), 44 deletions(-)
diff --git a/package/automake/automake.mk b/package/automake/automake.mk
index 82ae9be..65db386 100644
--- a/package/automake/automake.mk
+++ b/package/automake/automake.mk
@@ -13,53 +13,12 @@ endif
AUTOMAKE_DEPENDENCIES = autoconf microperl
-$(eval $(call AUTOTARGETS,package,automake))
+HOST_AUTOMAKE_DEPENDENCIES = host-autoconf
-# automake for the host
-AUTOMAKE_HOST_DIR:=$(BUILD_DIR)/automake-$(AUTOMAKE_VERSION)-host
+$(eval $(call AUTOTARGETS,package,automake))
+$(eval $(call AUTOTARGETS,package,automake,host))
# variables used by other packages
AUTOMAKE:=$(HOST_DIR)/usr/bin/automake
ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
ACLOCAL = $(HOST_DIR)/usr/bin/aclocal -I $(ACLOCAL_DIR)
-
-$(DL_DIR)/$(AUTOMAKE_SOURCE):
- $(call DOWNLOAD,$(AUTOMAKE_SITE),$(AUTOMAKE_SOURCE))
-
-$(STAMP_DIR)/host_automake_unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
- mkdir -p $(AUTOMAKE_HOST_DIR)
- $(INFLATE$(suffix $(AUTOMAKE_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(AUTOMAKE_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(AUTOMAKE_HOST_DIR) package/automake/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_automake_configured: $(STAMP_DIR)/host_automake_unpacked $(STAMP_DIR)/host_autoconf_installed
- (cd $(AUTOMAKE_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --disable-static \
- )
- touch $@
-
-$(STAMP_DIR)/host_automake_compiled: $(STAMP_DIR)/host_automake_configured
- $(MAKE) -C $(AUTOMAKE_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_automake_installed: $(STAMP_DIR)/host_automake_compiled
- $(MAKE) -C $(AUTOMAKE_HOST_DIR) install
- mkdir -p $(STAGING_DIR)/usr/share/aclocal
- touch $@
-
-host-automake: $(STAMP_DIR)/host_automake_installed
-
-host-automake-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_automake_,unpacked configured compiled installed)
- -$(MAKE) -C $(AUTOMAKE_HOST_DIR) uninstall
- -$(MAKE) -C $(AUTOMAKE_HOST_DIR) clean
-
-host-automake-dirclean:
- rm -rf $(AUTOMAKE_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 14/39] cairo: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (12 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 13/39] automake: convert to autotools infrastructure for host package Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 15/39] libglib2: " Thomas Petazzoni
` (26 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/cairo/cairo.mk | 48 +++++-------------------------------------------
1 files changed, 5 insertions(+), 43 deletions(-)
diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index 2608e14..0ca99aa 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -79,53 +79,15 @@ else
CAIRO_CONF_OPT += --disable-svg
endif
-$(eval $(call AUTOTARGETS,package,cairo))
-
-# cairo for the host
-CAIRO_HOST_DIR:=$(BUILD_DIR)/cairo-$(CAIRO_VERSION)-host
-
-$(DL_DIR)/$(CAIRO_SOURCE):
- $(call DOWNLOAD,$(CAIRO_SITE),$(CAIRO_SOURCE))
+HOST_CAIRO_DEPENDENCIES = host-pkg-config host-pixman host-fontconfig
-$(STAMP_DIR)/host_cairo_unpacked: $(DL_DIR)/$(CAIRO_SOURCE)
- mkdir -p $(CAIRO_HOST_DIR)
- $(INFLATE$(suffix $(CAIRO_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(CAIRO_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_cairo_configured: $(STAMP_DIR)/host_cairo_unpacked $(STAMP_DIR)/host_pkgconfig_installed $(STAMP_DIR)/host_fontconfig_installed $(STAMP_DIR)/host_pixman_installed
- (cd $(CAIRO_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_CAIRO_CONF_OPT = \
--enable-ps \
--enable-pdf \
--enable-xlib \
--with-x \
--disable-png \
- --disable-svg \
- )
- touch $@
-
-$(STAMP_DIR)/host_cairo_compiled: $(STAMP_DIR)/host_cairo_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(CAIRO_HOST_DIR)
- touch $@
+ --disable-svg
-$(STAMP_DIR)/host_cairo_installed: $(STAMP_DIR)/host_cairo_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(CAIRO_HOST_DIR) install
- touch $@
-
-host-cairo: $(STAMP_DIR)/host_cairo_installed
-
-host-cairo-source: cairo-source
-
-host-cairo-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_cairo_,unpacked configured compiled installed)
- -$(MAKE) -C $(CAIRO_HOST_DIR) uninstall
- -$(MAKE) -C $(CAIRO_HOST_DIR) clean
-
-host-cairo-dirclean:
- rm -rf $(CAIRO_HOST_DIR)
+$(eval $(call AUTOTARGETS,package,cairo))
+$(eval $(call AUTOTARGETS,package,cairo,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 15/39] libglib2: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (13 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 14/39] cairo: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 16/39] libtool: " Thomas Petazzoni
` (25 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libglib2/libglib2.mk | 55 +++++++-----------------------------------
1 files changed, 9 insertions(+), 46 deletions(-)
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index ea96707..04e3f2d 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -49,8 +49,16 @@ LIBGLIB2_CONF_ENV = \
LIBGLIB2_CONF_OPT = --enable-shared \
--enable-static
+HOST_LIBGLIB2_CONF_OPT = \
+ --enable-shared \
+ --disable-static \
+ --disable-gtk-doc \
+ --enable-debug=no \
+
LIBGLIB2_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2
+HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config
+
ifneq ($(BR2_ENABLE_LOCALE),y)
LIBGLIB2_DEPENDENCIES+=libiconv
endif
@@ -61,51 +69,6 @@ LIBGLIB2_DEPENDENCIES+=libiconv
endif
$(eval $(call AUTOTARGETS,package,libglib2))
+$(eval $(call AUTOTARGETS,package,libglib2,host))
-# libglib2 for the host
-LIBGLIB2_HOST_DIR:=$(BUILD_DIR)/libglib2-$(LIBGLIB2_VERSION)-host
LIBGLIB2_HOST_BINARY:=$(HOST_DIR)/usr/bin/glib-genmarshal
-
-$(DL_DIR)/$(LIBGLIB2_SOURCE):
- $(call DOWNLOAD,$(LIBGLIB2_SITE),$(LIBGLIB2_SOURCE))
-
-$(STAMP_DIR)/host_libglib2_unpacked: $(DL_DIR)/$(LIBGLIB2_SOURCE)
- mkdir -p $(LIBGLIB2_HOST_DIR)
- $(INFLATE$(suffix $(LIBGLIB2_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBGLIB2_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_libglib2_configured: $(STAMP_DIR)/host_libglib2_unpacked $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(LIBGLIB2_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --enable-shared \
- --disable-static \
- --disable-gtk-doc \
- --enable-debug=no \
- )
- touch $@
-
-$(STAMP_DIR)/host_libglib2_compiled: $(STAMP_DIR)/host_libglib2_configured
- $(MAKE) -C $(LIBGLIB2_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_libglib2_installed: $(STAMP_DIR)/host_libglib2_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(LIBGLIB2_HOST_DIR) install
- touch $@
-
-host-libglib2: $(STAMP_DIR)/host_libglib2_installed
-
-host-libglib2-source: libglib2-source
-
-host-libglib2-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_libglib2_,unpacked configured compiled installed)
- -$(MAKE) -C $(LIBGLIB2_HOST_DIR) uninstall
- -$(MAKE) -C $(LIBGLIB2_HOST_DIR) clean
-
-host-libglib2-dirclean:
- rm -rf $(LIBGLIB2_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 16/39] libtool: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (14 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 15/39] libglib2: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 17/39] pango: " Thomas Petazzoni
` (24 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libtool/libtool.mk | 51 ++++++-------------------------------------
1 files changed, 7 insertions(+), 44 deletions(-)
diff --git a/package/libtool/libtool.mk b/package/libtool/libtool.mk
index 14d0835..bbabbb0 100644
--- a/package/libtool/libtool.mk
+++ b/package/libtool/libtool.mk
@@ -11,54 +11,17 @@ ifeq ($(BR2_ENABLE_DEBUG),y) # install-exec doesn't install aclocal stuff
LIBTOOL_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
endif
-$(eval $(call AUTOTARGETS,package,libtool))
-
-# libtool for the host
-LIBTOOL_HOST_DIR:=$(BUILD_DIR)/libtool-$(LIBTOOL_VERSION)-host
-
-# variables used by other packages
-LIBTOOL:=$(HOST_DIR)/usr/bin/libtool
-
-$(DL_DIR)/$(LIBTOOL_SOURCE):
- $(call DOWNLOAD,$(LIBTOOL_SITE),$(LIBTOOL_SOURCE))
-
-$(STAMP_DIR)/host_libtool_unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
- mkdir -p $(LIBTOOL_HOST_DIR)
- $(INFLATE$(suffix $(LIBTOOL_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBTOOL_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(LIBTOOL_HOST_DIR) package/libtool/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_libtool_configured: $(STAMP_DIR)/host_libtool_unpacked
- (cd $(LIBTOOL_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --disable-static \
- )
- touch $@
-
-$(STAMP_DIR)/host_libtool_compiled: $(STAMP_DIR)/host_libtool_configured
- $(MAKE) -C $(LIBTOOL_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_libtool_installed: $(STAMP_DIR)/host_libtool_compiled
- $(MAKE) -C $(LIBTOOL_HOST_DIR) install
+define HOST_LIBTOOL_CUSTOM_INSTALL
install -D -m 0644 $(HOST_DIR)/usr/share/aclocal/libtool.m4 \
$(STAGING_DIR)/usr/share/aclocal/libtool.m4
install -D -m 0644 $(HOST_DIR)/usr/share/aclocal/ltdl.m4 \
$(STAGING_DIR)/usr/share/aclocal/ltdl.m4
- touch $@
+endef
-host-libtool: $(STAMP_DIR)/host_libtool_installed
+HOST_LIBTOOL_POST_INSTALL_HOOKS += HOST_LIBTOOL_CUSTOM_INSTALL
-host-libtool-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_libtool_,unpacked configured compiled installed)
- -$(MAKE) -C $(LIBTOOL_HOST_DIR) uninstall
- -$(MAKE) -C $(LIBTOOL_HOST_DIR) clean
+$(eval $(call AUTOTARGETS,package,libtool))
+$(eval $(call AUTOTARGETS,package,libtool,host))
-host-libtool-dirclean:
- rm -rf $(LIBTOOL_HOST_DIR)
+# variables used by other packages
+LIBTOOL:=$(HOST_DIR)/usr/bin/libtool
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 17/39] pango: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (15 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 16/39] libtool: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 18/39] atk: " Thomas Petazzoni
` (23 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pango/pango.mk | 56 ++++++++---------------------------------------
1 files changed, 10 insertions(+), 46 deletions(-)
diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index 6a86013..38e163e 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -40,8 +40,17 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
PANGO_CONF_OPT = --enable-shared --enable-static \
--enable-explicit-deps=no --disable-debug
+HOST_PANGO_CONF_OPT = \
+ --disable-static \
+ $(if $(BR2_PACKAGE_XORG7),--with-x,--without-x) \
+ --disable-debug \
+
PANGO_DEPENDENCIES = gettext libintl host-pkg-config host-pango libglib2 cairo
+HOST_PANGO_DEPENDENCIES = host-pkg-config host-cairo host-libglib2 host-autoconf host-automake
+
+HOST_PANGO_AUTORECONF = YES
+
ifeq ($(BR2_PACKAGE_XORG7),y)
PANGO_CONF_OPT += --with-x \
--x-includes=$(STAGING_DIR)/usr/include/X11 \
@@ -52,6 +61,7 @@ else
endif
$(eval $(call AUTOTARGETS,package,pango))
+$(eval $(call AUTOTARGETS,package,pango,host))
$(PANGO_HOOK_POST_INSTALL):
mkdir -p $(TARGET_DIR)/etc/pango
@@ -59,50 +69,4 @@ $(PANGO_HOOK_POST_INSTALL):
$(SED) 's~$(HOST_DIR)~~g' $(TARGET_DIR)/etc/pango/pango.modules
touch $@
-# pango for the host
-PANGO_HOST_DIR:=$(BUILD_DIR)/pango-$(PANGO_VERSION)-host
PANGO_HOST_BINARY:=$(HOST_DIR)/usr/bin/pango-querymodules
-
-$(DL_DIR)/$(PANGO_SOURCE):
- $(call DOWNLOAD,$(PANGO_SITE),$(PANGO_SOURCE))
-
-$(STAMP_DIR)/host_pango_unpacked: $(DL_DIR)/$(PANGO_SOURCE)
- mkdir -p $(PANGO_HOST_DIR)
- $(INFLATE$(suffix $(PANGO_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(PANGO_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(PANGO_HOST_DIR) package/pango/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_pango_configured: $(STAMP_DIR)/host_pango_unpacked $(STAMP_DIR)/host_cairo_installed $(STAMP_DIR)/host_libglib2_installed $(STAMP_DIR)/host_autoconf_installed $(STAMP_DIR)/host_automake_installed
- (cd $(PANGO_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --disable-static \
- $(if $(BR2_PACKAGE_XORG7),--with-x,--without-x) \
- --disable-debug \
- )
- touch $@
-
-$(STAMP_DIR)/host_pango_compiled: $(STAMP_DIR)/host_pango_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(PANGO_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_pango_installed: $(STAMP_DIR)/host_pango_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(PANGO_HOST_DIR) install
- touch $@
-
-host-pango: $(STAMP_DIR)/host_pango_installed
-
-host-pango-source: pango-source
-
-host-pango-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_pango_,unpacked configured compiled installed)
- -$(MAKE) -C $(PANGO_HOST_DIR) uninstall
- -$(MAKE) -C $(PANGO_HOST_DIR) clean
-
-host-pango-dirclean:
- rm -rf $(PANGO_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 18/39] atk: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (16 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 17/39] pango: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 19/39] dbus: " Thomas Petazzoni
` (22 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/atk/atk.mk | 48 +++++-------------------------------------------
1 files changed, 5 insertions(+), 43 deletions(-)
diff --git a/package/atk/atk.mk b/package/atk/atk.mk
index 1e8e576..e357f49 100644
--- a/package/atk/atk.mk
+++ b/package/atk/atk.mk
@@ -53,50 +53,12 @@ endif
ATK_DEPENDENCIES = libglib2 host-pkg-config
-$(eval $(call AUTOTARGETS,package,atk))
-
-# atk for the host
-ATK_HOST_DIR:=$(BUILD_DIR)/atk-$(ATK_VERSION)-host
-
-$(DL_DIR)/$(ATK_SOURCE):
- $(call DOWNLOAD,$(ATK_SITE),$(ATK_SOURCE))
+HOST_ATK_DEPENDENCIES = host-libglib2 host-pkg-config
-$(STAMP_DIR)/host_atk_unpacked: $(DL_DIR)/$(ATK_SOURCE)
- mkdir -p $(ATK_HOST_DIR)
- $(INFLATE$(suffix $(ATK_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(ATK_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_atk_configured: $(STAMP_DIR)/host_atk_unpacked $(STAMP_DIR)/host_libglib2_installed $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(ATK_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_ATK_CONF_OPT = \
--enable-shared \
--disable-static \
- --disable-glibtest \
- )
- touch $@
-
-$(STAMP_DIR)/host_atk_compiled: $(STAMP_DIR)/host_atk_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(ATK_HOST_DIR)
- touch $@
+ --disable-glibtest
-$(STAMP_DIR)/host_atk_installed: $(STAMP_DIR)/host_atk_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(ATK_HOST_DIR) install
- touch $@
-
-host-atk: $(STAMP_DIR)/host_atk_installed
-
-host-atk-source: atk-source
-
-host-atk-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_atk_,unpacked configured compiled installed)
- -$(MAKE) -C $(ATK_HOST_DIR) uninstall
- -$(MAKE) -C $(ATK_HOST_DIR) clean
-
-host-atk-dirclean:
- rm -rf $(ATK_HOST_DIR)
+$(eval $(call AUTOTARGETS,package,atk))
+$(eval $(call AUTOTARGETS,package,atk,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 19/39] dbus: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (17 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 18/39] atk: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 20/39] directfb: " Thomas Petazzoni
` (21 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/dbus/dbus.mk | 72 +++++++++++++------------------------------------
1 files changed, 19 insertions(+), 53 deletions(-)
diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk
index 2780df6..ae65b7d 100644
--- a/package/dbus/dbus.mk
+++ b/package/dbus/dbus.mk
@@ -49,41 +49,8 @@ else
DBUS_CONF_OPT += --without-x
endif
-$(eval $(call AUTOTARGETS,package,dbus))
-
-# fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink)
-$(DBUS_HOOK_POST_BUILD): $(DBUS_TARGET_BUILD)
- rm -rf $(TARGET_DIR)/var/lib/dbus
- touch $@
-
-$(DBUS_HOOK_POST_INSTALL): $(DBUS_TARGET_INSTALL_TARGET)
- rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
- rm -rf $(TARGET_DIR)/var/lib/dbus
- ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus
- $(INSTALL) -m 0755 package/dbus/S30dbus $(TARGET_DIR)/etc/init.d
- touch $@
-
-# dbus for the host
-DBUS_HOST_DIR:=$(BUILD_DIR)/dbus-$(DBUS_VERSION)-host
-DBUS_HOST_INTROSPECT:=$(DBUS_HOST_DIR)/introspect.xml
-
-$(DL_DIR)/$(DBUS_SOURCE):
- $(call DOWNLOAD,$(DBUS_SITE),$(DBUS_SOURCE))
-
-$(STAMP_DIR)/host_dbus_unpacked: $(DL_DIR)/$(DBUS_SOURCE)
- mkdir -p $(DBUS_HOST_DIR)
- $(INFLATE$(suffix $(DBUS_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(DBUS_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_dbus_configured: $(STAMP_DIR)/host_dbus_unpacked $(STAMP_DIR)/host_expat_installed $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(DBUS_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_DBUS_DEPENDENCIES = host-pkg-config host-expat
+HOST_DBUS_CONF_OPT = \
--with-dbus-user=dbus \
--disable-tests \
--disable-asserts \
@@ -94,28 +61,27 @@ $(STAMP_DIR)/host_dbus_configured: $(STAMP_DIR)/host_dbus_unpacked $(STAMP_DIR)/
--disable-static \
--enable-dnotify \
--without-x \
- --with-xml=expat \
- )
- touch $@
+ --with-xml=expat
-$(STAMP_DIR)/host_dbus_compiled: $(STAMP_DIR)/host_dbus_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(DBUS_HOST_DIR)
- touch $@
+# dbus for the host
+DBUS_HOST_INTROSPECT:=$(DBUS_HOST_DIR)/introspect.xml
-$(STAMP_DIR)/host_dbus_installed: $(STAMP_DIR)/host_dbus_compiled
- $(MAKE) -C $(DBUS_HOST_DIR) install
+HOST_DBUS_GEN_INTROSPECT = \
$(HOST_DIR)/usr/bin/dbus-daemon --introspect > $(DBUS_HOST_INTROSPECT)
- touch $@
-host-dbus: $(STAMP_DIR)/host_dbus_installed
+HOST_DBUS_POST_INSTALL_HOOKS += HOST_DBUS_GEN_INTROSPECT
-host-dbus-source: dbus-source
+$(eval $(call AUTOTARGETS,package,dbus))
+$(eval $(call AUTOTARGETS,package,dbus,host))
-host-dbus-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_dbus_,unpacked configured compiled installed)
- rm -f $(DBUS_HOST_INTROSPECT)
- -$(MAKE) -C $(DBUS_HOST_DIR) uninstall
- -$(MAKE) -C $(DBUS_HOST_DIR) clean
+# fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink)
+$(DBUS_HOOK_POST_BUILD): $(DBUS_TARGET_BUILD)
+ rm -rf $(TARGET_DIR)/var/lib/dbus
+ touch $@
-host-dbus-dirclean:
- rm -rf $(DBUS_HOST_DIR)
+$(DBUS_HOOK_POST_INSTALL): $(DBUS_TARGET_INSTALL_TARGET)
+ rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
+ rm -rf $(TARGET_DIR)/var/lib/dbus
+ ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus
+ $(INSTALL) -m 0755 package/dbus/S30dbus $(TARGET_DIR)/etc/init.d
+ touch $@
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 20/39] directfb: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (18 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 19/39] dbus: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 21/39] fontconfig: " Thomas Petazzoni
` (20 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/directfb/directfb.mk | 55 ++++++++---------------------------------
1 files changed, 11 insertions(+), 44 deletions(-)
diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk
index eb492cd..57b2e17 100644
--- a/package/directfb/directfb.mk
+++ b/package/directfb/directfb.mk
@@ -150,56 +150,23 @@ DIRECTFB_CONF_OPT = \
DIRECTFB_DEPENDENCIES = $(DIRECTFB_DEP) freetype $(DIRECTFB_FUSION)
-$(eval $(call AUTOTARGETS,package,directfb))
-
-
-# directfb-csource for the host
-
-DIRECTFB_HOST_DIR:=$(BUILD_DIR)/directfb-$(DIRECTFB_VERSION)-host
-DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource
-
-$(DL_DIR)/$(DIRECTFB_SOURCE):
- $(call DOWNLOAD,$(DIRECTFB_SITE),$(DIRECTFB_SOURCE))
-
-$(STAMP_DIR)/host_directfb_unpacked: $(DL_DIR)/$(DIRECTFB_SOURCE)
- mkdir -p $(DIRECTFB_HOST_DIR)
- $(INFLATE$(suffix $(DIRECTFB_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(DIRECTFB_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_directfb_configured: $(STAMP_DIR)/host_directfb_unpacked $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(DIRECTFB_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_DIRECTFB_DEPENDENCIES = host-pkg-config
+HOST_DIRECTFB_CONF_OPT = \
--enable-shared \
--disable-static \
--disable-debug \
--disable-multi \
--with-gfxdrivers=none \
- --with-inputdrivers=none \
- )
- touch $@
-
-$(STAMP_DIR)/host_directfb_compiled: $(STAMP_DIR)/host_directfb_configured
- $(MAKE) -C $(DIRECTFB_HOST_DIR)/tools directfb-csource
- touch $@
-
-$(STAMP_DIR)/host_directfb_installed: $(STAMP_DIR)/host_directfb_compiled
- $(INSTALL) -m 0755 $(DIRECTFB_HOST_DIR)/tools/directfb-csource $(HOST_DIR)/usr/bin
- touch $@
+ --with-inputdrivers=none
-host-directfb: $(STAMP_DIR)/host_directfb_installed
+HOST_DIRECTFB_BUILD_CMDS = \
+ $(MAKE) -C $(@D)/tools directfb-csource
-host-directfb-source: directfb-source
+HOST_DIRECTFB_INSTALL_CMDS = \
+ $(INSTALL) -m 0755 $(@D)/tools/directfb-csource $(HOST_DIR)/usr/bin
-host-directfb-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_directfb_,unpacked configured compiled installed)
- rm -f $(HOST_DIR)/usr/bin/directfb-csource
- -$(MAKE) -C $(DIRECTFB_HOST_DIR)/tools clean
+$(eval $(call AUTOTARGETS,package,directfb))
+$(eval $(call AUTOTARGETS,package,directfb,host))
-host-directfb-dirclean:
- rm -rf $(DIRECTFB_HOST_DIR)
+# directfb-csource for the host
+DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 21/39] fontconfig: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (19 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 20/39] directfb: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 22/39] freetype: " Thomas Petazzoni
` (19 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/fontconfig/fontconfig.mk | 49 ++++----------------------------------
1 files changed, 5 insertions(+), 44 deletions(-)
diff --git a/package/fontconfig/fontconfig.mk b/package/fontconfig/fontconfig.mk
index df618d0..6cbe2ea 100644
--- a/package/fontconfig/fontconfig.mk
+++ b/package/fontconfig/fontconfig.mk
@@ -23,49 +23,10 @@ FONTCONFIG_CONF_OPT = --with-arch=$(GNU_TARGET_NAME) \
FONTCONFIG_DEPENDENCIES = freetype expat
-$(eval $(call AUTOTARGETS,package,fontconfig))
-
-# fontconfig for the host
-FONTCONFIG_HOST_DIR:=$(BUILD_DIR)/fontconfig-$(FONTCONFIG_VERSION)-host
-
-$(DL_DIR)/$(FONTCONFIG_SOURCE):
- $(call DOWNLOAD,$(FONTCONFIG_SITE),$(FONTCONFIG_SOURCE))
-
-$(STAMP_DIR)/host_fontconfig_unpacked: $(DL_DIR)/$(FONTCONFIG_SOURCE)
- mkdir -p $(FONTCONFIG_HOST_DIR)
- $(INFLATE$(suffix $(FONTCONFIG_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(FONTCONFIG_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_fontconfig_configured: $(STAMP_DIR)/host_fontconfig_unpacked $(STAMP_DIR)/host_freetype_installed $(STAMP_DIR)/host_expat_installed
- (cd $(FONTCONFIG_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_FONTCONFIG_DEPENDENCIES = host-freetype host-expat
+HOST_FONTCONFIG_CONF_OPT = \
--disable-docs \
- --disable-static \
- )
- touch $@
-
-$(STAMP_DIR)/host_fontconfig_compiled: $(STAMP_DIR)/host_fontconfig_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(FONTCONFIG_HOST_DIR)
- touch $@
+ --disable-static
-$(STAMP_DIR)/host_fontconfig_installed: $(STAMP_DIR)/host_fontconfig_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(FONTCONFIG_HOST_DIR) install
- touch $@
-
-host-fontconfig: $(STAMP_DIR)/host_fontconfig_installed
-
-host-fontconfig-source: fontconfig-source
-
-host-fontconfig-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_fontconfig_,unpacked configured compiled installed)
- -$(MAKE) -C $(FONTCONFIG_HOST_DIR) uninstall
- -$(MAKE) -C $(FONTCONFIG_HOST_DIR) clean
-
-host-fontconfig-dirclean:
- rm -rf $(FONTCONFIG_HOST_DIR)
+$(eval $(call AUTOTARGETS,package,fontconfig))
+$(eval $(call AUTOTARGETS,package,fontconfig,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 22/39] freetype: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (20 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 21/39] fontconfig: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 23/39] libxml2: " Thomas Petazzoni
` (18 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/freetype/freetype.mk | 46 ++---------------------------------------
1 files changed, 3 insertions(+), 43 deletions(-)
diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk
index 06bf6f4..ed73253 100644
--- a/package/freetype/freetype.mk
+++ b/package/freetype/freetype.mk
@@ -13,7 +13,10 @@ FREETYPE_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
FREETYPE_MAKE_OPT = CCexe="$(HOSTCC)"
FREETYPE_DEPENDENCIES = host-pkg-config $(if $(BR2_PACKAGE_ZLIB),zlib)
+HOST_FREETYPE_DEPENDENCIES = host-pkg-config
+
$(eval $(call AUTOTARGETS,package,freetype))
+$(eval $(call AUTOTARGETS,package,freetype,host))
$(FREETYPE_HOOK_POST_INSTALL):
$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
@@ -26,46 +29,3 @@ ifneq ($(BR2_HAVE_DEVFILES),y)
rm -f $(TARGET_DIR)/usr/bin/freetype-config
endif
touch $@
-
-# freetype for the host
-FREETYPE_HOST_DIR:=$(BUILD_DIR)/freetype-$(FREETYPE_VERSION)-host
-
-$(DL_DIR)/$(FREETYPE_SOURCE):
- $(call DOWNLOAD,$(FREETYPE_SITE),$(FREETYPE_SOURCE))
-
-$(STAMP_DIR)/host_freetype_unpacked: $(DL_DIR)/$(FREETYPE_SOURCE)
- mkdir -p $(FREETYPE_HOST_DIR)
- $(INFLATE$(suffix $(FREETYPE_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(FREETYPE_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_freetype_configured: $(STAMP_DIR)/host_freetype_unpacked $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(FREETYPE_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_freetype_compiled: $(STAMP_DIR)/host_freetype_configured
- $(MAKE) -C $(FREETYPE_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_freetype_installed: $(STAMP_DIR)/host_freetype_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(FREETYPE_HOST_DIR) install
- touch $@
-
-host-freetype: $(STAMP_DIR)/host_freetype_installed
-
-host-freetype-source: freetype-source
-
-host-freetype-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_freetype_,unpacked configured compiled installed)
- -$(MAKE) -C $(FREETYPE_HOST_DIR) uninstall
- -$(MAKE) -C $(FREETYPE_HOST_DIR) clean
-
-host-freetype-dirclean:
- rm -rf $(FREETYPE_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 23/39] libxml2: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (21 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 22/39] freetype: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 24/39] shared-mime-info: " Thomas Petazzoni
` (17 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libxml2/libxml2.mk | 52 ++++++-------------------------------------
1 files changed, 8 insertions(+), 44 deletions(-)
diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk
index ceabcd9..a554226 100644
--- a/package/libxml2/libxml2.mk
+++ b/package/libxml2/libxml2.mk
@@ -20,7 +20,14 @@ LIBXML2_CONF_OPT = --with-gnu-ld --enable-shared \
--without-debugging --without-python \
--without-threads
+HOST_LIBXML2_DEPENDENCIES = host-pkg-config
+
+HOST_LIBXML2_CONF_OPT = \
+ --enable-shared --without-debugging --without-python \
+ --without-threads
+
$(eval $(call AUTOTARGETS,package,libxml2))
+$(eval $(call AUTOTARGETS,package,libxml2,host))
$(LIBXML2_HOOK_POST_INSTALL):
$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config
@@ -31,47 +38,4 @@ $(LIBXML2_HOOK_POST_INSTALL):
touch $@
# libxml2 for the host
-LIBXML2_HOST_DIR:=$(BUILD_DIR)/libxml2-$(LIBXML2_VERSION)-host
-LIBXML2_HOST_BINARY:=$(HOST_DIR)/usr/bin/xmllint
-
-$(DL_DIR)/$(LIBXML2_SOURCE):
- $(call DOWNLOAD,$(LIBXML2_SITE),$(LIBXML2_SOURCE))
-
-$(STAMP_DIR)/host_libxml2_unpacked: $(DL_DIR)/$(LIBXML2_SOURCE)
- mkdir -p $(LIBXML2_HOST_DIR)
- $(INFLATE$(suffix $(LIBXML2_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBXML2_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_libxml2_configured: $(STAMP_DIR)/host_libxml2_unpacked $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(LIBXML2_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --enable-shared --without-debugging --without-python \
- --without-threads \
- )
- touch $@
-
-$(STAMP_DIR)/host_libxml2_compiled: $(STAMP_DIR)/host_libxml2_configured
- $(MAKE) -C $(LIBXML2_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_libxml2_installed: $(STAMP_DIR)/host_libxml2_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(LIBXML2_HOST_DIR) install
- touch $@
-
-host-libxml2: $(STAMP_DIR)/host_libxml2_installed
-
-host-libxml2-source: libxml2-source
-
-host-libxml2-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_libxml2_,unpacked configured compiled installed)
- -$(MAKE) -C $(LIBXML2_HOST_DIR) uninstall
- -$(MAKE) -C $(LIBXML2_HOST_DIR) clean
-
-host-libxml2-dirclean:
- rm -rf $(LIBXML2_HOST_DIR)
+LIBXML2_HOST_BINARY:=$(HOST_DIR)/usr/bin/xmllint
\ No newline@end of file
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 24/39] shared-mime-info: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (22 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 23/39] libxml2: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 25/39] dbus-glib: " Thomas Petazzoni
` (16 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/shared-mime-info/shared-mime-info.mk | 52 +++----------------------
1 files changed, 7 insertions(+), 45 deletions(-)
diff --git a/package/shared-mime-info/shared-mime-info.mk b/package/shared-mime-info/shared-mime-info.mk
index b1833bb..cfd3521 100644
--- a/package/shared-mime-info/shared-mime-info.mk
+++ b/package/shared-mime-info/shared-mime-info.mk
@@ -16,57 +16,19 @@ SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config host-libglib2 host-libxml2 libxm
SHARED_MIME_INFO_CONF_OPT = --disable-update-mimedb
-$(eval $(call AUTOTARGETS,package,shared-mime-info))
+HOST_SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config
+
+HOST_SHARED_MIME_INFO_CONF_OPT = \
+ --disable-update-mimedb
+$(eval $(call AUTOTARGETS,package,shared-mime-info))
+$(eval $(call AUTOTARGETS,package,shared-mime-info,host))
# shared-mime-info for the host
-SHARED_MIME_INFO_HOST_DIR:=$(BUILD_DIR)/shared-mime-info-$(SHARED_MIME_INFO_VERSION)-host
SHARED_MIME_INFO_HOST_BINARY:=$(HOST_DIR)/usr/bin/update-mime-database
-$(DL_DIR)/$(SHARED_MIME_INFO_SOURCE):
- $(call DOWNLOAD,$(SHARED_MIME_INFO_SITE),$(SHARED_MIME_INFO_SOURCE))
-
-$(STAMP_DIR)/host_shared-mime-info_unpacked: $(DL_DIR)/$(SHARED_MIME_INFO_SOURCE)
- mkdir -p $(SHARED_MIME_INFO_HOST_DIR)
- $(INFLATE$(suffix $(SHARED_MIME_INFO_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(SHARED_MIME_INFO_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(SHARED_MIME_INFO_HOST_DIR) package/shared-mime-info/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_shared-mime-info_configured: $(STAMP_DIR)/host_shared-mime-info_unpacked $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(SHARED_MIME_INFO_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --disable-update-mimedb \
- )
- touch $@
-
-$(STAMP_DIR)/host_shared-mime-info_compiled: $(STAMP_DIR)/host_shared-mime-info_configured
- $(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_shared-mime-info_installed: $(STAMP_DIR)/host_shared-mime-info_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR) install
- touch $@
-
-host-shared-mime-info: $(STAMP_DIR)/host_shared-mime-info_installed
-
-host-shared-mime-info-source: shared-mime-info-source
-
-host-shared-mime-info-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_shared-mime-info_,unpacked configured compiled installed)
- -$(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR) uninstall
- -$(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR) clean
-
-host-shared-mime-info-dirclean:
- rm -rf $(SHARED_MIME_INFO_HOST_DIR)
-
# update the shared-mime-info database in the target
-$(SHARED_MIME_INFO_HOOK_POST_INSTALL): $(STAMP_DIR)/host_shared-mime-info_installed
+$(SHARED_MIME_INFO_HOOK_POST_INSTALL): host-shared-mime-info
$(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime
$(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache
touch $@
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 25/39] dbus-glib: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (23 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 24/39] shared-mime-info: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 26/39] expat: " Thomas Petazzoni
` (15 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/dbus-glib/dbus-glib.mk | 50 +++++----------------------------------
1 files changed, 7 insertions(+), 43 deletions(-)
diff --git a/package/dbus-glib/dbus-glib.mk b/package/dbus-glib/dbus-glib.mk
index c6cebe6..0bf2b3f 100644
--- a/package/dbus-glib/dbus-glib.mk
+++ b/package/dbus-glib/dbus-glib.mk
@@ -25,53 +25,17 @@ DBUS_GLIB_CONF_OPT = --localstatedir=/var \
DBUS_GLIB_DEPENDENCIES = host-pkg-config dbus host-dbus host-dbus-glib libglib2 expat
-$(eval $(call AUTOTARGETS,package,dbus-glib))
-
-# dbus-glib for the host
-DBUS_GLIB_HOST_DIR:=$(BUILD_DIR)/dbus-glib-$(DBUS_GLIB_VERSION)-host
-DBUS_GLIB_HOST_BINARY:=$(HOST_DIR)/usr/bin/dbus-binding-tool
+HOST_DBUS_GLIB_DEPENDENCIES = host-dbus host-exapt host-libglib2
-$(DL_DIR)/$(DBUS_GLIB_SOURCE):
- $(call DOWNLOAD,$(DBUS_GLIB_SITE),$(DBUS_GLIB_SOURCE))
-
-$(STAMP_DIR)/host_dbusglib_unpacked: $(DL_DIR)/$(DBUS_GLIB_SOURCE)
- mkdir -p $(DBUS_GLIB_HOST_DIR)
- $(INFLATE$(suffix $(DBUS_GLIB_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(DBUS_GLIB_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_dbusglib_configured: $(STAMP_DIR)/host_dbusglib_unpacked $(STAMP_DIR)/host_dbus_installed $(STAMP_DIR)/host_expat_installed $(STAMP_DIR)/host_libglib2_installed
- (cd $(DBUS_GLIB_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_DBUS_GLIB_CONF_OPT = \
--disable-tests \
--disable-xml-docs \
--disable-bash-completion \
--disable-doxygen-docs \
- --enable-asserts=yes \
- )
- touch $@
-
-$(STAMP_DIR)/host_dbusglib_compiled: $(STAMP_DIR)/host_dbusglib_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(DBUS_GLIB_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_dbusglib_installed: $(STAMP_DIR)/host_dbusglib_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(DBUS_GLIB_HOST_DIR) install
- touch $@
-
-host-dbus-glib: $(STAMP_DIR)/host_dbusglib_installed
-
-host-dbus-glib-source: dbus-glib-source
+ --enable-asserts=yes
-host-dbus-glib-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_dbusglib_,unpacked configured compiled installed)
- -$(MAKE) -C $(DBUS_GLIB_HOST_DIR) uninstall
- -$(MAKE) -C $(DBUS_GLIB_HOST_DIR) clean
+$(eval $(call AUTOTARGETS,package,dbus-glib))
+$(eval $(call AUTOTARGETS,package,dbus-glib,host))
-host-dbus-glib-dirclean:
- rm -rf $(DBUS_GLIB_HOST_DIR)
+# dbus-glib for the host
+DBUS_GLIB_HOST_BINARY:=$(HOST_DIR)/usr/bin/dbus-binding-tool
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 26/39] expat: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (24 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 25/39] dbus-glib: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 27/39] gob2: " Thomas Petazzoni
` (14 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/expat/expat.mk | 44 +-------------------------------------------
1 files changed, 1 insertions(+), 43 deletions(-)
diff --git a/package/expat/expat.mk b/package/expat/expat.mk
index 9dcb0e7..5b4eb97 100644
--- a/package/expat/expat.mk
+++ b/package/expat/expat.mk
@@ -19,50 +19,8 @@ EXPAT_CONF_OPT = --enable-shared
EXPAT_DEPENDENCIES = host-pkg-config
$(eval $(call AUTOTARGETS,package,expat))
+$(eval $(call AUTOTARGETS,package,expat,host))
$(EXPAT_HOOK_POST_INSTALL): $(EXPAT_TARGET_INSTALL_TARGET)
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libexpat.so.*
touch $@
-
-# expat for the host
-EXPAT_HOST_DIR:=$(BUILD_DIR)/expat-$(EXPAT_VERSION)-host
-
-$(DL_DIR)/$(EXPAT_SOURCE):
- $(call DOWNLOAD,$(EXPAT_SITE),$(EXPAT_SOURCE))
-
-$(STAMP_DIR)/host_expat_unpacked: $(DL_DIR)/$(EXPAT_SOURCE)
- mkdir -p $(EXPAT_HOST_DIR)
- $(INFLATE$(suffix $(EXPAT_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(EXPAT_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_expat_configured: $(STAMP_DIR)/host_expat_unpacked
- (cd $(EXPAT_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_expat_compiled: $(STAMP_DIR)/host_expat_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(EXPAT_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_expat_installed: $(STAMP_DIR)/host_expat_compiled
- $(MAKE) -C $(EXPAT_HOST_DIR) installlib
- touch $@
-
-host-expat: $(STAMP_DIR)/host_expat_installed
-
-host-expat-source: expat-source
-
-host-expat-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_expat_,unpacked configured compiled installed)
- -$(MAKE) -C $(EXPAT_HOST_DIR) uninstall
- -$(MAKE) -C $(EXPAT_HOST_DIR) clean
-
-host-expat-dirclean:
- rm -rf $(EXPAT_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 27/39] gob2: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (25 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 26/39] expat: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:30 ` [Buildroot] [PATCH 28/39] libgtk2: " Thomas Petazzoni
` (13 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/gob2/gob2.mk | 44 +++-----------------------------------------
1 files changed, 3 insertions(+), 41 deletions(-)
diff --git a/package/gob2/gob2.mk b/package/gob2/gob2.mk
index e640ca9..cdf7961 100644
--- a/package/gob2/gob2.mk
+++ b/package/gob2/gob2.mk
@@ -9,48 +9,10 @@ GOB2_SITE = http://ftp.5z.com/pub/gob/
GOB2_DEPENDENCIES = libglib2 flex bison host-pkg-config
+HOST_GOB2_DEPENDENCIES = host-libglib2
+
$(eval $(call AUTOTARGETS,package,gob2))
+$(eval $(call AUTOTARGETS,package,gob2,host))
# gob2 for the host
-GOB2_HOST_DIR:=$(BUILD_DIR)/gob2-$(GOB2_VERSION)-host
GOB2_HOST_BINARY:=$(HOST_DIR)/usr/bin/gob2
-
-$(DL_DIR)/$(GOB2_SOURCE):
- $(call DOWNLOAD,$(GOB2_SITE),$(GOB2_SOURCE))
-
-$(STAMP_DIR)/host_gob2_unpacked: $(DL_DIR)/$(GOB2_SOURCE)
- mkdir -p $(GOB2_HOST_DIR)
- $(INFLATE$(suffix $(GOB2_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(GOB2_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_gob2_configured: $(STAMP_DIR)/host_gob2_unpacked $(STAMP_DIR)/host_libglib2_installed
- (cd $(GOB2_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_gob2_compiled: $(STAMP_DIR)/host_gob2_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(GOB2_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_gob2_installed: $(STAMP_DIR)/host_gob2_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(GOB2_HOST_DIR) install
- touch $@
-
-host-gob2: $(STAMP_DIR)/host_gob2_installed
-
-host-gob2-source: gob2-source
-
-host-gob2-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_gob2_,unpacked configured compiled installed)
- -$(MAKE) -C $(GOB2_HOST_DIR) uninstall
- -$(MAKE) -C $(GOB2_HOST_DIR) clean
-
-host-gob2-dirclean:
- rm -rf $(GOB2_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 28/39] libgtk2: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (26 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 27/39] gob2: " Thomas Petazzoni
@ 2009-12-15 19:30 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 29/39] libusb: " Thomas Petazzoni
` (12 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:30 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libgtk2/libgtk2.mk | 55 ++++++-------------------------------------
1 files changed, 8 insertions(+), 47 deletions(-)
diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk
index a61fde7..626b2da 100644
--- a/package/libgtk2/libgtk2.mk
+++ b/package/libgtk2/libgtk2.mk
@@ -119,33 +119,8 @@ else
LIBGTK2_CONF_OPT += --disable-cups
endif
-$(eval $(call AUTOTARGETS,package,libgtk2))
-
-$(LIBGTK2_HOOK_POST_INSTALL):
- $(INSTALL) -m 755 package/libgtk2/S26libgtk2 $(TARGET_DIR)/etc/init.d/
- rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo
- touch $@
-
-# libgtk2 for the host
-LIBGTK2_HOST_DIR:=$(BUILD_DIR)/libgtk2-$(LIBGTK2_VERSION)-host
-
-$(DL_DIR)/$(LIBGTK2_SOURCE):
- $(call DOWNLOAD,$(LIBGTK2_SITE),$(LIBGTK2_SOURCE))
-
-$(STAMP_DIR)/host_libgtk2_unpacked: $(DL_DIR)/$(LIBGTK2_SOURCE)
- mkdir -p $(LIBGTK2_HOST_DIR)
- $(INFLATE$(suffix $(LIBGTK2_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBGTK2_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_libgtk2_configured: $(STAMP_DIR)/host_libgtk2_unpacked $(STAMP_DIR)/host_cairo_installed $(STAMP_DIR)/host_libglib2_installed $(STAMP_DIR)/host_pango_installed $(STAMP_DIR)/host_atk_installed
- (cd $(LIBGTK2_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
+HOST_LIBGTK2_DEPENDENCIES = host-cairo host-libglib2 host-pango host-atk
+HOST_LIBGTK2_CONF_OPT = \
--disable-static \
--disable-glibtest \
--without-libtiff \
@@ -153,26 +128,12 @@ $(STAMP_DIR)/host_libgtk2_configured: $(STAMP_DIR)/host_libgtk2_unpacked $(STAMP
--with-x \
--with-gdktarget=x11 \
--disable-cups \
- --disable-debug \
- )
- touch $@
+ --disable-debug
-$(STAMP_DIR)/host_libgtk2_compiled: $(STAMP_DIR)/host_libgtk2_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(LIBGTK2_HOST_DIR)
- touch $@
+$(eval $(call AUTOTARGETS,package,libgtk2))
+$(eval $(call AUTOTARGETS,package,libgtk2,host))
-$(STAMP_DIR)/host_libgtk2_installed: $(STAMP_DIR)/host_libgtk2_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(LIBGTK2_HOST_DIR) install
+$(LIBGTK2_HOOK_POST_INSTALL):
+ $(INSTALL) -m 755 package/libgtk2/S26libgtk2 $(TARGET_DIR)/etc/init.d/
+ rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo
touch $@
-
-host-libgtk2: $(STAMP_DIR)/host_libgtk2_installed
-
-host-libgtk2-source: libgtk2-source
-
-host-libgtk2-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_libgtk2_,unpacked configured compiled installed)
- -$(MAKE) -C $(LIBGTK2_HOST_DIR) uninstall
- -$(MAKE) -C $(LIBGTK2_HOST_DIR) clean
-
-host-libgtk2-dirclean:
- rm -rf $(LIBGTK2_HOST_DIR)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 29/39] libusb: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (27 preceding siblings ...)
2009-12-15 19:30 ` [Buildroot] [PATCH 28/39] libgtk2: " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-16 15:38 ` Peter Korsgaard
2009-12-15 19:31 ` [Buildroot] [PATCH 30/39] lzo: " Thomas Petazzoni
` (11 subsequent siblings)
40 siblings, 1 reply; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libusb/libusb.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk
index b93451b..618d36b 100644
--- a/package/libusb/libusb.mk
+++ b/package/libusb/libusb.mk
@@ -23,7 +23,7 @@ $(DL_DIR)/$(LIBUSB_SOURCE): $(LIBUSB_PATCH)
libusb-source: $(DL_DIR)/$(LIBUSB_SOURCE) $(LIBUSB_PATCH)
libusb-unpacked: $(LIBUSB_DIR)/.unpacked
-$(LIBUSB_DIR)/.unpacked: $(STAMP_DIR)/host_autoconf_installed $(STAMP_DIR)/host_automake_installed $(STAMP_DIR)/host_libtool_installed $(DL_DIR)/$(LIBUSB_SOURCE)
+$(LIBUSB_DIR)/.unpacked: host-autoconf host-automake host-libtool $(DL_DIR)/$(LIBUSB_SOURCE)
$(LIBUSB_CAT) $(DL_DIR)/$(LIBUSB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
ifneq ($(LIBUSB_PATCH_FILE),)
(cd $(LIBUSB_DIR) && $(LIBUSB_CAT) $(LIBUSB_PATCH) | patch -p1)
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 29/39] libusb: convert to autotools infrastructure for host package
2009-12-15 19:31 ` [Buildroot] [PATCH 29/39] libusb: " Thomas Petazzoni
@ 2009-12-16 15:38 ` Peter Korsgaard
0 siblings, 0 replies; 46+ messages in thread
From: Peter Korsgaard @ 2009-12-16 15:38 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> +++ b/package/libusb/libusb.mk
Thomas> @@ -23,7 +23,7 @@ $(DL_DIR)/$(LIBUSB_SOURCE): $(LIBUSB_PATCH)
Thomas> libusb-source: $(DL_DIR)/$(LIBUSB_SOURCE) $(LIBUSB_PATCH)
Thomas> libusb-unpacked: $(LIBUSB_DIR)/.unpacked
Thomas> -$(LIBUSB_DIR)/.unpacked: $(STAMP_DIR)/host_autoconf_installed $(STAMP_DIR)/host_automake_installed $(STAMP_DIR)/host_libtool_installed $(DL_DIR)/$(LIBUSB_SOURCE)
Thomas> +$(LIBUSB_DIR)/.unpacked: host-autoconf host-automake host-libtool $(DL_DIR)/$(LIBUSB_SOURCE)
This causes the unpack (and in terms configure, build and install) steps
to always be considered out of date and hence rerun.
We should probably just add those dependencies to the the toplevel
libusb target (or even better, convert to AUTOTARGETS).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 46+ messages in thread
* [Buildroot] [PATCH 30/39] lzo: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (28 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 29/39] libusb: " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 31/39] mtd-utils: fix dependency on " Thomas Petazzoni
` (10 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/lzo/lzo.mk | 43 +------------------------------------------
1 files changed, 1 insertions(+), 42 deletions(-)
diff --git a/package/lzo/lzo.mk b/package/lzo/lzo.mk
index 3c3b832..ed30056 100644
--- a/package/lzo/lzo.mk
+++ b/package/lzo/lzo.mk
@@ -12,45 +12,4 @@ LZO_INSTALL_TARGET = YES
LZO_INSTALL_STAGING_OPT = CC="$(TARGET_CC)" DESTDIR=$(STAGING_DIR) install
$(eval $(call AUTOTARGETS,package,lzo))
-
-# lzo for the host
-LZO_HOST_DIR:=$(BUILD_DIR)/lzo-$(LZO_VERSION)-host
-
-$(DL_DIR)/$(LZO_SOURCE):
- $(call DOWNLOAD,$(LZO_SITE),$(LZO_SOURCE))
-
-$(STAMP_DIR)/host_lzo_unpacked: $(DL_DIR)/$(LZO_SOURCE)
- mkdir -p $(LZO_HOST_DIR)
- $(INFLATE$(suffix $(LZO_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LZO_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(LZO_HOST_DIR) package/lzo/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_lzo_configured: $(STAMP_DIR)/host_lzo_unpacked
- (cd $(LZO_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_lzo_compiled: $(STAMP_DIR)/host_lzo_configured
- $(MAKE) -C $(LZO_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_lzo_installed: $(STAMP_DIR)/host_lzo_compiled
- $(MAKE) -C $(LZO_HOST_DIR) install
- touch $@
-
-host-lzo: $(STAMP_DIR)/host_lzo_installed
-
-host-lzo-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_lzo_,unpacked configured compiled installed)
- -$(MAKE) -C $(LZO_HOST_DIR) uninstall
- -$(MAKE) -C $(LZO_HOST_DIR) clean
-
-host-lzo-dirclean:
- rm -rf $(LZO_HOST_DIR)
+$(eval $(call AUTOTARGETS,package,lzo,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 31/39] mtd-utils: fix dependency on host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (29 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 30/39] lzo: " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-16 15:39 ` Peter Korsgaard
2009-12-15 19:31 ` [Buildroot] [PATCH 32/39] m4: convert to autotools infrastructure for " Thomas Petazzoni
` (9 subsequent siblings)
40 siblings, 1 reply; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/mtd/mtd-utils/mtd.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/package/mtd/mtd-utils/mtd.mk b/package/mtd/mtd-utils/mtd.mk
index a686661..ddae44e 100644
--- a/package/mtd/mtd-utils/mtd.mk
+++ b/package/mtd/mtd-utils/mtd.mk
@@ -34,7 +34,7 @@ $(MTD_HOST_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE)
touch $@
-$(MKFS_JFFS2): $(MTD_HOST_DIR)/.unpacked $(STAMP_DIR)/host_lzo_installed
+$(MKFS_JFFS2): $(MTD_HOST_DIR)/.unpacked host-lzo
CC="$(HOSTCC)" CROSS= LDFLAGS=-L$(HOST_DIR)/usr/lib \
$(MAKE) CFLAGS='-I$(HOST_DIR)/usr/include -I./include' \
LINUXDIR=$(LINUX_DIR) BUILDDIR=$(MTD_HOST_DIR) \
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 31/39] mtd-utils: fix dependency on host package
2009-12-15 19:31 ` [Buildroot] [PATCH 31/39] mtd-utils: fix dependency on " Thomas Petazzoni
@ 2009-12-16 15:39 ` Peter Korsgaard
0 siblings, 0 replies; 46+ messages in thread
From: Peter Korsgaard @ 2009-12-16 15:39 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> -$(MKFS_JFFS2): $(MTD_HOST_DIR)/.unpacked $(STAMP_DIR)/host_lzo_installed
Thomas> +$(MKFS_JFFS2): $(MTD_HOST_DIR)/.unpacked host-lzo
Thomas> CC="$(HOSTCC)" CROSS= LDFLAGS=-L$(HOST_DIR)/usr/lib \
Thomas> $(MAKE) CFLAGS='-I$(HOST_DIR)/usr/include -I./include' \
Same issue as libusb. Having real targets (E.G. where work is done)
depend on phony targets is in general a no-no.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 46+ messages in thread
* [Buildroot] [PATCH 32/39] m4: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (30 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 31/39] mtd-utils: fix dependency on " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 33/39] pixman: " Thomas Petazzoni
` (8 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/m4/m4.mk | 46 +++-------------------------------------------
1 files changed, 3 insertions(+), 43 deletions(-)
diff --git a/package/m4/m4.mk b/package/m4/m4.mk
index b772185..a0b56c4 100644
--- a/package/m4/m4.mk
+++ b/package/m4/m4.mk
@@ -17,47 +17,7 @@ ifneq ($(BR2_USE_WCHAR),y)
M4_CONF_ENV += gt_cv_c_wchar_t=no gl_cv_absolute_wchar_h=__fpending.h
endif
-$(eval $(call AUTOTARGETS,package,m4))
-
-# m4 for the host
-M4_HOST_DIR:=$(BUILD_DIR)/m4-$(M4_VERSION)-host
-
-$(DL_DIR)/$(M4_SOURCE):
- $(call DOWNLOAD,$(M4_SITE),$(M4_SOURCE))
-
-$(STAMP_DIR)/host_m4_unpacked: $(DL_DIR)/$(M4_SOURCE)
- mkdir -p $(M4_HOST_DIR)
- $(INFLATE$(suffix $(M4_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(M4_HOST_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(M4_HOST_DIR) package/m4/ \*.patch
- touch $@
-
-$(STAMP_DIR)/host_m4_configured: $(STAMP_DIR)/host_m4_unpacked
- (cd $(M4_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- --disable-static \
- )
- touch $@
+HOST_M4_CONF_OPT = --disable-static
-$(STAMP_DIR)/host_m4_compiled: $(STAMP_DIR)/host_m4_configured
- $(MAKE) -C $(M4_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_m4_installed: $(STAMP_DIR)/host_m4_compiled
- $(MAKE) -C $(M4_HOST_DIR) install
- touch $@
-
-host-m4: $(STAMP_DIR)/host_m4_installed
-
-host-m4-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_m4_,unpacked configured compiled installed)
- -$(MAKE) -C $(M4_HOST_DIR) uninstall
- -$(MAKE) -C $(M4_HOST_DIR) clean
-
-host-m4-dirclean:
- rm -rf $(M4_HOST_DIR)
+$(eval $(call AUTOTARGETS,package,m4))
+$(eval $(call AUTOTARGETS,package,m4,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 33/39] pixman: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (31 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 32/39] m4: convert to autotools infrastructure for " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 34/39] xproto_xproto: " Thomas Petazzoni
` (7 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pixman/pixman.mk | 44 +-------------------------------------------
1 files changed, 1 insertions(+), 43 deletions(-)
diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk
index 3a76c96..9507bbf 100644
--- a/package/pixman/pixman.mk
+++ b/package/pixman/pixman.mk
@@ -10,46 +10,4 @@ PIXMAN_AUTORECONF = NO
PIXMAN_INSTALL_STAGING = YES
$(eval $(call AUTOTARGETS,package,pixman))
-
-# pixman for the host
-PIXMAN_HOST_DIR:=$(BUILD_DIR)/pixman-$(PIXMAN_VERSION)-host
-
-$(DL_DIR)/$(PIXMAN_SOURCE):
- $(call DOWNLOAD,$(PIXMAN_SITE),$(PIXMAN_SOURCE))
-
-$(STAMP_DIR)/host_pixman_unpacked: $(DL_DIR)/$(PIXMAN_SOURCE)
- mkdir -p $(PIXMAN_HOST_DIR)
- $(INFLATE$(suffix $(PIXMAN_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(PIXMAN_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_pixman_configured: $(STAMP_DIR)/host_pixman_unpacked
- (cd $(PIXMAN_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_pixman_compiled: $(STAMP_DIR)/host_pixman_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(PIXMAN_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_pixman_installed: $(STAMP_DIR)/host_pixman_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(PIXMAN_HOST_DIR) install
- touch $@
-
-host-pixman: $(STAMP_DIR)/host_pixman_installed
-
-host-pixman-source: pixman-source
-
-host-pixman-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_pixman_,unpacked configured compiled installed)
- -$(MAKE) -C $(PIXMAN_HOST_DIR) uninstall
- -$(MAKE) -C $(PIXMAN_HOST_DIR) clean
-
-host-pixman-dirclean:
- rm -rf $(PIXMAN_HOST_DIR)
+$(eval $(call AUTOTARGETS,package,pixman,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 34/39] xproto_xproto: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (32 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 33/39] pixman: " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 35/39] xutil_makedepend: " Thomas Petazzoni
` (6 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/x11r7/xproto_xproto/xproto_xproto.mk | 44 +-------------------------
1 files changed, 1 insertions(+), 43 deletions(-)
diff --git a/package/x11r7/xproto_xproto/xproto_xproto.mk b/package/x11r7/xproto_xproto/xproto_xproto.mk
index 879b554..ff2a042 100644
--- a/package/x11r7/xproto_xproto/xproto_xproto.mk
+++ b/package/x11r7/xproto_xproto/xproto_xproto.mk
@@ -12,46 +12,4 @@ XPROTO_XPROTO_INSTALL_STAGING = YES
XPROTO_XPROTO_INSTALL_TARGET = NO
$(eval $(call AUTOTARGETS,package/x11r7,xproto_xproto))
-
-# xproto_xproto for the host
-XPROTO_XPROTO_HOST_DIR:=$(BUILD_DIR)/xproto_xproto-$(XPROTO_XPROTO_VERSION)-host
-
-$(DL_DIR)/$(XPROTO_XPROTO_SOURCE):
- $(call DOWNLOAD,$(XPROTO_XPROTO_SITE),$(XPROTO_XPROTO_SOURCE))
-
-$(STAMP_DIR)/host_xproto_xproto_unpacked: $(DL_DIR)/$(XPROTO_XPROTO_SOURCE)
- mkdir -p $(XPROTO_XPROTO_HOST_DIR)
- $(INFLATE$(suffix $(XPROTO_XPROTO_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(XPROTO_XPROTO_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_xproto_xproto_configured: $(STAMP_DIR)/host_xproto_xproto_unpacked
- (cd $(XPROTO_XPROTO_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_xproto_xproto_compiled: $(STAMP_DIR)/host_xproto_xproto_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(XPROTO_XPROTO_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_xproto_xproto_installed: $(STAMP_DIR)/host_xproto_xproto_compiled
- $(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) install
- touch $@
-
-host-xproto_xproto: $(STAMP_DIR)/host_xproto_xproto_installed
-
-host-xproto_xproto-source: xproto_xproto-source
-
-host-xproto_xproto-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_xproto_xproto_,unpacked configured compiled installed)
- -$(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) uninstall
- -$(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) clean
-
-host-xproto_xproto-dirclean:
- rm -rf $(XPROTO_XPROTO_HOST_DIR)
+$(eval $(call AUTOTARGETS,package/x11r7,xproto_xproto,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 35/39] xutil_makedepend: convert to autotools infrastructure for host package
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (33 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 34/39] xproto_xproto: " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 36/39] i2c-tools: convert to the generic package infrastructure Thomas Petazzoni
` (5 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/x11r7/xutil_makedepend/xutil_makedepend.mk | 46 +------------------
1 files changed, 3 insertions(+), 43 deletions(-)
diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.mk b/package/x11r7/xutil_makedepend/xutil_makedepend.mk
index edbe251..b0bbafd 100644
--- a/package/x11r7/xutil_makedepend/xutil_makedepend.mk
+++ b/package/x11r7/xutil_makedepend/xutil_makedepend.mk
@@ -11,47 +11,7 @@ XUTIL_MAKEDEPEND_AUTORECONF = NO
XUTIL_MAKEDEPEND_INSTALL_STAGING = NO
XUTIL_MAKEDEPEND_INSTALL_TARGET = YES
-$(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend))
-
-# makedepend for the host
-MAKEDEPEND_HOST_DIR:=$(BUILD_DIR)/makedepend-$(XUTIL_MAKEDEPEND_VERSION)-host
-
-$(DL_DIR)/$(XUTIL_MAKEDEPEND_SOURCE):
- $(call DOWNLOAD,$(XUTIL_MAKEDEPEND_SITE),$(XUTIL_MAKEDEPEND_SOURCE))
-
-$(STAMP_DIR)/host_makedepend_unpacked: $(DL_DIR)/$(XUTIL_MAKEDEPEND_SOURCE)
- mkdir -p $(MAKEDEPEND_HOST_DIR)
- $(INFLATE$(suffix $(XUTIL_MAKEDEPEND_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(MAKEDEPEND_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_makedepend_configured: $(STAMP_DIR)/host_makedepend_unpacked $(STAMP_DIR)/host_xproto_xproto_installed
- (cd $(MAKEDEPEND_HOST_DIR); rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- ./configure $(QUIET) \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- )
- touch $@
-
-$(STAMP_DIR)/host_makedepend_compiled: $(STAMP_DIR)/host_makedepend_configured
- $(HOST_MAKE_ENV) $(MAKE) -C $(MAKEDEPEND_HOST_DIR)
- touch $@
+HOST_XUTIL_MAKEDEPEND_DEPENDENCIES = host-xproto-xproto
-$(STAMP_DIR)/host_makedepend_installed: $(STAMP_DIR)/host_makedepend_compiled
- $(MAKE) -C $(MAKEDEPEND_HOST_DIR) install
- touch $@
-
-host-makedepend: $(STAMP_DIR)/host_makedepend_installed
-
-host-makedepend-source: makedepend-source
-
-host-makedepend-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_makedepend_,unpacked configured compiled installed)
- -$(MAKE) -C $(MAKEDEPEND_HOST_DIR) uninstall
- -$(MAKE) -C $(MAKEDEPEND_HOST_DIR) clean
-
-host-makedepend-dirclean:
- rm -rf $(MAKEDEPEND_HOST_DIR)
+$(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend))
+$(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend,host))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 36/39] i2c-tools: convert to the generic package infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (34 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 35/39] xutil_makedepend: " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 37/39] udev: convert to " Thomas Petazzoni
` (4 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/i2c-tools/i2c-tools.mk | 44 +++++++--------------------------------
1 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/package/i2c-tools/i2c-tools.mk b/package/i2c-tools/i2c-tools.mk
index 5d28e1d..d419524 100644
--- a/package/i2c-tools/i2c-tools.mk
+++ b/package/i2c-tools/i2c-tools.mk
@@ -6,45 +6,17 @@
I2C_TOOLS_VERSION:=3.0.2
I2C_TOOLS_SOURCE:=i2c-tools-$(I2C_TOOLS_VERSION).tar.bz2
I2C_TOOLS_SITE:=http://dl.lm-sensors.org/i2c-tools/releases/
-I2C_TOOLS_DIR:=$(BUILD_DIR)/i2c-tools-$(I2C_TOOLS_VERSION)
-I2C_TOOLS_BINARY:=tools/i2cdetect
-I2C_TOOLS_TARGET_BINARY:=usr/bin/i2cdetect
-$(DL_DIR)/$(I2C_TOOLS_SOURCE):
- $(call DOWNLOAD,$(I2C_TOOLS_SITE),$(I2C_TOOLS_SOURCE))
+define I2C_TOOLS_BUILD_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
-$(I2C_TOOLS_DIR)/.unpacked: $(DL_DIR)/$(I2C_TOOLS_SOURCE)
- $(BZCAT) $(DL_DIR)/$(I2C_TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(I2C_TOOLS_DIR) package/i2c-tools/ i2c-tools-$(I2C_TOOLS_VERSION)\*.patch
- touch $@
-
-$(I2C_TOOLS_DIR)/$(I2C_TOOLS_BINARY): $(I2C_TOOLS_DIR)/.unpacked
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(I2C_TOOLS_DIR)
-
-$(TARGET_DIR)/$(I2C_TOOLS_TARGET_BINARY): $(I2C_TOOLS_DIR)/$(I2C_TOOLS_BINARY)
- $(INSTALL) -m 755 -d $(@D)
+define I2C_TOOLS_INSTALL_TARGET_CMDS
for i in i2cdump i2cget i2cset i2cdetect; \
do \
- $(INSTALL) -m 755 $(<D)/$$i $(@D); \
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/$$i; \
+ $(INSTALL) -m 755 $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/$$i; \
done
+endef
-i2c-tools: $(TARGET_DIR)/$(I2C_TOOLS_TARGET_BINARY)
-
-i2c-tools-source: $(DL_DIR)/$(I2C_TOOLS_SOURCE)
-
-i2c-tools-clean:
- rm -f $(addprefix $(TARGET_DIR)/usr/bin/,i2cdump i2cget i2cset i2cdetect)
- -$(MAKE) -C $(I2C_TOOLS_DIR) clean
-
-i2c-tools-dirclean:
- rm -rf $(I2C_TOOLS_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_I2C_TOOLS),y)
-TARGETS+=i2c-tools
-endif
+$(eval $(call GENTARGETS,package,i2c-tools))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 37/39] udev: convert to generic package infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (35 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 36/39] i2c-tools: convert to the generic package infrastructure Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 38/39] documentation: update about new package infrastructures Thomas Petazzoni
` (3 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/udev/udev.mk | 273 ++++++++++++++++---------------------------------
1 files changed, 89 insertions(+), 184 deletions(-)
diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index ace9ae4..e74adb1 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -10,10 +10,7 @@ UDEV_VOLUME_ID_REVISION:=0
UDEV_VOLUME_ID_VERSION:=$(UDEV_VOLUME_ID_CURRENT).$(UDEV_VOLUME_ID_AGE).$(UDEV_VOLUME_ID_REVISION)
UDEV_SOURCE:=udev-$(UDEV_VERSION).tar.bz2
UDEV_SITE:=$(BR2_KERNEL_MIRROR)/linux/utils/kernel/hotplug/
-UDEV_CAT:=$(BZCAT)
-UDEV_DIR:=$(BUILD_DIR)/udev-$(UDEV_VERSION)
-UDEV_TARGET_BINARY:=sbin/udevd
-UDEV_BINARY:=udevd
+UDEV_INSTALL_STAGING=YES
# 094 had _GNU_SOURCE set
BR2_UDEV_CFLAGS:= -D_GNU_SOURCE $(TARGET_CFLAGS)
@@ -24,205 +21,113 @@ endif
# UDEV_ROOT is /dev so we can replace devfs, not /udev for experiments
UDEV_ROOT:=/dev
-$(DL_DIR)/$(UDEV_SOURCE):
- $(call DOWNLOAD,$(UDEV_SITE),$(UDEV_SOURCE))
+UDEV_EXTRAS=
+ifeq ($(BR2_PACKAGE_UDEV_VOLUME_ID),y)
+UDEV_EXTRAS+=volume_id
+endif
+ifeq ($(BR2_PACKAGE_UDEV_SCSI_ID),y)
+UDEV_EXTRAS+=scsi_id
+UDEV_EXTRAS+=usb_id
+endif
+ifeq ($(BR2_PACKAGE_UDEV_PATH_ID),y)
+UDEV_EXTRAS+=path_id
+endif
+ifeq ($(BR2_PACKAGE_UDEV_FIRMWARE_SH),y)
+UDEV_EXTRAS+=firmware
+endif
-$(UDEV_DIR)/.unpacked: $(DL_DIR)/$(UDEV_SOURCE)
- $(UDEV_CAT) $(DL_DIR)/$(UDEV_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(UDEV_DIR) package/udev \*.patch
- touch $@
+UDEV_BUILD_EXTRAS=$(addprefix extras/,$(UDEV_EXTRAS))
-$(UDEV_DIR)/$(UDEV_BINARY): $(UDEV_DIR)/.unpacked
+#
+# Build
+#
+define UDEV_BUILD_CMDS
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) CC=$(TARGET_CC) LD=$(TARGET_CC)\
CFLAGS="$(BR2_UDEV_CFLAGS)" \
USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) -C $(UDEV_DIR)
- touch -c $@
-
-$(TARGET_DIR)/$(UDEV_TARGET_BINARY): $(UDEV_DIR)/$(UDEV_BINARY)
- mkdir -p $(TARGET_DIR)/sys
- $(MAKE) $(TARGET_CONFIGURE_OPTS) \
- DESTDIR=$(TARGET_DIR) \
- CFLAGS="$(BR2_UDEV_CFLAGS)" \
- LDFLAGS="-warn-common" \
- USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) install
- $(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d
- $(INSTALL) -m 0644 $(UDEV_DIR)/etc/udev/frugalware/* $(TARGET_DIR)/etc/udev/rules.d
- ( grep udev_root $(TARGET_DIR)/etc/udev/udev.conf > /dev/null 2>&1 || echo 'udev_root=/dev' >> $(TARGET_DIR)/etc/udev/udev.conf )
- install -m 0755 -D $(UDEV_DIR)/udevstart $(TARGET_DIR)/sbin/udevstart
- rm -rf $(TARGET_DIR)/usr/share/man
-ifneq ($(BR2_PACKAGE_UDEV_UTILS),y)
- rm -f $(TARGET_DIR)/usr/sbin/udevmonitor
- rm -f $(TARGET_DIR)/usr/bin/udevinfo
- rm -f $(TARGET_DIR)/usr/bin/udevtest
-endif
-
-#####################################################################
-.PHONY: udev-source udev udev-clean udev-dirclean
-
-udev: $(TARGET_DIR)/$(UDEV_TARGET_BINARY)
+ udevdir=$(UDEV_ROOT) EXTRAS="$(UDEV_BUILD_EXTRAS)" -C $(@D)
+endef
-udev-source: $(DL_DIR)/$(UDEV_SOURCE)
-
-udev-clean: $(UDEV_CLEAN_DEPS)
- rm -f $(TARGET_DIR)/etc/init.d/S10udev $(TARGET_DIR)/sbin/udev*
- rm -f $(TARGET_DIR)/usr/sbin/udevmonitor $(TARGET_DIR)/usr/bin/udev*
- rm -fr $(TARGET_DIR)/sys
- -$(MAKE) -C $(UDEV_DIR) clean
-
-
-udev-dirclean: $(UDEV_DIRCLEAN_DEPS)
- rm -rf $(UDEV_DIR)
-
-#####################################################################
+#
+# Staging installation
+#
ifeq ($(BR2_PACKAGE_UDEV_VOLUME_ID),y)
-.PHONY: udev-volume_id udev-volume_id-clean udev-volume_id-dirclean
-
-$(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION):
- $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
- CFLAGS="$(BR2_UDEV_CFLAGS)" \
- USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) EXTRAS="extras/volume_id" -C $(UDEV_DIR)
+define UDEV_VOLUME_ID_STAGING_INSTALL_CMDS
$(INSTALL) -m 0644 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.h $(STAGING_DIR)/usr/include/libvolume_id.h
$(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $@
- -ln -sf libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(STAGING_DIR)/usr/lib/libvolume_id.so.0
- -ln -sf libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(STAGING_DIR)/usr/lib/libvolume_id.so
-
-$(STAGING_DIR)/usr/lib/libvolume_id.la: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- $(INSTALL) -m 0755 -D package/udev/libvolume_id.la.tmpl $@
- $(SED) 's/REPLACE_CURRENT/$(UDEV_VOLUME_ID_CURRENT)/g' $@
- $(SED) 's/REPLACE_AGE/$(UDEV_VOLUME_ID_AGE)/g' $@
- $(SED) 's/REPLACE_REVISION/$(UDEV_VOLUME_ID_REVISION)/g' $@
- $(SED) 's,REPLACE_LIB_DIR,$(STAGING_DIR)/usr/lib,g' $@
-
-$(TARGET_DIR)/lib/udev/vol_id: $(STAGING_DIR)/usr/lib/libvolume_id.la
- $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(TARGET_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- -ln -sf libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(TARGET_DIR)/usr/lib/libvolume_id.so.0
- -ln -sf libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(TARGET_DIR)/usr/lib/libvolume_id.so
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/volume_id/vol_id $@
-
-udev-volume_id: udev $(TARGET_DIR)/lib/udev/vol_id
-
-udev-volume_id-clean:
- rm -f $(STAGING_DIR)/usr/include/libvolume_id.h
- rm -f $(STAGING_DIR)/usr/lib/libvolume_id.so*
- rm -f $(STAGING_DIR)/usr/lib/libvolume_id.la
- rm -f $(TARGET_DIR)/usr/lib/libvolume_id.so.0*
- rm -f $(TARGET_DIR)/lib/udev/vol_id
- rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/lib/udev
-
-udev-volume_id-dirclean:
- -$(MAKE) EXTRAS="extras/volume_id" -C $(UDEV_DIR) clean
-
-UDEV_CLEAN_DEPS+=udev-volume_id-clean
-UDEV_DIRCLEAN_DEPS+=udev-volume_id-dirclean
-endif
-
-#####################################################################
-ifeq ($(BR2_PACKAGE_UDEV_SCSI_ID),y)
-.PHONY: udev-scsi_id udev-scsi_id-clean udev-scsi_id-dirclean
-
-$(TARGET_DIR)/lib/udev/scsi_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
- CFLAGS="$(BR2_UDEV_CFLAGS)" \
- USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) EXTRAS="extras/scsi_id" -C $(UDEV_DIR)
- $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/scsi_id/scsi_id $@
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
-
-$(TARGET_DIR)/lib/udev/usb_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
- CFLAGS="$(BR2_UDEV_CFLAGS)" \
- USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) EXTRAS="extras/usb_id" -C $(UDEV_DIR)
- $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/usb_id/usb_id $@
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
-
-udev-scsi_id: udev $(TARGET_DIR)/lib/udev/scsi_id $(TARGET_DIR)/lib/udev/usb_id
-
-udev-scsi_id-clean:
- rm -f $(TARGET_DIR)/lib/udev/scsi_id
- rm -f $(TARGET_DIR)/lib/udev/usb_id
- rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/lib/udev
-
-udev-scsi_id-dirclean:
- -$(MAKE) EXTRAS="extras/scsi_id" -C $(UDEV_DIR) clean
-
-UDEV_CLEAN_DEPS+=udev-scsi_id-clean
-UDEV_DIRCLEAN_DEPS+=udev-scsi_id-dirclean
+ -ln -sf libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(STAGING_DIR)/lib/libvolume_id.so.0
+ -ln -sf libvolume_id.so.$(UDEV_VOLUME_ID_VERSION) $(STAGING_DIR)/lib/libvolume_id.so
+ $(INSTALL) -m 0755 -D package/udev/libvolume_id.la.tmpl $(STAGING_DIR)/lib/libvolume_id.la
+ $(SED) 's/REPLACE_CURRENT/$(UDEV_VOLUME_ID_CURRENT)/g' $(STAGING_DIR)/lib/libvolume_id.la
+ $(SED) 's/REPLACE_AGE/$(UDEV_VOLUME_ID_AGE)/g' $(STAGING_DIR)/lib/libvolume_id.la
+ $(SED) 's/REPLACE_REVISION/$(UDEV_VOLUME_ID_REVISION)/g' $(STAGING_DIR)/lib/libvolume_id.la
+ $(SED) 's,REPLACE_LIB_DIR,$(STAGING_DIR)/usr/lib,g' $(STAGING_DIR)/lib/libvolume_id.la
+endef
endif
-#####################################################################
-ifeq ($(BR2_PACKAGE_UDEV_PATH_ID),y)
-.PHONY: udev-path_id udev-path_id-clean udev-path_id-dirclean
-
-$(TARGET_DIR)/lib/udev/path_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
- CFLAGS="$(BR2_UDEV_CFLAGS)" \
- USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) EXTRAS="extras/path_id" -C $(UDEV_DIR)
- $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/path_id/path_id $@
-
-udev-path_id: udev $(TARGET_DIR)/lib/udev/path_id
-
-udev-path_id-clean:
- rm -f $(TARGET_DIR)/lib/udev/path_id
- rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/lib/udev
-
-udev-path_id-dirclean:
- -$(MAKE) EXTRAS="extras/path_id" -C $(UDEV_DIR) clean
+define UDEV_INSTALL_STAGING_CMDS
+$(UDEV_VOLUME_ID_STAGING_INSTALL_CMDS)
+endef
-UDEV_CLEAN_DEPS+=udev-path_id-clean
-UDEV_DIRCLEAN_DEPS+=udev-path_id-dirclean
+#
+# Target installation
+#
+ifneq ($(BR2_PACKAGE_UDEV_UTILS),y)
+define UDEV_UTILS_REMOVAL
+ rm -f $(TARGET_DIR)/usr/sbin/udevmonitor
+ rm -f $(TARGET_DIR)/usr/bin/udevinfo
+ rm -f $(TARGET_DIR)/usr/bin/udevtest
+endef
endif
-#####################################################################
-ifeq ($(BR2_PACKAGE_UDEV_FIRMWARE_SH),y)
-.PHONY: udev-firmware_sh udev-firmware_sh-clean udev-firmware_sh-dirclean
-
-$(TARGET_DIR)/lib/udev/firmware.sh: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
- $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
+define UDEV_INSTALL_TARGET_CMDS
+ mkdir -p $(TARGET_DIR)/sys
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ DESTDIR=$(TARGET_DIR) \
CFLAGS="$(BR2_UDEV_CFLAGS)" \
+ LDFLAGS="-warn-common" \
USE_LOG=false USE_SELINUX=false \
- udevdir=$(UDEV_ROOT) EXTRAS="extras/firmware" -C $(UDEV_DIR)
- $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/firmware/firmware.sh $@
-
-udev-firmware_sh: udev $(TARGET_DIR)/lib/udev/firmware.sh
-
-udev-firmware_sh-clean:
- rm -f $(TARGET_DIR)/lib/udev/firmware.sh
- rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/lib/udev
-
-udev-firmware_sh-dirclean:
- -$(MAKE) EXTRAS="extras/firmware" -C $(UDEV_DIR) clean
-
-UDEV_CLEAN_DEPS+=udev-firmware_sh-clean
-UDEV_DIRCLEAN_DEPS+=udev-firmware_sh-dirclean
-endif
+ udevdir=$(UDEV_ROOT) EXTRAS="$(UDEV_BUILD_EXTRAS)" -C $(@D) install
+ $(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d
+ $(INSTALL) -m 0644 $(@D)/etc/udev/frugalware/* $(TARGET_DIR)/etc/udev/rules.d
+ ( grep udev_root $(TARGET_DIR)/etc/udev/udev.conf > /dev/null 2>&1 || echo 'udev_root=/dev' >> $(TARGET_DIR)/etc/udev/udev.conf )
+ install -m 0755 -D $(@D)/udevstart $(TARGET_DIR)/sbin/udevstart
+ for i in $(TARGET_DIR)/sbin/udev* $(TARGET_DIR)/usr/bin/udev* ; do \
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $$i ; \
+ done
+ for i in scsi_id usb_id vol_id ; do \
+ if test -e $(TARGET_DIR)/lib/udev/$$i ; then \
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/lib/udev/$$i ; \
+ fi \
+ done
+ $(UDEV_UTILS_REMOVAL)
+endef
-#############################################################
#
-# Toplevel Makefile options
+# Clean
#
-#############################################################
-ifeq ($(BR2_PACKAGE_UDEV),y)
-TARGETS+=udev
-endif
-
-ifeq ($(BR2_PACKAGE_UDEV_VOLUME_ID),y)
-TARGETS+=udev-volume_id
-endif
+define UDEV_CLEAN_CMDS
+ -$(MAKE) EXTRAS="$(UDEV_BUILD_EXTRAS)" -C $(@D) clean
+endef
-ifeq ($(BR2_PACKAGE_UDEV_SCSI_ID),y)
-TARGETS+=udev-scsi_id
-endif
+#
+# Staging uninstall
+#
+define UDEV_UNINSTALL_STAGING_CMDS
+ rm -f $(STAGING_DIR)/usr/include/libvolume_id.h
+ rm -f $(STAGING_DIR)/lib/libvolume_id.so*
+ rm -f $(STAGING_DIR)/lib/libvolume_id.la
+endef
-ifeq ($(BR2_PACKAGE_UDEV_PATH_ID),y)
-TARGETS+=udev-path_id
-endif
+#
+# Target uninstall
+#
+define UDEV_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/etc/init.d/S10udev $(TARGET_DIR)/sbin/udev*
+ rm -f $(TARGET_DIR)/usr/sbin/udevmonitor $(TARGET_DIR)/usr/bin/udev*
+ rm -fr $(TARGET_DIR)/sys
+ rm -f $(TARGET_DIR)/lib/libvolume_id.so.0*
+ rm -rf $(TARGET_DIR)/lib/udev
+endef
-ifeq ($(BR2_PACKAGE_UDEV_FIRMWARE_SH),y)
-TARGETS+=udev-firmware_sh
-endif
+$(eval $(call GENTARGETS,package,udev))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 38/39] documentation: update about new package infrastructures
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (36 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 37/39] udev: convert to " Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-15 19:31 ` [Buildroot] [PATCH 39/39] documentation: slightly improve CSS Thomas Petazzoni
` (2 subsequent siblings)
40 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Document the new generic package infrastructure, and how target/host
packages are handled, both for the generic package infrastructure and
the autotools package infrastructure.
This documentation replaces the documentation that used to be present
at the top of Makefile.autotools.in. Both tutorial and reference
documentation are provided.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
docs/buildroot.html | 692 ++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 603 insertions(+), 89 deletions(-)
diff --git a/docs/buildroot.html b/docs/buildroot.html
index 0d254b6..dfa69e0 100644
--- a/docs/buildroot.html
+++ b/docs/buildroot.html
@@ -36,10 +36,8 @@
<li><a href="#using_toolchain">Using the uClibc toolchain
outside Buildroot</a></li>
<li><a href="#external_toolchain">Use an external toolchain</a></li>
- <li><a href="#downloaded_packages">Location of downloaded packages</a>
- </li>
- <li><a href="#add_software">Extending Buildroot with more
- Software</a></li>
+ <li><a href="#downloaded_packages">Location of downloaded packages</a></li>
+ <li><a href="#add_packages">Adding new packages to Buildroot</a></li>
<li><a href="#board_support">Creating your own board support</a></li>
<li><a href="#links">Resources</a></li>
</ul>
@@ -221,7 +219,9 @@
directory is <i>not</i> intended to be the root filesystem for
the target: it contains a lot of development files, unstripped
binaries and libraries that make it far too big for an embedded
- system.</li>
+ system. These development files are used to compile libraries
+ and applications for the target that depend on other
+ libraries.</li>
<li><code>target/</code> which contains <i>almost</i> the root
filesystem for the target: everything needed is present except
@@ -474,9 +474,9 @@ $ export BUILDROOT_COPYTO=/tftpboot
uniformely named and handled by the different packages, so some
understanding of the particular package is needed.</p>
- <p>For packages relying on the <i>autotools</i> Buildroot
- infrastructure (see <a href="#add_software">this section</a> for
- details), the following stamp files are relevent:</p>
+ <p>For packages relying on Buildroot packages infrastructures (see
+ <a href="#add_packages">this section</a> for details), the
+ following stamp files are relevent:</p>
<ul>
@@ -493,7 +493,8 @@ $ export BUILDROOT_COPYTO=/tftpboot
<p>For other packages, an analysis of the specific
<i>package.mk</i> file is needed. For example, the zlib Makefile
- looks like:</p>
+ used to look like this (before it was converted to the generic
+ package infrastructure):</p>
<pre>
$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
@@ -512,6 +513,10 @@ $(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
you want to trigger only the recompilation, you need to remove
<code>output/build/zlib-version/libz.a</code>.</p>
+ <p>Note that most packages, if not all, will progressively be
+ ported over the generic or the autotools infrastructure, making it
+ much easier to rebuild individual packages.</p>
+
<h2><a name="buildroot_innards" id="buildroot_innards"></a>How Buildroot
works</h2>
@@ -522,7 +527,7 @@ $(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
<code>uClibc</code>). </p>
<p>There is basically one Makefile per software package, and they are named with
- the <code>.mk</code> extension. Makefiles are split into four
+ the <code>.mk</code> extension. Makefiles are split into three main
sections:</p>
<ul>
@@ -779,124 +784,633 @@ It allows generating toolchains based on <i>uClibc</i>, <i>glibc</i>
and <i>eglibc</i> for a wide range of architectures and has good
community support.</p>
- <h2><a name="add_software" id="add_software"></a>Extending Buildroot with
- more software</h2>
+ <h2><a name="add_packages" id="add_packages"></a>Adding new
+ packages to Buildroot</h2>
- <p>This section will only consider the case in which you want to
- add user-space software. </p>
+ <p>This section covers how new packages (userspace libraries or
+ applications) can be integrated into Buildroot. It also allows to
+ understand how existing packages are integrated, which is needed
+ to fix issues or tune their configuration.</p>
- <h3>Package directory</h3>
+ <ul>
+ <li><a href="#package-directory">Package directory</a></li>
+ <li><a href="#config-in-file"><code>Config.in</code> file</a></li>
+ <li><a href="#mk-file">The <code>.mk</code> file</a>
+ <ul>
+ <li><a href="#generic-tutorial">Makefile for generic
+ packages : tutorial</a></li>
+ <li><a href="#generic-reference">Makefile for
+ generic packages : reference</a></li>
+ <li><a href="#autotools-tutorial">Makefile for autotools-based
+ packages : tutorial</a></li>
+ <li><a href="#autotools-reference">Makefile for autotools-based
+ packages : reference</a></li>
+ <li><a href="#manual-tutorial">Manual Makefile : tutorial</a></li>
+ </ul>
+ </li>
+ </ul>
+
+ <h3><a name="package-directory"></a>Package directory</h3>
<p>First of all, create a directory under the <code>package</code>
directory for your software, for example <code>foo</code>. </p>
- <h3><code>Config.in</code> file</h3>
+ <p>Some packages have been grouped by topic in a sub-directory:
+ <code>multimedia</code>, <code>java</code>,
+ <code>databases</code>, <code>editors</code>, <code>x11r7</code>,
+ <code>games</code>. If your package fits in one of these
+ categories, then create your package directory in these.</p>
+
+ <h3><a name="config-in-file"></a><code>Config.in</code> file</h3>
<p>Then, create a file named <code>Config.in</code>. This file
will contain the option descriptions related to our
- <code>foo</code> software that will be used and displayed in the
- configuration tool. It should basically contain:</p>
+ <code>libfoo</code> software that will be used and displayed in the
+ configuration tool. It should basically contain :</p>
<pre>
-config BR2_PACKAGE_FOO
- bool "foo"
+config BR2_PACKAGE_LIBFOO
+ bool "libfoo"
help
- This is a comment that explains what foo is.
+ This is a comment that explains what libfoo is.
- http://foosoftware.org/foo/
+ http://foosoftware.org/libfoo/
</pre>
<p>Of course, you can add other options to configure particular
- things in your software. </p>
- <p>Finally you have to add your new <code>foo/Config.in</code> to
- <code>package/Config.in</code>. The files included there are
- <em>sorted alphabetically</em> per category and are <em>NOT</em>
- supposed to contain anything but the <em>bare</em> name of the package.</p>
+ things in your software. You can look at examples in other
+ packages. The syntax of the Config.in file is the same as the one
+ for the kernel Kconfig file. The documentation for this syntax is
+ available at <a
+ href="http://lxr.free-electrons.com/source/Documentation/kbuild/kconfig-language.txt">http://lxr.free-electrons.com/source/Documentation/kbuild/kconfig-language.txt</a></p>
+
+ <p>Finally you have to add your new <code>libfoo/Config.in</code> to
+ <code>package/Config.in</code> (or in a category subdirectory if
+ you decided to put your package in one of the existing
+ categories). The files included there are <em>sorted
+ alphabetically</em> per category and are <em>NOT</em> supposed to
+ contain anything but the <em>bare</em> name of the package.</p>
<pre>
-source "package/procps/Config.in"
+source "package/libfoo/Config.in"
</pre>
- <p><strong>Note:</strong><br>
- Generally all packages should live <em>directly</em> in the
- <code>package</code> directory to make it easier to find them.
- </p>
- <h3>The real Makefile</h3>
+
+ <h3><a name="mk-file"></a>The <code>.mk</code> file</h3>
<p>Finally, here's the hardest part. Create a file named
- <code>foo.mk</code>. It will contain the Makefile rules that
- are in charge of downloading, configuring, compiling and installing
- the software.</p>
+ <code>foo.mk</code>. It describes how the package should be
+ downloaded, configured, built, installed, etc.</p>
- <p>Two types of Makefiles can be written :</p>
+ <p>Depending on the package type, the <code>.mk</code> file must be
+ written in a different way, using different infrastructures:</p>
<ul>
- <li>Makefiles for autotools-based (autoconf, automake, etc.)
- software are very easy to write thanks to the infrastructure
- available in <code>package/Makefile.autotools.in</code>.</li>
- <li>Makefiles for other types of packages are a little bit more
- complex to write.</li>
+
+ <li>Makefiles for generic packages (not using autotools), based
+ on an infrastructure similar to the one used for autotools-based
+ packages, but which requires a little more work from the
+ developer : specify what should be done at for the configuration,
+ compilation, installation and cleanup of the package. This
+ infrastructure must be used for all packages that do not use the
+ autotools as their build system. In the future, other specialized
+ infrastructures might be written for other build systems.<br/>We
+ cover them through a <a
+ href="#generic-tutorial">tutorial</a> and a <a
+ href="#generic-reference">reference</a>.</li>
+
+ <li>Makefiles for autotools-based (autoconf, automake, etc.)
+ softwares. We provide a dedicated infrastructure for such
+ packages, since autotools is a very common build system. This
+ infrastructure <i>must</i> be used for new packages that rely on
+ the autotools as their build system.<br/>We cover them through a
+ <a href="#autotools-tutorial">tutorial</a> and a <a
+ href="#autotools-reference">reference</a>.</li>
+
+ <li>Manual Makefiles. These are currently obsolete and no new
+ manual Makefiles should be added. However, since there are still
+ many of them in the tree and because the , we keep them documented in a <a
+ href="#manual-tutorial">tutorial</a>.</li>
+
</ul>
- <p>First, let's see how to write a Makefile for an
- autotools-based package, with an example :</p>
+ <h4><a name="generic-tutorial"></a>Makefile for generic packages :
+ tutorial</h4>
+
+ <pre><tt><span style="color: #000000">01:</span> <span style="font-style: italic"><span style="color: #9A1900">#############################################################</span></span>
+<span style="color: #000000">02:</span> <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
+<span style="color: #000000">03:</span> <span style="font-style: italic"><span style="color: #9A1900"># libfoo</span></span>
+<span style="color: #000000">04:</span> <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
+<span style="color: #000000">05:</span> <span style="font-style: italic"><span style="color: #9A1900">#############################################################</span></span>
+<span style="color: #000000">06:</span> <span style="color: #990000">LIBFOO_VERSION:=</span>1.0
+<span style="color: #000000">07:</span> <span style="color: #990000">LIBFOO_SOURCE:=</span>libfoo-<span style="color: #009900">$(LIBFOO_VERSION)</span>.tar.gz
+<span style="color: #000000">08:</span> <span style="color: #990000">LIBFOO_SITE:=</span>http<span style="color: #990000">:</span>//www.foosoftware.org/download
+<span style="color: #000000">09:</span> <span style="color: #009900">LIBFOO_INSTALL_STAGING=</span>YES
+<span style="color: #000000">10:</span> <span style="color: #009900">LIBFOO_DEPENDENCIES =</span> host-libaaa libbbb
+<span style="color: #000000">11:</span>
+<span style="color: #000000">12:</span> define LIBFOO_BUILD_CMDS
+<span style="color: #000000">13:</span> <span style="color: #009900">$(MAKE)</span> <span style="color: #009900">CC</span><span style="color: #990000">=</span><span style="color: #009900">$(TARGET_CC)</span> <span style="color: #009900">LD</span><span style="color: #990000">=</span><span style="color: #009900">$(TARGET_LD)</span> -C <span style="color: #009900">$(@D)</span> all
+<span style="color: #000000">14:</span> endef
+<span style="color: #000000">15:</span>
+<span style="color: #000000">16:</span> define LIBFOO_INSTALL_STAGING_CMDS
+<span style="color: #000000">17:</span> <span style="color: #009900">$(INSTALL)</span> -D <span style="color: #009900">$(@D)</span>/libfoo.a <span style="color: #009900">$(STAGING_DIR)</span>/usr/lib/libfoo.a
+<span style="color: #000000">18:</span> <span style="color: #009900">$(INSTALL)</span> -D <span style="color: #009900">$(@D)</span>/foo.h <span style="color: #009900">$(STAGING_DIR)</span>/usr/include/foo.h
+<span style="color: #000000">19:</span> cp -dpf <span style="color: #009900">$(@D)</span>/libfoo.so<span style="color: #990000">*</span> <span style="color: #009900">$(STAGING_DIR)</span>/usr/lib
+<span style="color: #000000">20:</span> endef
+<span style="color: #000000">21:</span>
+<span style="color: #000000">22:</span> define LIBFOO_INSTALL_TARGET_CMDS
+<span style="color: #000000">23:</span> cp -dpf <span style="color: #009900">$(@D)</span>/libfoo.so<span style="color: #990000">*</span> <span style="color: #009900">$(TARGET_DIR)</span>/usr/lib
+<span style="color: #000000">24:</span> -<span style="color: #009900">$(STRIPCMP)</span> <span style="color: #009900">$(STRIP_STRIP_UNNEEDED)</span> <span style="color: #009900">$(TARGET_DIR)</span>/isr/lib/libfoo.so<span style="color: #990000">*</span>
+<span style="color: #000000">25:</span> endef
+<span style="color: #000000">26:</span>
+<span style="color: #000000">27:</span> <span style="color: #009900">$(</span><span style="font-weight: bold"><span style="color: #0000FF">eval</span></span> <span style="color: #009900">$(</span>call GENTARGETS<span style="color: #990000">,</span>package<span style="color: #990000">,</span>libfoo<span style="color: #990000">))</span></tt></pre>
+
+ <p>The Makefile begins on line 6 to 8 by metadata informations: the
+ version of the package (<code>LIBFOO_VERSION</code>), the name of
+ the tarball containing the package (<code>LIBFOO_SOURCE</code>) and
+ the Internet location at which the tarball can be downloaded
+ (<code>LIBFOO_SITE</code>). All variables must start with the same
+ prefix, <code>LIBFOO_</code> in this case. This prefix is always
+ the uppercased version of the package name (see below to understand
+ where the package name is defined).</p>
+
+ <p>On line 9, we specify that this package wants to install
+ something to the staging space. This is often needed for libraries
+ since they must install header files and other development files in
+ the staging space. This will ensure that the commands listed in the
+ <code>LIBFOO_INSTALL_STAGING_CMDS</code> variable will be
+ executed.</p>
+
+ <p>On line 10, we specify the list of dependencies this package
+ relies on. These dependencies are listed in terms of lower-case
+ package names, which can be packages for the target (without the
+ <code>host-</code> prefix) or packages for the host (with the
+ <code>host-</code>) prefix). Buildroot will ensure that all these
+ packages are built and installed <i>before</i> the current package
+ starts its configuration.</p>
+
+ <p>The rest of the Makefile defines what should be done at the
+ different steps of the package configuration, compilation and
+ installation. <code>LIBFOO_BUILD_CMDS</code> tells what steps
+ should be performed to build the
+ package. <code>LIBFOO_INSTALL_STAGING_CMDS</code> tells what steps
+ should be performed to install the package in the staging
+ space. <code>LIBFOO_INSTALL_TARGET_CMDS</code> tells what steps
+ should be performed to install the package in the target space.</p>
+
+ <p>All these steps rely on the <code>$(@D)</code> variable, which
+ contains the directory where the source code of the package has
+ been extracted.</p>
+
+ <p>Finally, on line 27, we call the <code>GENTARGETS</code> which
+ generates, according to the variables defined previously, all the
+ Makefile code necessary to make your package working.</p>
+
+ <h4><a name="generic-reference"></a>Makefile for generic packages :
+ reference</h4>
+
+ <p>The <code>GENTARGETS</code> macro takes three arguments:</p>
+
+ <ul>
+
+ <li>The first argument is the package directory prefix. If your
+ package is in <code>package/libfoo</code>, then the directory
+ prefix is <code>package</code>. If your package is in
+ <code>package/editors/foo</code>, then the directory prefix must
+ be <code>package/editors</code>.</li>
+
+ <li>The second argument is the lower-cased package name. It must
+ match the prefix of the variables in the <code>.mk</code> file
+ and must match the configuration option name in the
+ <code>Config.in</code> file. For example, if the package name is
+ <code>libfoo</code>, so the variables in the <code>.mk</code>
+ must start with <code>LIBFOO_</code> and the configuration option
+ in the <code>Config.in</code> file must be
+ <code>BR2_PACKAGE_LIBFOO</code>.</li>
+
+ <li>The third argument is optional. It can be used to tell if the
+ package if a target package (cross-compiled for the target) or a
+ host package (natively compiled for the host). If unspecified, it
+ is assumed that it is a target package. See below for
+ details.</li>
+
+ </ul>
+
+ <p>For a given package, in a single <code>.mk</code> file, it is
+ possible to call GENTARGETS twice, once to create the rules to
+ generate a target package and once to create the rules to generate
+ a host package:</p>
+
+<pre>
+$(eval $(call GENTARGETS,package,libfoo))
+$(eval $(call GENTARGETS,package,libfoo,host))
+</pre>
+
+ <p>This might be useful if the compilation of the target package
+ requires some tools to be installed on the host. If the package
+ name is <code>libfoo</code>, then the name of the package for the
+ target is also <code>libfoo</code>, while the name of the package
+ for the host is <code>host-libfoo</code>. These names should be
+ used in the DEPENDENCIES variables of other packages if they depend
+ on <code>libfoo</code> or <code>host-libfoo</code>.</p>
+
+ <p>The call to the <code>GENTARGETS</code> macro <b>must</b> be at
+ the end of the <code>.mk</code> file, after all variable
+ definitions.</p>
+
+ <p>For the target package, the <code>GENTARGETS</code> uses the
+ variables defined by the .mk file and prefixed by the uppercased
+ package name: <code>LIBFOO_*</code>. For target package, it uses
+ the <code>HOST_LIBFOO_*</code>. For <i>some</i> variables, if the
+ <code>HOST_LIBFOO_</code> prefixed variable doesn't exist, the
+ package infrastructure uses the corresponding variable prefixed by
+ <code>LIBFOO_</code>. This is done for variables that are likely to
+ have the same value for both the target and host packages. See
+ below for details.</p>
+
+ <p>The list of variables that can be set in a <code>.mk</code> file
+ to give metadata informations is (assuming the package name is
+ <code>libfoo</code>) :</p>
+
+ <ul>
+
+ <li><code>LIBFOO_VERSION</code>, mandatory, must contain the
+ version of the package. Note that if
+ <code>HOST_LIBFOO_VERSION</code> doesn't exist, it is assumed to
+ be the same as <code>LIBFOO_VERSION</code>.<br/>Example:
+ <code>LIBFOO_VERSION=0.1.2</code></li>
+
+ <li><code>LIBFOO_SOURCE</code> may contain the name of the
+ tarball of the package. If <code>HOST_LIBFOO_SOURCE</code> is not
+ specified, it defaults to <code>LIBFOO_VERSION</code>. If none
+ are specified, then the value is assumed to be
+ <code>packagename-$(LIBFOO_VERSION).tar.gz</code>.<br/>Example:
+ <code>LIBFOO_SOURCE =
+ foobar-$(LIBFOO_VERSION).tar.bz2</code></li>
+
+ <li><code>LIBFOO_PATCH</code> may contain the name of a patch,
+ that will be downloaded from the same location as the tarball
+ indicated in <code>LIBFOO_SOURCE</code>. If
+ <code>HOST_LIBFOO_PATCH</code> is not specified, it defaults to
+ <code>LIBFOO_PATCH</code>. Also note that another mechanism is
+ available to patch a package: all files of the form
+ <code>packagename-packageversion-description.patch</code> present
+ in the package directory inside Buildroot will be applied to the
+ package after extraction.</li>
+
+ <li><code>LIBFOO_SITE</code> may contain the Internet location of
+ the tarball of the package. If <code>HOST_LIBFOO_SITE</code> is
+ not specified, it defaults to <code>LIBFOO_SITE</code>. If none
+ are specified, then the location is assumed to be
+ <code>http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/packagename</code>.<br/>Example:
+ <code>LIBFOO_SITE=http://www.foosoftware.org/libfoo</code>.</li>
+
+ <li><code>LIBFOO_DEPENDENCIES</code> lists the dependencies (in
+ terms of package name) that are required for the current target
+ package to compile. These dependencies are guaranteed to be
+ compiled and installed before the configuration of the current
+ package starts. In a similar way,
+ <code>HOST_LIBFOO_DEPENDENCIES</code> lists the dependency for
+ the current host package.</li>
+
+ <li><code>LIBFOO_INSTALL_STAGING</code> can be set to
+ <code>YES</code> or <code>NO</code> (default). If set to
+ <code>YES</code>, then the commands in the
+ <code>LIBFOO_INSTALL_STAGING_CMDS</code> variables are executed
+ to install the package into the staging directory.</p>
+
+ <li><code>LIBFOO_INSTALL_TARGET</code> can be set to
+ <code>YES</code> (default) or <code>NO</code>. If set to
+ <code>YES</code>, then the commands in the
+ <code>LIBFOO_INSTALL_TARGET_CMDS</code> variables are executed
+ to install the package into the target directory.</p>
+
+ </ul>
+
+ <p>The recommended way to define these variables is to use the
+ following syntax:</p>
<pre>
- <a name="ex1line1" id="ex1line1">1</a> #############################################################
- <a name="ex1line2" id="ex1line2">2</a> #
- <a name="ex1line3" id="ex1line3">3</a> # foo
- <a name="ex1line4" id="ex1line4">4</a> #
- <a name="ex1line5" id="ex1line5">5</a> #############################################################
- <a name="ex1line6" id="ex1line6">6</a> FOO_VERSION:=1.0
- <a name="ex1line7" id="ex1line7">7</a> FOO_SOURCE:=foo-$(FOO_VERSION).tar.gz
- <a name="ex1line8" id="ex1line8">8</a> FOO_SITE:=http://www.foosoftware.org/downloads
- <a name="ex1line9" id="ex1line9">9</a> FOO_INSTALL_STAGING = YES
- <a name="ex1line10" id="ex1line10">10</a> FOO_INSTALL_TARGET = YES
- <a name="ex1line11" id="ex1line11">11</a> FOO_CONF_OPT = --enable-shared
- <a name="ex1line12" id="ex1line12">12</a> FOO_DEPENDENCIES = libglib2 host-pkgconfig
- <a name="ex1line13" id="ex1line13">13</a> $(eval $(call AUTOTARGETS,package,foo))
+LIBFOO_VERSION=2.32
</pre>
- <p>On <a href="#ex1line6">line 6</a>, we declare the version of
- the package. On lines <a href="#ex1line7">7</a> and <a
- href="#ex1line8">8</a>, we declare the name of the tarball and the
- location of the tarball on the web. Buildroot will automatically
- download the tarball from this location.</p>
-
- <p>On <a href="#ex1line9">line 9</a>, we tell Buildroot to install
- the application to the staging directory. The staging directory,
- located in <code>output/staging/</code> is the directory
- where all the packages are installed, including their
- documentation, etc. By default, packages are installed in this
+ <p>Now, the variables that define what should be performed at the
+ different steps of the build process.</p>
+
+ <ul>
+
+ <li><code>LIBFOO_CONFIGURE_CMDS</code>, used to list the
+ actions to be performed to configure the package before its
+ compilation</li>
+
+ <li><code>LIBFOO_BUILD_CMDS</code>, used to list the actions to
+ be performed to compile the package</li>
+
+ <li><code>HOST_LIBFOO_INSTALL_CMDS</code>, used to list the
+ actions to be performed to install the package, when the
+ package is a host package. The package must install its files
+ to the directory given by <code>$(HOST_DIR)</code>. All files,
+ including development files such as headers should be
+ installed, since other packages might be compiled on top of
+ this package.</li>
+
+ <li><code>LIBFOO_INSTALL_TARGET_CMDS</code>, used to list the
+ actions to be performed to install the package to the target
+ directory, when the package is a target package. The package
+ must install its files to the directory given by
+ <code>$(TARGET_DIR)</code>. Only the files required for
+ <i>execution</i> of the package should be installed. Header
+ files and documentation should not be installed.</li>
+
+ <li><code>LIBFOO_INSTALL_STAGING_CMDS</code>, used to list the
+ actions to be performed to install the package to the staging
+ directory, when the package is a target package. The package
+ must install its files to the directory given by
+ <code>$(STAGING_DIR)</code>. All development files should be
+ installed, since they might be needed to compile other
+ packages.</li>
+
+ <li><code>LIBFOO_CLEAN_CMDS</code>, used to list the actions to
+ perform to clean up the build directory of the package.</li>
+
+ <li><code>LIBFOO_UNINSTALL_TARGET_CMDS</code>, used to list the
+ actions to uninstall the package from the target directory
+ <code>$(TARGET_DIR)</code></li>
+
+ <li><code>LIBFOO_UNINSTALL_STAGING_CMDS</code></li>, used to
+ list the actions to uninstall the package from the staging
+ directory <code>$(STAGING_DIR)</code>.</li>
+
+ </ul>
+
+ <p>The preferred way to define these variables is:</p>
+
+<pre>
+define LIBFOO_CONFIGURE_CMDS
+ action 1
+ action 2
+ action 3
+endef</pre>
+
+ <p>In the action definitions, you can use the following
+ variables:</p>
+
+ <ul>
+
+ <li><code>$(@D)</code>, which contains the directory in which
+ the package source code has been uncompressed.</li>
+
+ <li><code>$(TARGET_CC)</code>, <code>$(TARGET_LD)</code>,
+ etc. to get the target cross-compilation utilities</li>
+
+ <li><code>$(TARGET_CROSS)</code> to get the cross-compilation
+ toolchain prefix</li>
+
+ <li>Of course the <code>$(HOST_DIR)</code>,
+ <code>$(STAGING_DIR)</code> and <code>$(TARGET_DIR)</code>
+ variables to install the packages properly.</li>
+
+ </ul>
+
+
+ <p>The last feature of the generic infrastructure is the ability
+ to add hook more actions after existing steps. These hooks aren't
+ really useful for generic packages, since the <code>.mk</code>
+ file already has full control over the actions performed in each
+ step of the package construction. The hooks are more useful for
+ packages using the autotools infrastructure described below. But
+ since they are provided by the generic infrastructure, they are
+ documented here.</p>
+
+ <p>The following hook points are available:</p>
+
+ <ul>
+ <li><code>LIBFOO_POST_PATCH_HOOKS</code></li>
+ <li><code>LIBFOO_POST_CONFIGURE_HOOKS</code></li>
+ <li><code>LIBFOO_POST_BUILD_HOOKS</code></li>
+ <li><code>LIBFOO_POST_INSTALL_HOOKS</code> (for host packages only)</li>
+ <li><code>LIBFOO_POST_INSTALL_STAGING_HOOKS</code> (for target packages only)</li>
+ <li><code>LIBFOO_POST_INSTALL_TARGET_HOOKS</code> (for target packages only)</li>
+ </ul>
+
+ <p>This variables are <i>lists</i> of variable names containing
+ actions to be performed at this hook point. This allows several
+ hooks to be registered at a given hook point. Here is an
+ example:</p>
+
+ <pre>
+define LIBFOO_POST_PATCH_FIXUP
+ action1
+ action2
+endef
+
+LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
+</pre>
+
+ <h4><a name="autotools-tutorial"></a>Makefile for autotools-based
+ packages : tutorial</h4>
+
+ <p>First, let's see how to write a <code>.mk</code> file for an
+ autotools-based package, with an example :</p>
+
+<pre><tt><span style="color: #000000">01:</span> <span style="font-style: italic"><span style="color: #9A1900">#############################################################</span></span>
+<span style="color: #000000">02:</span> <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
+<span style="color: #000000">03:</span> <span style="font-style: italic"><span style="color: #9A1900"># foo</span></span>
+<span style="color: #000000">04:</span> <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
+<span style="color: #000000">05:</span> <span style="font-style: italic"><span style="color: #9A1900">#############################################################</span></span>
+<span style="color: #000000">06:</span>
+<span style="color: #000000">07:</span> <span style="color: #990000">FOO_VERSION:=</span>1.0
+<span style="color: #000000">08:</span> <span style="color: #990000">FOO_SOURCE:=</span>foo-<span style="color: #009900">$(FOO_VERSION)</span>.tar.gz
+<span style="color: #000000">09:</span> <span style="color: #990000">FOO_SITE:=</span>http<span style="color: #990000">:</span>//www.foosoftware.org/downloads
+<span style="color: #000000">10:</span> <span style="color: #009900">FOO_INSTALL_STAGING =</span> YES
+<span style="color: #000000">11:</span> <span style="color: #009900">FOO_INSTALL_TARGET =</span> YES
+<span style="color: #000000">12:</span> <span style="color: #009900">FOO_CONF_OPT =</span> --enable-shared
+<span style="color: #000000">13:</span> <span style="color: #009900">FOO_DEPENDENCIES =</span> libglib2 host-pkg-config
+<span style="color: #000000">14:</span>
+<span style="color: #000000">15:</span> <span style="color: #009900">$(</span><span style="font-weight: bold"><span style="color: #0000FF">eval</span></span> <span style="color: #009900">$(</span>call AUTOTARGETS<span style="color: #990000">,</span>package<span style="color: #990000">,</span>foo<span style="color: #990000">))</span></tt></pre>
+
+ <p>On line 7, we declare the version of the package. On line 8 and
+ 9, we declare the name of the tarball and the location of the
+ tarball on the Web. Buildroot will automatically download the
+ tarball from this location.</p>
+
+ <p>On line 10, we tell Buildroot to install the package to the
+ staging directory. The staging directory, located in
+ <code>output/staging/</code> is the directory where all the
+ packages are installed, including their development files, etc. By
+ default, packages are not installed to the staging directory,
+ since usually, only libraries need to be installed in the staging
+ directory: their development files are needed to compile other
+ libraries or applications depending on them. Also by default, when
+ staging installation is enabled, packages are installed in this
location using the <code>make install</code> command.</p>
- <p>On <a href="#ex1line10">line 10</a>, we tell Buildroot to also
- install the application to the target directory. This directory
- contains what will become the root filesystem running on the
- target. Usually, we try to install stripped binaries and
- to not install the documentation. By default, packages are
+ <p>On line 11, we tell Buildroot to also install the package to
+ the target directory. This directory contains what will become the
+ root filesystem running on the target. Usually, we try not to
+ install the documentation and to install stripped versions of the
+ binary. By default, target installation is enabled, so in fact,
+ this line is not strictly necessary. Also by default, packages are
installed in this location using the <code>make
install-strip</code> command.</p>
- <p>On <a href="#ex1line11">line 11</a>, we tell Buildroot to pass
- a custom configure option to the
- <code>./configure</code> script when configuring the
- the package.</p>
+ <p>On line 12, we tell Buildroot to pass a custom configure
+ option, that will be passed to the <code>./configure</code> script
+ before configuring and building the package.</p>
+
+ <p>On line 13, we declare our dependencies, so that they are built
+ before the build process of our package starts.</p>
+
+ <p>Finally, on line line 14, we invoke the
+ <code>AUTOTARGETS</code> macro that generates all the Makefile
+ rules that actually allows the package to be built.</p>
+
+ <h4><a name="autotools-reference"></a>Makefile for autotools
+ packages : reference</h4>
+
+ <p>The main macro of the autotools package infrastructure is
+ <code>AUTOTARGETS</code>. It has the same number of arguments and
+ the same semantic as the <code>GENTARGETS</code> macro, which is
+ the main macro of the generic package infrastructure. For
+ autotools packages, the ability to have target and host packages
+ is also available (and is actually widely used).</p>
+
+ <p>Just like the generic infrastructure, the autotools
+ infrastructure works by defining a number of variables before
+ calling the <code>AUTOTARGETS</code> macro.</p>
+
+ <p>First, all the package meta-information variables that exist in
+ the generic infrastructure also exist in the autotools
+ infrastructure: <code>LIBFOO_VERSION</code>,
+ <code>LIBFOO_SOURCE</code>, <code>LIBFOO_PATCH</code>,
+ <code>LIBFOO_SITE</code>, <code>LIBFOO_SUBDIR</code>,
+ <code>LIBFOO_DEPENDENCIES</code>,
+ <code>LIBFOO_INSTALL_STAGING</code>,
+ <code>LIBFOO_INSTALL_TARGET</code>.</p>
+
+ <p>A few additional variables, specific to the autotools
+ infrastructure, can also be defined. Many of them are only useful
+ in very specific cases, typical packages will therefore only use a
+ few of them.</p>
+
+ <ul>
+
+ <li><code>LIBFOO_SUBDIR</code> may contain the name of a
+ subdirectory inside the package that contains the configure
+ script. This is useful, if for example, the main configure
+ script is not at the root of the tree extracted by the
+ tarball. If <code>HOST_LIBFOO_SUBDIR</code> is not specified, it
+ defaults to <code>LIBFOO_SUBDIR</code>.</li>
+
+ <li><code>LIBFOO_CONF_ENV</code>, to specify additional
+ environment variables to pass to the configure script. By
+ default, empty.</li>
+
+ <li><code>LIBFOO_CONF_OPT</code>, to specify additional
+ configure options to pass to the configure script. By default,
+ empty.</li>
+
+ <li><code>LIBFOO_MAKE</code>, to specify an
+ alternate <code>make</code> command. This is typically useful
+ when parallel make it enabled in the configuration
+ (using <code>BR2_JLEVEL</code>) but that this feature should be
+ disabled for the given package, for one reason or another. By
+ default, set to <code>$(MAKE)</code>. If parallel building is
+ not supported by the package, then it should
+ do <code>LIBFOO_MAKE=$(MAKE1)</code>.</li>
+
+ <li><code>LIBFOO_MAKE_ENV</code>, to specify additional
+ environment variables to pass to make in the build step. These
+ are passed before the <code>make</code> command. By default,
+ empty.</li>
+
+ <li><code>LIBFOO_MAKE_OPT</code>, to specify additional
+ variables to pass to make in the build step. These are passed
+ after the <code>make</code> command. By default, empty.</li>
+
+ <li><code>LIBFOO_AUTORECONF</code>, tells whether the package
+ should be autoreconfigured or not (i.e, if the configure script
+ and Makefile.in files should be re-generated by re-running
+ autoconf, automake, libtool, etc.). Valid values
+ are <code>YES</code> and <code>NO</code>. By default, the value
+ is <code>NO</code></li>
+
+ <li><code>LIBFOO_AUTORECONF_OPT</code> to specify additional
+ options passed to the <i>autoreconf</i> program
+ if <code>LIBFOO_AUTORECONF=YES</code>. By default, empty.</li>
+
+ <li><code>LIBFOO_LIBTOOL_PATCH</code> tells whether the
+ Buildroot patch to fix libtool cross-compilation issues should
+ be applied or not. Valid values are <code>YES</code>
+ and <code>NO</code>. By default, the value
+ is <code>YES</code></li>
+
+ <li><code>LIBFOO_USE_CONFIG_CACHE</code> tells whether the
+ configure script should really on a cache file that caches test
+ results from previous configure script. Usually, this variable
+ should be left to its default value. Only for specific packages
+ having issues with the configure cache can set this variable to
+ the <code>NO</code> value (but this is more a work-around than a
+ really fix)</li>
+
+ <li><code>LIBFOO_INSTALL_STAGING_OPT</code> contains the make
+ options used to install the package to the staging directory. By
+ default, the value is <code>DESTDIR=$$(STAGING_DIR)
+ install</code>, which is correct for most autotools packages. It
+ is still possible to override it.</li>
+
+ <li><code>LIBFOO_INSTALL_TARGET_OPT</code> contains the make
+ options used to install the package to the target directory. By
+ default, the value is <code>DESTDIR=$$(TARGET_DIR)
+ install-strip</code> if <code>BR2_ENABLE_DEBUG</code> is not
+ set, and <code>DESTDIR=$$(TARGET_DIR) install-exec</code>
+ if <code>BR2_ENABLE_DEBUG</code> is set. These default values
+ are correct for most autotools packages, but it is still
+ possible to override them if needed.</li>
+
+ <li><code>LIBFOO_CLEAN_OPT</code> contains the make options used
+ to clean the package. By default, the value
+ is <code>clean</code>.</li>
+
+ <li><code>LIBFOO_UNINSTALL_STAGING_OPT</code>, contains the make
+ options used to uninstall the package from the staging
+ directory. By default, the value is
+ <code>DESTDIR=$$(STAGING_DIR) uninstall</code>.</li>
+
+ <li><code>LIBFOO_UNINSTALL_TARGET_OPT</code>, contains the make
+ options used to uninstall the package from the target
+ directory. By default, the value is
+ <code>DESTDIR=$$(TARGET_DIR) uninstall</code>.</li>
+
+ </ul>
- <p>On <a href="#ex1line12">line 12</a>, we declare our
- dependencies so that they are built before the build process of
- our package starts.</p>
+ <p>With the autotools infrastructure, all the steps required to
+ build and install the packages are already defined, and they
+ generally work well for most autotools-based packages. However,
+ when required, it is still possible to customize what is done in
+ particular step:</p>
- <p>Finally, on line <a href="#ex1line13">line 13</a>, we invoke
- the <code>package/Makefile.autotools.in</code> magic to get things
- working.</p>
+ <ul>
+
+ <li>By adding a post-operation hook (after extract, patch,
+ configure, build or install). See the reference documentation of
+ the generic infrastructure for details.</li>
- <p>For more details about the available variables and options, see
- the comment at the top of
- <code>package/Makefile.autotools.in</code> and the examples in all
- the available packages.</p>
+ <li>By overriding one of the steps. For example, even if the
+ autotools infrastructure is used, if the package
+ <code>.mk</code> defines its own
+ <code>LIBFOO_CONFIGURE_CMDS</code> variable, it will be used
+ instead of the default autotools one. However, using this method
+ should be restricted to very specific cases. Do not use it in
+ the general case.</li>
+
+ </ul>
- <p>The second solution, suitable for every type of package, looks
- like this :</p>
+ <h4><a name="manual-tutorial"></a>Manual Makefile : tutorial</h4>
+ <p><b>NOTE: new manual makefiles should not be created, and
+ existing manual makefiles should be converted either to the
+ generic infrastructure or the autotools infrastructure. This
+ section is only kept to document the existing manual makefiles and
+ help understanding how they work.</b></p>
<pre>
<a name="ex2line1" id="ex2line1">1</a> #############################################################
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 39/39] documentation: slightly improve CSS
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (37 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 38/39] documentation: update about new package infrastructures Thomas Petazzoni
@ 2009-12-15 19:31 ` Thomas Petazzoni
2009-12-16 9:29 ` Paulius Zaleckas
2009-12-15 21:45 ` [Buildroot] [pull request] Pull request for branch package-infrastructure Sven Neumann
2009-12-16 15:33 ` Peter Korsgaard
40 siblings, 1 reply; 46+ messages in thread
From: Thomas Petazzoni @ 2009-12-15 19:31 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
docs/stylesheet.css | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/docs/stylesheet.css b/docs/stylesheet.css
index 2c36417..ac938c5 100644
--- a/docs/stylesheet.css
+++ b/docs/stylesheet.css
@@ -49,6 +49,16 @@ h3 {
margin-left: 10px;
margin-right: 10px;
color: #336699;
+ border-bottom: 2px solid #336699;
+}
+
+h4 {
+ font: italic normal 14pt georgia;
+ letter-spacing: 1px;
+ margin-bottom: 0px;
+ margin-left: 10px;
+ margin-right: 10px;
+ border-bottom: 1px dashed black;
}
p {
--
1.6.3.3
^ permalink raw reply related [flat|nested] 46+ messages in thread* [Buildroot] [PATCH 39/39] documentation: slightly improve CSS
2009-12-15 19:31 ` [Buildroot] [PATCH 39/39] documentation: slightly improve CSS Thomas Petazzoni
@ 2009-12-16 9:29 ` Paulius Zaleckas
0 siblings, 0 replies; 46+ messages in thread
From: Paulius Zaleckas @ 2009-12-16 9:29 UTC (permalink / raw)
To: buildroot
On 12/15/2009 09:31 PM, Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
> docs/stylesheet.css | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/docs/stylesheet.css b/docs/stylesheet.css
> index 2c36417..ac938c5 100644
> --- a/docs/stylesheet.css
> +++ b/docs/stylesheet.css
> @@ -49,6 +49,16 @@ h3 {
> margin-left: 10px;
> margin-right: 10px;
> color: #336699;
> + border-bottom: 2px solid #336699;
> +}
> +
> +h4 {
> + font: italic normal 14pt georgia;
> + letter-spacing: 1px;
> + margin-bottom: 0px;
> + margin-left: 10px;
> + margin-right: 10px;
> + border-bottom: 1px dashed black;
Please use tabs *or* spaces for indentation.
> }
>
> p {
^ permalink raw reply [flat|nested] 46+ messages in thread
* [Buildroot] [pull request] Pull request for branch package-infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (38 preceding siblings ...)
2009-12-15 19:31 ` [Buildroot] [PATCH 39/39] documentation: slightly improve CSS Thomas Petazzoni
@ 2009-12-15 21:45 ` Sven Neumann
2009-12-16 6:46 ` Lionel Landwerlin
2009-12-16 15:33 ` Peter Korsgaard
40 siblings, 1 reply; 46+ messages in thread
From: Sven Neumann @ 2009-12-15 21:45 UTC (permalink / raw)
To: buildroot
Hi,
On Tue, 2009-12-15 at 20:30 +0100, Thomas Petazzoni wrote:
> This patchset :
>
> * implements a new infrastructure to support all type of packages,
> not only packages relying on the autotools build system. Through
> the new GENTARGETS macro, implemented in
> package/Makefile.package.in, we will be able to write simpler .mk
> files and be able to factorize the common parts of the different
> .mk files. This infrastructure support building both host and
> target packages.
>
> * rebases the existing autotools infrastructure on top of the new
> generic infrastructure. This rebasing has no impact on the existing
> .mk files for autotools packages. With this rebasing, the autotools
> infrastructure gains the ability to build host packages.
>
> * simplifies most (if not all) .mk files of autotools-based packages
> that required an host version to be compiled (xutil_makedepend,
> xproto_xproto, pixman, m4, mtd-utils, lzo, libusb, libgtk2, gob2,
> expat, dbus-glib, shared-mime-info, libxml2, freetype, fontconfig,
> directfb, dbus, atk, pango, libtool, libglib2, cairo, automake,
> pkg-config)
>
> * bumps the version of autoconf to 2.65 and finally fixes the
> host-autoconf build problem when sh is symlinked to dash.
>
> * converts a few packages to the generic infrastructure (zlib, olsr,
> udev)
>
> * updates and extends the documentation to cover the new
> infrastructures with examples and reference information
I only had a quick look at your patches, but I think I can already can
say that this looks wonderful. With these changes, it becomes a lot
simpler to create and to maintain buildroot packages. Thanks for your
work on this.
Sven
^ permalink raw reply [flat|nested] 46+ messages in thread* [Buildroot] [pull request] Pull request for branch package-infrastructure
2009-12-15 21:45 ` [Buildroot] [pull request] Pull request for branch package-infrastructure Sven Neumann
@ 2009-12-16 6:46 ` Lionel Landwerlin
0 siblings, 0 replies; 46+ messages in thread
From: Lionel Landwerlin @ 2009-12-16 6:46 UTC (permalink / raw)
To: buildroot
Le mardi 15 d?cembre 2009 ? 22:45 +0100, Sven Neumann a ?crit :
> Hi,
>
> On Tue, 2009-12-15 at 20:30 +0100, Thomas Petazzoni wrote:
>
> > This patchset :
> >
> > * implements a new infrastructure to support all type of packages,
> > not only packages relying on the autotools build system. Through
> > the new GENTARGETS macro, implemented in
> > package/Makefile.package.in, we will be able to write simpler .mk
> > files and be able to factorize the common parts of the different
> > .mk files. This infrastructure support building both host and
> > target packages.
> >
> > * rebases the existing autotools infrastructure on top of the new
> > generic infrastructure. This rebasing has no impact on the existing
> > .mk files for autotools packages. With this rebasing, the autotools
> > infrastructure gains the ability to build host packages.
> >
> > * simplifies most (if not all) .mk files of autotools-based packages
> > that required an host version to be compiled (xutil_makedepend,
> > xproto_xproto, pixman, m4, mtd-utils, lzo, libusb, libgtk2, gob2,
> > expat, dbus-glib, shared-mime-info, libxml2, freetype, fontconfig,
> > directfb, dbus, atk, pango, libtool, libglib2, cairo, automake,
> > pkg-config)
> >
> > * bumps the version of autoconf to 2.65 and finally fixes the
> > host-autoconf build problem when sh is symlinked to dash.
> >
> > * converts a few packages to the generic infrastructure (zlib, olsr,
> > udev)
> >
> > * updates and extends the documentation to cover the new
> > infrastructures with examples and reference information
>
> I only had a quick look at your patches, but I think I can already can
> say that this looks wonderful. With these changes, it becomes a lot
> simpler to create and to maintain buildroot packages. Thanks for your
> work on this.
>
>
> Sven
Thanks again for your work Thomas.
I hope thoses patchs will be integrated soon, so we can update most of
the packages for this architecture.
--
Lionel Landwerlin
^ permalink raw reply [flat|nested] 46+ messages in thread
* [Buildroot] [pull request] Pull request for branch package-infrastructure
2009-12-15 19:30 [Buildroot] [pull request] Pull request for branch package-infrastructure Thomas Petazzoni
` (39 preceding siblings ...)
2009-12-15 21:45 ` [Buildroot] [pull request] Pull request for branch package-infrastructure Sven Neumann
@ 2009-12-16 15:33 ` Peter Korsgaard
40 siblings, 0 replies; 46+ messages in thread
From: Peter Korsgaard @ 2009-12-16 15:33 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> I have tested this patchset in various conditions, but the changes are
Thomas> sufficiently complicated that I cannot guarantee a bug-free transition
Thomas> to these infrastructures. That's why I think such changes should be
Thomas> merge early in the Buildroot development period, so that we have
Thomas> enough time before 2010.02 to stabilize these changes (and make a
Thomas> larger use of the new infrastructures).
Pulled and pushed, thanks a lot! I found a few minor issues, but have
fixed those up myself.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 46+ messages in thread