GNUmakefile.in 1.97 KB
Newer Older
1 2 3
#
# Testbed Makefile
#
4 5 6 7 8
SRCDIR		= @srcdir@
OBJDIR		= .
SUBDIR		= 
TESTBED_SRCDIR  = @top_srcdir@
DISTCLEAN_FILES = @DISTCLEAN_FILES@ 
Christopher Alfeld's avatar
Christopher Alfeld committed
9

10 11
include Makeconf

Mike Hibler's avatar
Mike Hibler committed
12
SUBDIRS = lib assign discvr tbsetup db os security pxe tmcd utils www tip capture ipod
Christopher Alfeld's avatar
Christopher Alfeld committed
13

14
all:		all-subdirs
15

16
install:	
17
	@echo "Choose either boss-install (paper) or ops-install (plastic)"
18
	@echo "Choose tipserv-install for dedicated tip server machines."
19 20

#
21
# For installation on boss node (okay, paper).
22
# 
23
boss-install:	install-subdirs install-mkdirs 
24
	@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
25

26
post-install:
27
	@$(MAKE) -C db post-install
Mike Hibler's avatar
Mike Hibler committed
28
	@$(MAKE) -C ipod post-install
29 30
	@$(MAKE) -C tbsetup post-install
	@$(MAKE) -C security post-install
31

32
#
33
# For installation on the 'ops' or 'users' node (okay, plastic)
34
# 
35
ops-install:
36 37
	@$(MAKE) -C tbsetup control-install
	@$(MAKE) -C security control-install
38 39 40 41
	@$(MAKE) -C tip control-install
	@$(MAKE) -C os control-install
	@$(MAKE) -C db control-install
	@$(MAKE) -C tbsetup control-install
Mac Newbold's avatar
Mac Newbold committed
42
	@$(MAKE) -C utils control-install
43

44 45 46 47
install-mkdirs:
	-mkdir -p $(INSTALL_TOPDIR)/locks
	-mkdir -p $(INSTALL_TOPDIR)/log
	-mkdir -p $(INSTALL_TOPDIR)/lists
48
	-mkdir -p $(INSTALL_TOPDIR)/backup
49 50
	-mkdir -p $(INSTALL_TOPDIR)/batch
	-chmod 777 $(INSTALL_TOPDIR)/batch
51 52
	-mkdir -p $(INSTALL_TOPDIR)/expinfo
	-chmod 777 $(INSTALL_TOPDIR)/expinfo
53

54 55 56 57 58 59
tipserv-install:
	-mkdir -p $(INSTALL_TOPDIR)/log/tiplogs
	@$(MAKE) -C tip tipserv-install
	@$(MAKE) -C capture tipserv-install
	@$(MAKE) -C tbsetup tipserv-install

60 61 62
clean:		clean-subdirs
distclean:	distclean-subdirs
	rm -f Makeconf GNUmakefile config.status config.cache config.log
63
	rm -f $(DISTCLEAN_FILES)
64

65 66 67 68 69
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
70

71 72
# By default, make any target by descending into subdirectories.
%: %-subdirs ;
73

74
.PHONY: post-install install-mkdirs
75 76 77

# Get rid of a bunch of nasty built-in implicit rules.
.SUFFIXES: