[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] livepatch/Makefile: Add 'install' stanza [and 1 more messages]



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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.