<commit_before>APP_FULLNAME = $(APP_NAME)-$(APP_VERSION)
APP_LIB_DIR = lib
APP_SRC_DIR = .
APP_TEST_DIR = test
BUILD_BASE = $(APP_DIR)/build
BUILD_LINT = $(BUILD_BASE)/lint
BUILD_PACKAGE = $(BUILD_BASE)/package
BUILD_TEST = $(BUILD_BASE)/test
RUN_BASE = $(APP_DIR)/run

init:
	echo "Bob shall build."

dep: init
	npm install .
	
tools: init
	npm install -g nodelint vows

clean: init
	rm -rf $(BUILD_BASE)
	rm -rf $(RUN_BASE)
	rm -f $(APP_DIR)/nohup.*
	rm -f $(APP_DIR)/*.log

lint: init
	mkdir -p $(BUILD_LINT)
	nodelint --config $(BOB_DIR)/conf/lint.js --reporter $(BOB_DIR)/conf/lintreporter.js $(BUILD_LINT_FILES) $(APP_DIR)/$(APP_LIB_DIR)/ $(APP_DIR)/$(APP_TEST_DIR)/ | tee $(BUILD_LINT)/jslint.xml

test: init
	mkdir -p $(BUILD_TEST)
	vows $(APP_TEST_DIR)/*
    
package: init
	mkdir -p $(BUILD_PACKAGE)
	tar --exclude $(APP_DIR)/$(APP_TEST_DIR) -X $(BOB_DIR)/conf/packageexclude.txt -C $(APP_DIR)/$(APP_SRC_DIR) -cvf $(BUILD_PACKAGE)/$(APP_FULLNAME).tar .
	gzip $(BUILD_PACKAGE)/$(APP_FULLNAME).tar

deploy: package
	ssh -p $(DEPLOY_PORT) $(DEPLOY_HOST) 'cd $(DEPLOY_DIR); rm -rf *;'
	scp -P $(DEPLOY_PORT) $(BUILD_PACKAGE)/$(APP_FULLNAME).tar.gz $(DEPLOY_HOST):$(DEPLOY_DIR)
	ssh -p $(DEPLOY_PORT) $(DEPLOY_HOST) 'cd $(DEPLOY_DIR); gunzip *.tar.gz; tar -xvf *.tar; rm *.tar;'

remote-r:
	ssh -p $(DEPLOY_PORT) $(DEPLOY_HOST) 'cd $(DEPLOY_DIR); NODE_ENV=$(NODE_ENV) node $(APP_NAME).js restart;'

deploy-r: deploy remote-r
	
stop:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js stop
	
start:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js start
	
restart:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js restart

status:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js status

nuke:
	kill -9 `ps -ef | sed -n '/node'""'/{/grep/!p;}' | awk '{print $$2}'`

.PHONY: dep tools init clean lint test package deploy remote-r deploy-r stop start restart status rampage<commit_msg>Reorder targets, fix .PHONY .<commit_after>APP_FULLNAME = $(APP_NAME)-$(APP_VERSION)
APP_LIB_DIR = lib
APP_SRC_DIR = .
APP_TEST_DIR = test
BUILD_BASE = $(APP_DIR)/build
BUILD_LINT = $(BUILD_BASE)/lint
BUILD_PACKAGE = $(BUILD_BASE)/package
BUILD_TEST = $(BUILD_BASE)/test
RUN_BASE = $(APP_DIR)/run

init:
	echo "Bob shall build."

dep: init
	npm install .
	
tools: init
	npm install -g nodelint vows

clean: init
	rm -rf $(BUILD_BASE)
	rm -rf $(RUN_BASE)
	rm -f $(APP_DIR)/nohup.*
	rm -f $(APP_DIR)/*.log

lint: init
	mkdir -p $(BUILD_LINT)
	nodelint --config $(BOB_DIR)/conf/lint.js --reporter $(BOB_DIR)/conf/lintreporter.js $(BUILD_LINT_FILES) $(APP_DIR)/$(APP_LIB_DIR)/ $(APP_DIR)/$(APP_TEST_DIR)/ | tee $(BUILD_LINT)/jslint.xml

test: init
	mkdir -p $(BUILD_TEST)
	vows $(APP_TEST_DIR)/*
    
package: init
	mkdir -p $(BUILD_PACKAGE)
	tar --exclude $(APP_DIR)/$(APP_TEST_DIR) -X $(BOB_DIR)/conf/packageexclude.txt -C $(APP_DIR)/$(APP_SRC_DIR) -cvf $(BUILD_PACKAGE)/$(APP_FULLNAME).tar .
	gzip $(BUILD_PACKAGE)/$(APP_FULLNAME).tar

stop:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js stop
	
start:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js start
	
restart:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js restart

status:
	NODE_ENV=$(NODE_ENV) node $(APP_NAME).js status

nuke:
	kill -9 `ps -ef | sed -n '/node'""'/{/grep/!p;}' | awk '{print $$2}'`

deploy: package
	ssh -p $(DEPLOY_PORT) $(DEPLOY_HOST) 'cd $(DEPLOY_DIR); rm -rf *;'
	scp -P $(DEPLOY_PORT) $(BUILD_PACKAGE)/$(APP_FULLNAME).tar.gz $(DEPLOY_HOST):$(DEPLOY_DIR)
	ssh -p $(DEPLOY_PORT) $(DEPLOY_HOST) 'cd $(DEPLOY_DIR); gunzip *.tar.gz; tar -xvf *.tar; rm *.tar;'

remote-r:
	ssh -p $(DEPLOY_PORT) $(DEPLOY_HOST) 'cd $(DEPLOY_DIR); NODE_ENV=$(NODE_ENV) node $(APP_NAME).js restart;'

deploy-r: deploy remote-r
	
.PHONY: dep tools init clean lint test package stop start restart status nuke deploy remote-r deploy-r
{'fraction_non_alphanumeric': 0.17789106519989267, 'fraction_numerical': 0.0010732492621411322, 'mean_word_length': 4.761978361669243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1011576', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1527, 'n_words': 351}