livepatch/Makefile: Add 'install' stanza
PATCH 1/1 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
or such.
--- xen/test/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
xen/test/Makefile +4 -0
@@ -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
Signature · 7 lines
2.9.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
xen/test/Makefile tests: · line 11
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 17.05.17 at 22:00, <[email protected]> wrote:
xen/test/Makefile +4
-0@@ -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
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH] livepatch/Makefile: Add 'install' stanza [and 1 more messages]
In reply to Konrad Rzeszutek WilkKonrad Rzeszutek Wilk writes ("[PATCH] livepatch/Makefile: Add 'install' stanza"):
Quoted 5 lines
So that you can do:
DESTDIR=
pwd/dist/xenlptinstall/usr/lib/debug
mkdir -p $DESTDIR
BASEDIR=pwd/xen XEN_ROOT=pwdmake -C xen/test -fpwd/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-testsThen `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"):
Quoted 3 lines
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.)
Quoted 2 lines
shouldn't this then at least be
accompanied by a matching uninstall rule?
I don't think that is necessary.
Quoted 4 lines
Also I think if more stuff is to be added here, this
Makefilecould 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
[email protected]
https://lists.xen.org/xen-devel