All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] livepatch/Makefile: Add 'install' stanza
@ 2017-05-17 20:00 Konrad Rzeszutek Wilk
  2017-05-18  9:15 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-05-17 20:00 UTC (permalink / raw)
  To: xen-devel, julien.grall
  Cc: ross.lagerwall, Konrad Rzeszutek Wilk, ian.jackson

So that you can do:

DESTDIR=`pwd`/dist/xenlptinstall/usr/lib/debug
mkdir -p $DESTDIR
BASEDIR=`pwd`/xen XEN_ROOT=`pwd` make -C xen/test -f `pwd`/xen/Rules.mk install

or such.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/test/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/test/Makefile b/xen/test/Makefile
index d91b319..410895b 100644
--- a/xen/test/Makefile
+++ b/xen/test/Makefile
@@ -5,3 +5,7 @@ tests:
 .PHONY: clean
 clean::
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch clean
+
+.PHONY: install
+install:
+	$(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch install
-- 
2.9.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] livepatch/Makefile: Add 'install' stanza
  2017-05-17 20:00 [PATCH] livepatch/Makefile: Add 'install' stanza Konrad Rzeszutek Wilk
@ 2017-05-18  9:15 ` Jan Beulich
  2017-05-18 16:41   ` [PATCH] livepatch/Makefile: Add 'install' stanza [and 1 more messages] Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2017-05-18  9:15 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: ian.jackson, julien.grall, xen-devel, ross.lagerwall

>>> On 17.05.17 at 22:00, <konrad.wilk@oracle.com> wrote:
> --- a/xen/test/Makefile
> +++ b/xen/test/Makefile
> @@ -5,3 +5,7 @@ tests:
>  .PHONY: clean
>  clean::
>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch clean
> +
> +.PHONY: install
> +install:
> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch install

If we really want to provide a standard way to install tests (which
I'm not sure about, after all these are tests and hence play no
role during an actual installation), shouldn't this then at least be
accompanied by a matching uninstall rule?

Also I think if more stuff is to be added here, this Makefile could
do with some abstraction (SUBDIR or subdir-y instead of
explicitly naming the sole current subdirectory) to avoid later
additions needing to touch all this again.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] livepatch/Makefile: Add 'install' stanza [and 1 more messages]
  2017-05-18  9:15 ` Jan Beulich
@ 2017-05-18 16:41   ` Ian Jackson
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2017-05-18 16:41 UTC (permalink / raw)
  To: Jan Beulich, Konrad Rzeszutek Wilk
  Cc: xen-devel, julien.grall, ross.lagerwall

Konrad Rzeszutek Wilk writes ("[PATCH] livepatch/Makefile: Add 'install' stanza"):
> So that you can do:
> 
> DESTDIR=`pwd`/dist/xenlptinstall/usr/lib/debug
> mkdir -p $DESTDIR
> BASEDIR=`pwd`/xen XEN_ROOT=`pwd` make -C xen/test -f `pwd`/xen/Rules.mk install

Looking at our other DESTDIR settings, they do not include things like
`/usr/lib/debug'.  Normally DESTDIR seems to be set to `/' or
`$DISTDIR/install' aka `dist/install/'.

How about an interface where that
  make dist-tests
installs things in
  dists/tests
by default, eg
  dists/tests/usr/lib/debug/some-livepath-thing
?

This would probably be achieved by having dist-tests set
DESTDIR=$(DISTDIR)/tests, eg

    dist-tests: DESTDIR=$(DISTDIR)/tests
    dist-tests: install-tests

Then `make install-tests' should default DESTDIR to / and put things
in /usr/lib/debug.

Jan Beulich writes ("Re: [Xen-devel] [PATCH] livepatch/Makefile: Add 'install' stanza"):
> If we really want to provide a standard way to install tests (which
> I'm not sure about, after all these are tests and hence play no
> role during an actual installation),

We need a way to _ship_ tests as a formal deliverable from the build
system.  Consumers of tests (that can be run out of tree, like these)
should not be expected to fish them out of the build tree.

In our existing build system, we ship things with `make dist'.
This ships them into dist/ by using the install targets.

I don't see any reason to diverge from this for tests.  It would be
silly to make special snowflake machinery to ship tests simply to
avoid having a mostly-unused `make install-tests'.  (Obviously `make
install' ought not to run `make install-tests' by default.)

> shouldn't this then at least be
> accompanied by a matching uninstall rule?

I don't think that is necessary.

> Also I think if more stuff is to be added here, this Makefile could
> do with some abstraction (SUBDIR or subdir-y instead of
> explicitly naming the sole current subdirectory) to avoid later
> additions needing to touch all this again.

This is a sensible suggestion.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-18 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 20:00 [PATCH] livepatch/Makefile: Add 'install' stanza Konrad Rzeszutek Wilk
2017-05-18  9:15 ` Jan Beulich
2017-05-18 16:41   ` [PATCH] livepatch/Makefile: Add 'install' stanza [and 1 more messages] Ian Jackson

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.