All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libseccomp: Add new config option to build and install tests
Date: Thu, 17 Sep 2015 18:02:30 +0100	[thread overview]
Message-ID: <55FAF226.9080800@imgtec.com> (raw)
In-Reply-To: <1442498020-661-1-git-send-email-markos.chandras@imgtec.com>

Dear Markos Chandras,

On 09/17/2015 02:53 PM, Markos Chandras wrote:
[snip]
> diff --git a/package/libseccomp/libseccomp.mk b/package/libseccomp/libseccomp.mk
> index a188298006b1..6edf96f92bfa 100644
> --- a/package/libseccomp/libseccomp.mk
> +++ b/package/libseccomp/libseccomp.mk
> @@ -17,4 +17,23 @@ define LIBSECCOMP_FIXUP_M4_DIR
>  endef
>  LIBSECCOMP_POST_EXTRACT_HOOKS += LIBSECCOMP_FIXUP_M4_DIR
>  
> +ifeq ($(BR2_PACKAGE_LIBSECCOMP_TESTS),y)
> +
> +define LIBSECCOMP_TESTS_BUILD
> +	$(MAKE) -C $(@D)/tests check-build

You should be adding $(TARGET_MAKE_ENV) in front of $(MAKE). Anyway,
there is a better solution which will make this define unnecessary. See
comments below.

> +endef

Instead of doing a define to build the tests, you can change the target
and use the 'check-build' one, which will not only build the tests and
tools, but also will trigger the 'all' target. So:

ifeq ($(BR2_PACKAGE_LIBSECCOMP_TESTS),y)
# The 'check-build' target builds the tests and tools, and also
# triggers the 'all' target.
LIBSECCOMP_MAKE_OPTS += check-build

> +define LIBSECCOMP_TESTS_INSTALL
> +	mkdir -p $(TARGET_DIR)/usr/libseccomp/{tests,tools} && \
> +	for x in tests tools; do \
> +		find $(@D)/$$x -maxdepth 1 \( -name "*.tests" -o -perm -a=x \) \
> +			-type f -exec cp {} $(TARGET_DIR)/usr/libseccomp/$$x/ \; ; \
> +	done
> +endef
> +

I would remove this empty line since you are adding to the hooks
variable the define immediately above.

> +LIBSECCOMP_POST_BUILD_HOOKS += LIBSECCOMP_TESTS_BUILD

This post-build hook is not needed since the define has been replaced by
the LIBSECCOMP_MAKE_OPTS line.

> +LIBSECCOMP_POST_INSTALL_TARGET_HOOKS += LIBSECCOMP_TESTS_INSTALL
> +

And I would remove this empty line as well.

Regards,

Vincent.

> +endif
> +
>  $(eval $(autotools-package))
> 

  reply	other threads:[~2015-09-17 17:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 13:53 [Buildroot] [PATCH] libseccomp: Add new config option to build and install tests Markos Chandras
2015-09-17 17:02 ` Vicente Olivert Riera [this message]
2015-09-18  8:19   ` [Buildroot] [PATCH v2] " Markos Chandras
2015-09-18  8:36     ` Vicente Olivert Riera
2015-09-18  8:39       ` Vicente Olivert Riera
2015-09-20 12:46     ` Thomas Petazzoni
2015-09-21  8:39       ` Markos Chandras
2015-09-21  9:28       ` [Buildroot] [PATCH v3] " Markos Chandras
2015-09-21 10:40         ` Vicente Olivert Riera
2015-10-02  8:24         ` Markos Chandras
2015-11-10  9:49           ` Markos Chandras
2015-11-10 10:00             ` Thomas Petazzoni
2015-11-10 10:14               ` Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FAF226.9080800@imgtec.com \
    --to=vincent.riera@imgtec.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.