<commit_before>#
# Node Manager Makefile
#
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# Copyright (C) 2006 The Trustees of Princeton University
#
# $Id: Makefile,v 1.2 2006/11/13 20:04:44 mlhuang Exp $
#

# autoconf compatible variables
datadir := /usr/share
bindir := /usr/bin

all: forward_api_calls
	python setup.py build

forward_api_calls: forward_api_calls.c
	$(CC) -Wall -Os -o $@ $?
	strip $@

install:
	python setup.py install \
	    --install-purelib=$(DESTDIR)/$(datadir)/NodeManager \
	    --install-platlib=$(DESTDIR)/$(datadir)/NodeManager \
	    --install-scripts=$(DESTDIR)/$(bindir)
	install -m 444 README $(DESTDIR)/$(datadir)/NodeManager

clean:
	python setup.py clean
	rm -f forward_api_calls *.pyc build

.PHONY: all install clean

##########
tags:
	(find . '(' -name '*.py' -o -name '*.c' -o -name '*.spec' ')' ; ls initscripts/*) | xargs etags 

.PHONY: tags

########## sync
# for use with the test framework; push local stuff on a test node
# make sync NODE=vnode01.inria.fr
# specify TESTMASTER and BUILD if the key is not available yet

LOCAL_RSYNC_EXCLUDES	:= --exclude '*.pyc' 
RSYNC_EXCLUDES		:= --exclude .git  --exclude .svn --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
RSYNC_COND_DRY_RUN	:= $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
RSYNC			:= rsync -e "ssh -i $(NODE).key.rsa" -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)

ifdef NODE
NODEURL:=root@$(NODE):/
endif

sync: $(NODE).key.rsa
ifeq (,$(NODEURL))
	@echo "sync: You must define NODE on the command line"
	@echo "  e.g. make sync NODE=vnode01.inria.fr"
	@exit 1
else
	+$(RSYNC) ./ $(NODEURL)/usr/share/NodeManager/
	+$(RSYNC) ./initscripts/nm $(NODEURL)/etc/init.d/nm
endif

### fetching the key

TESTMASTER ?= testmaster.onelab.eu

ifdef BUILD
KEYURL:=root@$(TESTMASTER):$(BUILD)/keys/key1.rsa
endif

key: $(NODE).key.rsa
<commit_msg>restart nm upon make sync<commit_after>#
# Node Manager Makefile
#
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# Copyright (C) 2006 The Trustees of Princeton University
#
# $Id: Makefile,v 1.2 2006/11/13 20:04:44 mlhuang Exp $
#

# autoconf compatible variables
datadir := /usr/share
bindir := /usr/bin

all: forward_api_calls
	python setup.py build

forward_api_calls: forward_api_calls.c
	$(CC) -Wall -Os -o $@ $?
	strip $@

install:
	python setup.py install \
	    --install-purelib=$(DESTDIR)/$(datadir)/NodeManager \
	    --install-platlib=$(DESTDIR)/$(datadir)/NodeManager \
	    --install-scripts=$(DESTDIR)/$(bindir)
	install -m 444 README $(DESTDIR)/$(datadir)/NodeManager

clean:
	python setup.py clean
	rm -f forward_api_calls *.pyc build

.PHONY: all install clean

##########
tags:
	(find . '(' -name '*.py' -o -name '*.c' -o -name '*.spec' ')' ; ls initscripts/*) | xargs etags 

.PHONY: tags

########## sync
# for use with the test framework; push local stuff on a test node
# make sync NODE=vnode01.inria.fr
# specify TESTMASTER and BUILD if the key is not available yet

LOCAL_RSYNC_EXCLUDES	:= --exclude '*.pyc' 
RSYNC_EXCLUDES		:= --exclude .git  --exclude .svn --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
RSYNC_COND_DRY_RUN	:= $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
RSYNC			:= rsync -e "ssh -i $(NODE).key.rsa" -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)

ifdef NODE
NODEURL:=root@$(NODE):/
endif

sync: $(NODE).key.rsa
ifeq (,$(NODEURL))
	@echo "sync: You must define NODE on the command line"
	@echo "  e.g. make sync NODE=vnode01.inria.fr"
	@exit 1
else
	+$(RSYNC) ./ $(NODEURL)/usr/share/NodeManager/
	+$(RSYNC) ./initscripts/nm $(NODEURL)/etc/init.d/nm
	ssh -i $(NODE).key.rsa root@$(NODE) service nm restart
endif

### fetching the key

TESTMASTER ?= testmaster.onelab.eu

ifdef BUILD
KEYURL:=root@$(TESTMASTER):$(BUILD)/keys/key1.rsa
endif

key: $(NODE).key.rsa

{'fraction_non_alphanumeric': 0.17656500802568217, 'fraction_numerical': 0.015516318887105404, 'mean_word_length': 3.985333333333333, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5761560', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1473, 'n_words': 371}