GNUmakefile.in 1.67 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

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

14
all:		all-subdirs
15

16 17 18 19 20 21 22
install:	
	@echo "Choose either ops-install (paper) or control-install (plastic)"

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

25 26 27
post-install:
	@$(MAKE) -C tbsetup post-install
	@$(MAKE) -C security post-install
28

29 30 31 32 33 34
#
# For installation on the control node (okay, plastic)
# 
control-install:
	@$(MAKE) -C tbsetup control-install
	@$(MAKE) -C security control-install
35 36 37 38
	@$(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
39
	@$(MAKE) -C utils control-install
40

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

51 52 53
clean:		clean-subdirs
distclean:	distclean-subdirs
	rm -f Makeconf GNUmakefile config.status config.cache config.log
54
	rm -f $(DISTCLEAN_FILES)
55

56 57 58 59 60
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
61

62 63
# By default, make any target by descending into subdirectories.
%: %-subdirs ;
64

65
.PHONY: post-install install-mkdirs
66 67 68

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