Commit 63c9534a authored by Leigh Stoller's avatar Leigh Stoller

Lots more Makefile whacking. I think we are close to a proper install.

parent 901ee10b
......@@ -11,3 +11,8 @@ $(INSTALL_BINDIR)/%: %.tcl
-mkdir -p $(INSTALL_BINDIR)
$(INSTALL) $< $@
$(INSTALL_LIBDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_LIBDIR)
$(INSTALL) $< $@
# Testbed wide makefile.
.PHONY: all lib/sql.so assign/assign
SUBDIRS = lib assign discvr tbsetup db os security
install:
@echo "Is Leigh going to yell at you for doing this?"
@echo "Did you remember to do a cvs update?"
all: all-subdirs
install: all
install: install-subdirs
post-install:
@$(MAKE) -C tbsetup post-install
@$(MAKE) -C security post-install
install-ifyoudare: all
install -c assign/assign /usr/testbed/bin
install -c db/avail /usr/testbed/bin
install -c db/inuse /usr/testbed/bin
install -c db/mac2if /usr/testbed/bin
install -c db/nalloc /usr/testbed/bin
install -c db/nfree /usr/testbed/bin
install -c db/nodeip /usr/testbed/bin
install -c db/ptopgen /usr/testbed/bin
install -c db/showgraph /usr/testbed/bin
install -c db/tblog /usr/testbed/bin
install -c discvr/cli /usr/testbed/bin
install -c discvr/serv /usr/testbed/bin
# XXXThese don't work anymore
#install -c os/gethostkey.tcl /usr/testbed/bin/gethostkey
#install -c os/hostkey.tcl /usr/testbed/bin/hostkey
......@@ -37,62 +25,14 @@ install-ifyoudare: all
#install -c os/setupmachine.sh /usr/testbed/bin/setupmachine
#install -c os/imagezip/imagezip /usr/testbed/bin/imagezip
# XXX
install -c os/oslib.tcl /usr/testbed/bin
install -c tbsetup/mkacct /usr/testbed/bin
install -c tbsetup/rmacct /usr/testbed/bin
install -c tbsetup/genptop /usr/testbed/bin
install -c tbsetup/delay_setup /usr/testbed/bin
install -c tbsetup/ifc_setup /usr/testbed/bin
install -c tbsetup/ifc_filegen /usr/testbed/bin
install -c tbsetup/ir2ifc /usr/testbed/bin
install -c tbsetup/power /usr/testbed/bin
install -c tbsetup/resetvlans.tcl /usr/testbed/bin/resetvlans
install -c tbsetup/savevlans /usr/testbed/bin
install -c tbsetup/snmpit /usr/testbed/bin
install -c tbsetup/tbend.tcl /usr/testbed/bin/tbend
install -c tbsetup/tbprerun.tcl /usr/testbed/bin/tbprerun
install -c tbsetup/tbreport.tcl /usr/testbed/bin/tbreport
install -c tbsetup/tbrun.tcl /usr/testbed/bin/tbrun
install -c tbsetup/vpower /usr/testbed/bin
install -c tbsetup/vsnmpit /usr/testbed/bin
install -c tbsetup/tbdoit /usr/testbed/bin
install -c tbsetup/tbstopit /usr/testbed/bin
#XXX - hackish
rm -rf /usr/testbed/lib/tbsetup
rm -rf /usr/testbed/lib/db
cp -rf tbsetup /usr/testbed/lib/tbsetup
cp -rf db /usr/testbed/lib/db
install -c assign/assign /usr/testbed/lib/assign
@$(MAKE) -C tbsetup/checkpass install
all: lib/sql.so assign/assign discvr/cli discvr/serv os/key7 os/key8 os/imagezip/imagezip tbsetup/checkpass/checkpass
lib/sql.so:
@$(MAKE) -C lib sql.so
assign/assign:
@$(MAKE) -C assign assign
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
discvr/cli:
@$(MAKE) -C discvr cli
discvr/serv:
@$(MAKE) -C discvr serv
os/key7:
@$(MAKE) -C os key7
os/key8:
@$(MAKE) -C os key8
os/imagezip/imagezip:
@$(MAKE) -C os/imagezip imagezip
tbsetup/checkpass/checkpass:
@$(MAKE) -C tbsetup/checkpass checkpass
# By default, make any target by descending into subdirectories.
%: %-subdirs ;
clean:
@$(MAKE) -C assign clean
......@@ -100,3 +40,8 @@ clean:
@$(MAKE) -C os clean
@$(MAKE) -C os/imagezip clean
@$(MAKE) -C tbsetup/checkpass clean
.PHONY: post-install
# Get rid of a bunch of nasty built-in implicit rules.
.SUFFIXES:
#
# Insert Copyright Here.
#
include ../Makeconf
include ../GNUmakerules
CXX=/usr/gnu/bin/g++
CC=/usr/gnu/bin/gcc
LEDA=/n/paria/z/dga/LEDA-4.0
......@@ -21,6 +27,8 @@ assign_p: assign.po $(DEPLIBS) $(POBJS)
assign.po: assign.cc
${CXX} -c -pg -g -o assign.po assign.cc ${CXXFLAGS}
install: $(INSTALL_BINDIR)/assign $(INSTALL_LIBDIR)/assign
clean:
/bin/rm -f *.o assign
#
# Insert Copyright Here.
#
include ../Makeconf
include ../GNUmakerules
BINSCRIPTS = avail inuse mac2if nalloc nfree nodeip ptopgen \
showgraph tblog
ALLSCRIPTS = dbupdate usrud approve grpmemb user checkowner.tcl usrmod \
$(BINSCRIPTS)
all:
#
# Currently, all the stuff that gets installed in the bin directory
# gets duplicated in lib/tbsetup.
#
INSTALL_LIBTBDIR = $(INSTALL_LIBDIR)/db
install: $(addprefix $(INSTALL_BINDIR)/, $(BINSCRIPTS)) \
$(addprefix $(INSTALL_LIBTBDIR)/, $(ALLSCRIPTS))
#
# Leave these rules here. They should be flushed when we no longer
# dup this stuff.
#
$(INSTALL_LIBTBDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_LIBTBDIR)
$(INSTALL) $< $@
clean:
#
# Insert Copyright Here.
#
include ../Makeconf
include ../GNUmakerules
OBJS=get_ifi_info.o get_rtaddrs.o net_rt_iflist.o sock_ntop.o util.o
SOBJS=serv_listen.o recvfromflags.o if_indextoname.o reply.o serv.o forw_requests.o
COBJS=cli.o
......@@ -13,5 +19,7 @@ cli: ${OBJS} ${COBJS}
serv: ${OBJS} ${SOBJS}
$(CC) $(OBJS) $(SOBJS) ${LIBS} -o serv
install: all $(INSTALL_BINDIR)/cli $(INSTALL_BINDIR)/serv
clean:
/bin/rm -rf $(OBJS) $(SOBJS) $(COBJS) cli serv
\ No newline at end of file
/bin/rm -rf $(OBJS) $(SOBJS) $(COBJS) cli serv
#
# Insert Copyright Here.
#
include ../Makeconf
include ../GNUmakerules
all: sql.so
sql.so:
./mk_sqlso.sh
install: all $(INSTALL_LIBDIR)/sql.so
#
# Insert Copyright Here.
#
include ../Makeconf
include ../GNUmakerules
CC=gcc
CFLAGS=-O
all: key7 key8
SCRIPTS = oslib.tcl
all:
key7: key7.c
$(CC) $(CFLAGS) -o key7 key7.c
......@@ -9,5 +17,7 @@ key7: key7.c
key8: key8.c
$(CC) $(CFLAGS) -o key8 key8.c
install: $(addprefix $(INSTALL_BINDIR)/, $(SCRIPTS))
clean:
/bin/rm -f *.o key7 key8
#
# Insert Copyright Here.
#
include ../Makeconf
include ../GNUmakerules
BINS = suexec
SCRIPTS = paperbag plasticwrap
CFLAGS = -O -g
INSTALL = install -c
INSTALL_BINDIR = /usr/testbed/bin
all: $(BINS)
......@@ -13,11 +17,6 @@ suexec: suexec.c suexec.h
install: $(addprefix $(INSTALL_BINDIR)/, $(BINS))
@echo "Don't forget to do a post-install as root"
$(INSTALL_BINDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_BINDIR)
$(INSTALL) $< $@
post-install:
chown root $(INSTALL_BINDIR)/suexec
chmod u+s $(INSTALL_BINDIR)/suexec
......
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