Skip to content

Commit

Permalink
Merge pull request #3 from teharrison/master
Browse files Browse the repository at this point in the history
added target to update submodule, reorganized targets for this
  • Loading branch information
jaredbischof committed Dec 11, 2013
2 parents 5b70e01 + e6de7fc commit ec99c36
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions Makefile
Expand Up @@ -6,27 +6,19 @@ include $(TOP_DIR)/tools/Makefile.common
SERVICE_NAME = mgrast_pipeline
SERVICE_DIR = mgrast_pipeline


TPAGE_ARGS = --define kb_top=$(TARGET) --define kb_runtime=$(DEPLOY_RUNTIME) --define kb_service_name=$(SERVICE_NAME) --define kb_service_dir=$(SERVICE_DIR)


SCRIPTS_TESTS = $(wildcard script-tests/*.t)


default:
-rm -rf pipeline
git submodule init
git submodule update
-mkdir -p lib
-cp pipeline/lib/*.pm lib
-cp pipeline/conf/*.pm lib

# Test Section

test: test-scripts
@echo "running client and script tests"


test-scripts:
# run each test
for t in $(SCRIPT_TESTS) ; do \
Expand All @@ -38,19 +30,24 @@ test-scripts:
fi \
done


# over ride SRC_PERL for deploy and all sub targets
deploy: SRC_PERL = $(wildcard pipeline/awecmd/*.pl) \
$(wildcard pipeline/bin/*.pl)
deploy: SRC_PYTHON = $(wildcard pipeline/awecmd/*.py) \
$(wildcard pipeline/bin/*.py)
deploy: SRC_SH = $(wildcard pipeline/awecmd/*.sh) \
$(wildcard pipeline/bin/*.sh)
deploy: SRC_UNKNOWN = $(filter-out %.sh %.py %.pl, $(wildcard pipeline/bin/*))
deploy-scripts: SRC_PERL = $(wildcard pipeline/awecmd/*.pl) \
$(wildcard pipeline/bin/*.pl)
deploy-scripts: SRC_PYTHON = $(wildcard pipeline/awecmd/*.py) \
$(wildcard pipeline/bin/*.py)
deploy-scripts: SRC_SH = $(wildcard pipeline/awecmd/*.sh) \
$(wildcard pipeline/bin/*.sh)
deploy-scripts: SRC_UNKNOWN = $(filter-out %.sh %.py %.pl, $(wildcard pipeline/bin/*))

deploy: deploy-scripts deploy-docs deploy-cfg deploy-lib
echo "deploy target not implemented yet"
deploy-client: build-libs deploy-libs | deploy-scripts

build-libs:
-mkdir -p lib
-cp pipeline/lib/*.pm lib
-cp pipeline/conf/*.pm lib

deploy: deploy-client deploy-docs deploy-cfg
echo "deploy target not implemented yet"

deploy-docs: build-docs
-mkdir -p $(TARGET)/services/$(SERVICE_DIR)/webroot/.
Expand All @@ -60,5 +57,10 @@ build-docs:
-mkdir -p docs
echo "build-docs not implemented yet" > docs/$(SERVICE_NAME).html

# for updating and deploying submodule
build-update:
cd pipeline; git pull origin master

update: default build-update deploy-client |

include $(TOP_DIR)/tools/Makefile.common.rules

0 comments on commit ec99c36

Please sign in to comment.