2 # Node Manager Makefile
4 # David Eisenstat <deisenst@cs.princeton.edu>
5 # Mark Huang <mlhuang@cs.princeton.edu>
6 # Copyright (C) 2006 The Trustees of Princeton University
8 # $Id: Makefile,v 1.2 2006/11/13 20:04:44 mlhuang Exp $
11 # autoconf compatible variables
15 all: forward_api_calls
18 forward_api_calls: forward_api_calls.c
19 $(CC) -Wall -Os -o $@ $?
23 python setup.py install \
24 --install-purelib=$(DESTDIR)/$(datadir)/NodeManager \
25 --install-platlib=$(DESTDIR)/$(datadir)/NodeManager \
26 --install-scripts=$(DESTDIR)/$(bindir)
27 install -m 444 README $(DESTDIR)/$(datadir)/NodeManager
31 rm -f forward_api_calls *.pyc build
33 .PHONY: all install clean
37 (find . '(' -name '*.py' -o -name '*.c' -o -name '*.spec' ')' ; ls initscripts/*) | xargs etags
42 # for use with the test framework; push local stuff on a test node
43 # make sync NODE=vnode01.inria.fr
44 # specify TESTMASTER and BUILD if the key is not available yet
46 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
47 RSYNC_EXCLUDES := --exclude .git --exclude .svn --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
48 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
49 RSYNC := rsync -e "ssh -i $(NODE).key.rsa" -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
52 NODEURL:=root@$(NODE):/
57 @echo "sync: You must define NODE on the command line"
58 @echo " e.g. make sync NODE=vnode01.inria.fr"
61 +$(RSYNC) ./ $(NODEURL)/usr/share/NodeManager/
62 +$(RSYNC) ./initscripts/nm $(NODEURL)/etc/init.d/nm
63 ssh -i $(NODE).key.rsa root@$(NODE) service nm restart
68 TESTMASTER ?= testmaster.onelab.eu
71 KEYURL:=root@$(TESTMASTER):$(BUILD)/keys/key1.rsa
78 @echo "sync: fetching $@ - You must define TESTMASTER, BUILD and NODE on the command line"
79 @echo " e.g. make sync TESTMASTER=testmaster.onelab.eu BUILD=2010.01.22--1l-f8-32 NODE=vnode01.inria.fr"
80 @echo " note that for now all test builds use the same key, so any BUILD would do"
87 ### utility - find out the node name for a given BUILD
90 NODEIPCOMMAND:=ssh root@$(TESTMASTER) cat $(BUILD)/arg-ips-node
94 ifeq (,$(NODEIPCOMMAND))
95 @echo "nodename: You must define TESTMASTER and BUILD on the command line"