Commit 976133e4 authored by Mike Hibler's avatar Mike Hibler
Browse files

Improve the client-side install. With these changes, it should now be

possible to:

	gmake client
	sudo gmake client-install

on a FBSD4, FBSD5, RHL7.3, and RHL9.0 client node.

There are still some dependencies that are not explicit and which would
prevent a build/install from working on a "clean" OS.  Two that I know of are:
you must install our version of the elvin libraries and you must install boost.
parent a36ccc7b
......@@ -91,8 +91,17 @@ tipserv-install:
@$(MAKE) -C capture tipserv-install
@$(MAKE) -C tbsetup tipserv-install
client-install:
client-mkdirs:
-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
client:
@$(MAKE) -C lib/libtb client
@$(MAKE) -C event client
@$(MAKE) -C os client
@$(MAKE) -C sensors client
@$(MAKE) -C tmcd client
client-install: client client-mkdirs
@$(MAKE) -C event client-install
@$(MAKE) -C os client-install
@$(MAKE) -C sensors client-install
......
......@@ -1462,8 +1462,9 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/freebsd/supfile tmcd/freebsd/sethostname \
tmcd/linux/GNUmakefile tmcd/linux/supfile tmcd/linux/pump.conf \
tmcd/linux/sethostname tmcd/linux/sethostname.dhclient \
tmcd/freebsd5/GNUmakefile tmcd/openbsd/GNUmakefile \
tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
tmcd/linux9/GNUmakefile tmcd/linux9/supfile \
tmcd/freebsd5/GNUmakefile tmcd/freebsd5/supfile \
tmcd/openbsd/GNUmakefile tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \
utils/sshtb utils/create_image utils/node_admin utils/webcreateimage \
utils/firstuser utils/export_tables utils/eventping \
......
......@@ -441,7 +441,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
os/GNUmakefile os/split-image.sh os/imagezip/GNUmakefile \
os/imagezip/ffs/GNUmakefile os/imagezip/extfs/GNUmakefile \
os/frisbee.redux/GNUmakefile os/growdisk/GNUmakefile \
os/syncd/GNUmakefile os/dijkstra/GNUmakefile \
os/syncd/GNUmakefile os/dijkstra/GNUmakefile \
os/genhostsfile/GNUmakefile \
pxe/GNUmakefile pxe/bootinfo.restart \
security/GNUmakefile security/paperbag security/lastlog_daemon \
......@@ -507,8 +507,9 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/freebsd/supfile tmcd/freebsd/sethostname \
tmcd/linux/GNUmakefile tmcd/linux/supfile tmcd/linux/pump.conf \
tmcd/linux/sethostname tmcd/linux/sethostname.dhclient \
tmcd/freebsd5/GNUmakefile tmcd/openbsd/GNUmakefile \
tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
tmcd/linux9/GNUmakefile tmcd/linux9/supfile \
tmcd/freebsd5/GNUmakefile tmcd/freebsd5/supfile \
tmcd/openbsd/GNUmakefile tmcd/ron/GNUmakefile tmcd/plab/GNUmakefile \
utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \
utils/sshtb utils/create_image utils/node_admin utils/webcreateimage \
utils/firstuser utils/export_tables utils/eventping \
......
......@@ -36,16 +36,8 @@ install:
@$(MAKE) -C stated install
@$(MAKE) -C linktest install
client-install: lib/all.MAKE
ifeq ($(SYSTEM),FreeBSD)
@$(MAKE) -C delay-agent client-install
endif
@$(MAKE) -C link-agent client-install
@$(MAKE) -C tbgen client-install
@$(MAKE) -C program-agent client-install
@$(MAKE) -C trafgen client-install
@$(MAKE) -C proxy client-install
@$(MAKE) -C linktest client-install
client: client-subdirs
client-install: client client-install-subdirs
control-install:
@$(MAKE) -C lib control-install
......
......@@ -32,7 +32,8 @@ delay-agent: $(OBJS)
$(OBJS): main.h ../lib/libevent.a
client-install: delay-agent
client: delay-agent
client-install: client
$(INSTALL_PROGRAM) -s delay-agent $(DESTDIR)$(CLIENT_BINDIR)/delay-agent
clean:
......
......@@ -34,5 +34,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install: $(addprefix $(INSTALL_SBINDIR)/, eventdebug.pl)
# not a client thing
client:
client-install: client
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -12,10 +12,13 @@ SUBDIR = event/lib
include $(OBJDIR)/Makeconf
SYSTEM := $(shell uname -s)
PROGRAMS = libevent.a
LIBS = libevent.a
SWIGLIBS =
ifneq ($(SYSTEM),Linux)
PROGRAMS += libevent_r.a event.so _tbevent.so
LIBS += libevent_r.a
SWIGLIBS += event.so _tbevent.so
endif
PROGRAMS = $(LIBS) $(SWIGLIBS)
all: $(PROGRAMS)
......@@ -31,9 +34,14 @@ CFLAGS_NOWARN += `elvin-config --cflags vin4c`
ifeq ($(SYSTEM),Linux)
PCORE = -I/usr/lib/perl5/5.6.1/i386-linux/CORE
else
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')
ifeq ($(FBSDVERSION),FreeBSD5)
PCORE = -I/usr/local/lib/perl5/5.6.1/mach/CORE
else
PCORE = -I/usr/libdata/perl/5.00503/mach/CORE
PYCORE = -I/usr/local/include/python2.3
endif
endif
OBJS = event.o util.o
POBJS = event_r.o util.o
......@@ -102,14 +110,21 @@ install: $(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF))
control-install: install
#
# Right now we don't bother with the dynamic libs since all of the existing
# clients are statically linked. Also, the dynamic libs include the SWIG stubs
# and that stuff needs work to build on Linux and FBSD5.
#
client: $(LIBS)
client-install: client # client-libinstall
#
# XXX Fix the python install location.
#
client-install:
client-libinstall:
$(INSTALL_PROGRAM) $(SRCDIR)/event.pm $(DESTDIR)$(CLIENT_BINDIR)/event.pm
$(INSTALL_PROGRAM) event.so $(DESTDIR)$(CLIENT_BINDIR)/event.so
$(INSTALL_PROGRAM) $(SRCDIR)/tbevent.py \
$(DESTDIR)$(CLIENT_BINDIR)/tbevent.py
$(INSTALL_PROGRAM) $(SRCDIR)/tbevent.py $(DESTDIR)$(CLIENT_BINDIR)/tbevent.py
$(INSTALL_PROGRAM) _tbevent.so $(DESTDIR)$(CLIENT_BINDIR)/_tbevent.so
clean:
......
......@@ -42,9 +42,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install: link-agent
$(INSTALL_PROGRAM) link-agent \
$(DESTDIR)$(CLIENT_BINDIR)/link-agent
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) -s link-agent $(DESTDIR)$(CLIENT_BINDIR)/link-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -61,15 +61,15 @@ $(LIBTBDIR)/%.o:
$(LIBEVENTDIR)/%.a:
@$(MAKE) -C $(LIBEVENTDIR) $(@F)
binaries: $(LOCAL_BINDIR)/$(DAEMON) $(LOCAL_BINDIR)/$(LTEVENT)
$(LOCAL_BINDIR):
-mkdir -p $(LOCAL_BINDIR)
$(LOCAL_BINDIR)/$(DAEMON): $(LOCAL_BINDIR) $(DAEMON_OBJS) $(LIBTB_OBJS)
binaries: $(LOCAL_BINDIR) $(LOCAL_BINDIR)/$(DAEMON) $(LOCAL_BINDIR)/$(LTEVENT)
$(LOCAL_BINDIR)/$(DAEMON): $(DAEMON_OBJS) $(LIBTB_OBJS)
$(CC) $(LDFLAGS) $(DAEMON_OBJS) $(LIBTB_OBJS) $(LIBS) -o $@
$(LOCAL_BINDIR)/$(LTEVENT): $(LOCAL_BINDIR) $(LTEVENT_OBJS) $(LIBTB_OBJS)
$(LOCAL_BINDIR)/$(LTEVENT): $(LTEVENT_OBJS) $(LIBTB_OBJS)
$(CC) $(LDFLAGS) $(LTEVENT_OBJS) $(LIBTB_OBJS) $(LIBS) -o $@
$(DAEMON_OBJS): linktest.h ../lib/libevent.a ../lib/event.h
......@@ -85,23 +85,17 @@ install:
control-install: install
client-install: all
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(DAEMON) \
$(DESTDIR)$(CLIENT_BINDIR)/$(DAEMON)
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(LTEVENT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(LTEVENT)
$(INSTALL_PROGRAM) $(SCRIPT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
$(INSTALL_PROGRAM) $(SCRIPT_RUN) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_RUN)
$(INSTALL_PROGRAM) $(SRCDIR)/$(SCRIPT_TBCOMPAT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_TBCOMPAT)
$(INSTALL_PROGRAM) $(NSTOIRDIR)/$(SCRIPT_NSTB_COMPAT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_NSTB_COMPAT)
client: all
client-install: client
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(DAEMON) $(DESTDIR)$(CLIENT_BINDIR)/$(DAEMON)
$(INSTALL_PROGRAM) -s $(LOCAL_BINDIR)/$(LTEVENT) $(DESTDIR)$(CLIENT_BINDIR)/$(LTEVENT)
$(INSTALL_PROGRAM) $(SCRIPT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
$(INSTALL_PROGRAM) $(SCRIPT_RUN) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_RUN)
$(INSTALL_PROGRAM) $(SRCDIR)/$(SCRIPT_TBCOMPAT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_TBCOMPAT)
$(INSTALL_PROGRAM) $(NSTOIRDIR)/$(SCRIPT_NSTB_COMPAT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT_NSTB_COMPAT)
lt-install:
$(INSTALL_PROGRAM) $(SCRIPT) \
$(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
$(INSTALL_PROGRAM) $(SCRIPT) $(DESTDIR)$(CLIENT_BINDIR)/$(SCRIPT)
clean:
rm -f *.o $(TESTS)
......
......@@ -50,7 +50,14 @@ sup-install:
-mkdir -p $(INSTALL_SUPDIR)/usr/local/bin/
-cp $(INSTALL_NSE) $(INSTALL_SUPDIR)/usr/local/bin
client-install:
# XXX requires Shashi-magic right now
tmpmsg:
@echo "WARNING: do 'make real-<target>' if you really mean it"
client: tmpmsg
client-install: client
real-client: all
real-client-install:
cp -p $(INSTALL_FILES) $(DESTDIR)$(CLIENT_BINDIR)
if [ -x $(INSTALL_NSE) ]; then \
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/usr/local/bin; \
......
......@@ -42,9 +42,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install: program-agent
$(INSTALL_PROGRAM) -s program-agent \
$(DESTDIR)$(CLIENT_BINDIR)/program-agent
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) -s program-agent $(DESTDIR)$(CLIENT_BINDIR)/program-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -77,7 +77,8 @@ proxytest: proxytest.o $(LIBTBDIR)/log.o
$(PROGRAMS): ../lib/libevent.a ../lib/event.h
client-install: evproxy
client: evproxy
client-install: client
$(INSTALL_PROGRAM) -s evproxy $(DESTDIR)$(CLIENT_BINDIR)/evproxy
clean:
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2002, 2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -42,5 +42,9 @@ $(OBJS): event-sched.h ../lib/libevent.a
install: $(addprefix $(INSTALL_SBINDIR)/, event-sched)
# not a client thing
client:
client-install: client
clean:
/bin/rm -f *.o event-sched
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -22,3 +22,7 @@ include $(TESTBED_SRCDIR)/GNUmakerules
install: all \
$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_STUFF)) \
$(addprefix $(INSTALL_LIBDIR)/, $(LIB_STUFF))
# not a client thing
client:
client-install: client
......@@ -18,7 +18,6 @@ endif
include $(OBJDIR)/Makeconf
all: $(PROGRAMS)
client: tevc
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -50,9 +49,9 @@ endif
LIBS += -ldl
endif
# Link against some of the object files from libtb, instead of the
# whole library, since the latter cannot be built on clients (without mysql)
tevc: tevc.o $(LIBTBDIR)/log.o $(LIBTBDIR)/tbdefs.o
# Link against some of the object files from libtb, instead of the
# whole library, since the latter cannot be built on ops
$(CC) $(LDFLAGS) -static -o $@ tevc.o $(LIBTBDIR)/log.o \
$(LIBTBDIR)/tbdefs.o $(LIBS)
......@@ -68,7 +67,8 @@ install: $(INSTALL_SBINDIR)/tevd \
control-install: $(INSTALL_BINDIR)/tevc
client-install: tevc
client: tevc
client-install: client
$(INSTALL_PROGRAM) -s tevc $(DESTDIR)$(CLIENT_BINDIR)/tevc
clean:
......
......@@ -52,7 +52,7 @@ SYSTEM := $(shell uname -s)
ifeq ($(SYSTEM),FreeBSD)
# FreeBSD
CFLAGS += -DFREEBSD
YCFLAGS += -I. -DUSEEVENTS -DFREEBSD
YCFLAGS += -I. -I$(TGSRCDIR) -DUSEEVENTS -DFREEBSD
LIBS += -ll -lcompat
endif
......@@ -86,7 +86,8 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install: trafgen
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) -s trafgen $(DESTDIR)$(CLIENT_BINDIR)/trafgen
clean:
......
......@@ -15,6 +15,7 @@ all: libtb.a
client: libtb-nodb.a
mv libtb-nodb.a libtb.a
client-install: client
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -27,16 +27,25 @@ install: $(INSTALL_SBINDIR)/split-image.sh
control-install:
@$(MAKE) -C imagezip install
client-install:
client:
ifneq ($(SYSTEM),Linux)
$(MAKE) -C imagezip client
$(MAKE) -C growdisk client
endif
$(MAKE) -C syncd client
$(MAKE) -C dijkstra client
$(MAKE) -C genhostsfile client
client-install: client
$(INSTALL) -m 755 -o root -g wheel -d $(LBINDIR)
$(INSTALL_PROGRAM) $(SRCDIR)/install-tarfile $(LBINDIR)/install-tarfile
$(INSTALL_PROGRAM) $(SRCDIR)/install-rpm $(LBINDIR)/install-rpm
ifneq ($(SYSTEM),Linux)
$(INSTALL_PROGRAM) $(SRCDIR)/create-image $(LBINDIR)/create-image
$(MAKE) -C imagezip client-install
$(MAKE) -C growdisk client-install
endif
$(MAKE) -C syncd client-install
$(MAKE) -C growdisk client-install
$(MAKE) -C dijkstra client-install
$(MAKE) -C genhostsfile client-install
......
......@@ -22,7 +22,8 @@ dijkstra: dijkstra.o bitmath.o Compressor.o IpTree.o SingleSource.o \
Compressor.h lib.h
$(CXX) $(CXXFLAGS) -static dijkstra.o bitmath.o Compressor.o IpTree.o SingleSource.o $(LIBS) -o dijkstra
client-install: dijkstra
client: all
client-install: client
$(INSTALL_PROGRAM) dijkstra $(DESTDIR)$(CLIENT_BINDIR)/dijkstra
clean:
......
......@@ -25,8 +25,9 @@ wgraph.o: wgraph.cc wgraph.h
install: $(INSTALL_LIBEXECDIR)/genhostsfile
client-install: genhostsfile
$(INSTALL_PROGRAM) genhostsfile $(DESTDIR)$(CLIENT_BINDIR)/genhostsfile
client: genhostsfile
client-install: client
$(INSTALL_PROGRAM) -s genhostsfile $(DESTDIR)$(CLIENT_BINDIR)/genhostsfile
clean:
rm -f *.o genhostsfile genfromtopo genfromdb
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment