Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
define inner-autotools-package
-# define package-specific variables to default values
-ifndef $(2)_SUBDIR
- ifdef $(3)_SUBDIR
- $(2)_SUBDIR = $($(3)_SUBDIR)
- else
- $(2)_SUBDIR ?=
- endif
-endif
-
ifndef $(2)_LIBTOOL_PATCH
ifdef $(3)_LIBTOOL_PATCH
$(2)_LIBTOOL_PATCH = $($(3)_LIBTOOL_PATCH)
$(2)_UNINSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) uninstall
$(2)_UNINSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) uninstall
-$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)
#
# Configure step. Only define it if not already defined by the package
define inner-cmake-package
-# define package-specific variables to default values
-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)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME)
$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)
+ifndef $(3)_SUBDIR
+ ifdef $(2)_SUBDIR
+ $(3)_SUBDIR = $$($(2)_SUBDIR)
+ else
+ $(3)_SUBDIR ?=
+ endif
+endif
+
+$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)
+$(2)_BUILDDIR ?= $$($(2)_SRCDIR)
+
ifneq ($$($(2)_OVERRIDE_SRCDIR),)
$(2)_VERSION = custom
endif