From d7f7dec3ec6f50d7bcb0fe8b0ac8ef9ccd3b3dc9 Mon Sep 17 00:00:00 2001 From: Lon Hohberger Date: Fri, 21 Aug 2009 14:05:48 -0400 Subject: [PATCH] Add temporary 'make install' target --- Makefile | 5 +++++ client/Makefile | 7 ++++--- config/Makefile | 2 ++ server/Makefile | 13 ++++++++----- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 19f9a69..d057b97 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,11 @@ all: make -C client make -C server +install: + make -C config install + make -C client install + make -C server install + clean: make -C config clean make -C common clean diff --git a/client/Makefile b/client/Makefile index 6681022..7277ce9 100644 --- a/client/Makefile +++ b/client/Makefile @@ -39,10 +39,11 @@ fence_virt: ${fence_virt_SOURCES:.c=.o} gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES) install: all - if [ ! -d ${sbindir} ]; then \ - install -d ${sbindir}; \ + # XXX hardcoded sbin + if [ ! -d /usr/sbin; then \ + install -d /usr/sbin; \ fi - install -m755 ${TARGETS} ${sbindir} + install -m755 ${TARGETS} /usr/sbin clean: rm -f ${TARGETS} *.o *.d *~ diff --git a/config/Makefile b/config/Makefile index 1161625..6d2202a 100644 --- a/config/Makefile +++ b/config/Makefile @@ -46,4 +46,6 @@ clean: rm -f ${TARGETS} *~ *.o testprog config.tab.c config.tab.h config.c install: + install -m 0644 example.conf /etc/fence_virtd.conf + diff --git a/server/Makefile b/server/Makefile index 0697d96..326f29a 100644 --- a/server/Makefile +++ b/server/Makefile @@ -13,7 +13,9 @@ include ../Makefile.top -TARGETS=fence_virtd libvirt.so checkpoint.so +TARGETS=fence_virtd + +MODULES=libvirt.so checkpoint.so fence_virtd_SOURCES = mcast.c main.c plugin.c @@ -34,7 +36,7 @@ LIBS+=-L/usr/lib64/openais -lnss3 -lxml2 -lSaCkpt -lccs -lvirt -lcman \ MAIN_LIBS=-L../config -lsimpleconfig -all: ${TARGETS} +all: ${TARGETS} ${MODULES} fence_virtd: ${fence_virtd_SOURCES:.c=.o} gcc -o $@ $^ $(LIBS) $(MAIN_LIBS) @@ -49,10 +51,11 @@ checkpoint.so: ${checkpoint_so_SOURCES:.c=.o} gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES) install: all - if [ ! -d ${sbindir} ]; then \ - install -d ${sbindir}; \ + # XXX hardcoded sbin + if [ ! -d /usr/sbin ]; then \ + install -d /usr/sbin; \ fi - install -m755 ${TARGETS} ${sbindir} + install -m755 ${TARGETS} /usr/sbin clean: rm -f ${TARGETS} *.o *.d *~