mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
The current usage of LIBEXEC is bogus. It describes the directory for private xen executables. Other places create their own, similar libexecdir path as $prefix/lib/xen/*. Additional two other variables are used to describe similar paths: PRIVATE_BINDIR and PRIVATE_PREFIX The autoconf documentation refers to libexec as a directory for executables and stuff which is called by other programs, not by the user. Adjust all places that want libexecdir as a target path. LIBEXEC refers now to the base directory. Three convenience variables are used to refer to paths to private binaries, libs and include files. In the systemd files LIBEXEC_BIN is substituted, so this variable has to be present in autoconf. All other variables are expanded in Paths.mk because they are only used in Makefiles. Most users of LIBEXEC are updated to use LIBEXEC_BIN because that is what they want. Users of PRIVATE_BINDIR are updated to use LIBEXEC_BIN because that is what they want. PRIVATE_BINDIR and PRIVATE_PREFIX usage is removed by this patch, in favour of LIBXEC_BIN and LIBEXEC An internal libxl function was removed. A single helper to retrieve LIBEXEC_BIN remains. As suggested by the autoconf documentation, configure appends the package name to LIBEXEC to make sure the provided directory really refers to xen. This makes sure "make uninstall" preserves the real libexecdir. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: George Dunlap <george.dunlap@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> [ ijc -- ran autogen.sh as requested, updated QEMU_TRADITIONAL_REVISION to pickup version which uses LIBEXEC_BIN ]
96 lines
2.9 KiB
Makefile
96 lines
2.9 KiB
Makefile
XEN_ROOT=$(CURDIR)/../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
|
|
CFLAGS += $(CFLAGS_libxenctrl)
|
|
CFLAGS += $(CFLAGS_xeninclude)
|
|
CFLAGS += $(CFLAGS_libxenstore)
|
|
# xen-hptool.c and xen-mfndump.c incorrectly use libxc internals
|
|
CFLAGS += -I$(XEN_ROOT)/tools/libxc
|
|
|
|
HDRS = $(wildcard *.h)
|
|
|
|
TARGETS-y := xenperf xenpm xen-tmem-list-parse gtraceview gtracestat xenlockprof xenwatchdogd xencov
|
|
TARGETS-$(CONFIG_X86) += xen-detect xen-hvmctx xen-hvmcrash xen-lowmemd xen-mfndump
|
|
TARGETS-$(CONFIG_MIGRATE) += xen-hptool
|
|
TARGETS := $(TARGETS-y)
|
|
|
|
SUBDIRS := $(SUBDIRS-y)
|
|
|
|
INSTALL_BIN-y := xencons xencov_split
|
|
INSTALL_BIN-$(CONFIG_X86) += xen-detect
|
|
INSTALL_BIN := $(INSTALL_BIN-y)
|
|
|
|
INSTALL_SBIN-y := xen-bugtool xen-python-path xenperf xenpm xen-tmem-list-parse gtraceview \
|
|
gtracestat xenlockprof xenwatchdogd xen-ringwatch xencov
|
|
INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx xen-hvmcrash xen-lowmemd xen-mfndump
|
|
INSTALL_SBIN-$(CONFIG_MIGRATE) += xen-hptool
|
|
INSTALL_SBIN := $(INSTALL_SBIN-y)
|
|
|
|
INSTALL_PRIVBIN-y := xenpvnetboot
|
|
INSTALL_PRIVBIN := $(INSTALL_PRIVBIN-y)
|
|
|
|
# Include configure output (config.h) to headers search path
|
|
CFLAGS += -I$(XEN_ROOT)/tools
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build: $(TARGETS)
|
|
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done
|
|
|
|
.PHONY: install
|
|
install: build
|
|
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
|
|
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
|
|
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
|
$(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
|
|
$(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
|
|
$(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN)
|
|
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.o $(TARGETS) *~ $(DEPS)
|
|
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
|
|
|
|
xen-hvmctx: xen-hvmctx.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
xen-hvmcrash: xen-hvmcrash.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
xenperf: xenperf.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
xenpm: xenpm.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
gtracestat: gtracestat.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(APPEND_LDFLAGS)
|
|
|
|
xenlockprof: xenlockprof.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
xen-hptool: xen-hptool.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(APPEND_LDFLAGS)
|
|
|
|
xen-mfndump: xen-mfndump.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
|
|
|
|
xenwatchdogd: xenwatchdogd.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
xen-lowmemd: xen-lowmemd.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(APPEND_LDFLAGS)
|
|
|
|
gtraceview: gtraceview.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(CURSES_LIBS) $(APPEND_LDFLAGS)
|
|
|
|
xencov: xencov.o
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
|
|
|
|
-include $(DEPS)
|