Permalink
Browse files

Implemented the 'executable' task.

  • Loading branch information...
1 parent 40ff29e commit df409703a4edeff38e536d32aef7a7c32218363b @mr-rock mr-rock committed May 30, 2012
Showing with 23 additions and 1 deletion.
  1. +23 −1 Makefile
View
@@ -60,6 +60,28 @@ dependencies:
endif
ifeq "$(NAME)" ""
+executable:
+ @echo "ERROR: You're required to give the NAME argument to the 'executable' task to create a new executable file in your project."
+ @echo "SYNTAX: make executable NAME=ExecutableName"
+else
+ifeq "$(LIB_LANGUAGE)" "CS"
+executable:
+ @mkdir -p ./$(SOURCES_DIRECTORY)/$(EXECUTABLES_DIRECTORY)
+ @echo $(EXECUTABLE_CS) > ./$(SOURCES_DIRECTORY)/$(EXECUTABLES_DIRECTORY)/$(NAME_CAMELIZED)
+ @chmod 0755 ./$(SOURCES_DIRECTORY)/$(EXECUTABLES_DIRECTORY)/$(NAME_CAMELIZED)
+ @mkdir -p ./$(TESTS_DIRECTORY)/$(EXECUTABLES_DIRECTORY)
+ @echo $(TESTEXECUTABLE_CS) > ./$(TESTS_DIRECTORY)/$(EXECUTABLES_DIRECTORY)/$(NAME_CAMELIZED)-test.coffee
+else
+executable:
+ @mkdir -p ./$(EXECUTABLES_DIRECTORY)
+ @echo $(EXECUTABLE_JS) > ./$(EXECUTABLES_DIRECTORY)/$(NAME_CAMELIZED)
+ @chmod 0755 ./$(EXECUTABLES_DIRECTORY)/$(NAME_CAMELIZED)
+ @mkdir -p ./$(TESTS_DIRECTORY)/$(EXECUTABLES_DIRECTORY)
+ @echo $(TESTEXECUTABLE_JS) > ./$(TESTS_DIRECTORY)/$(EXECUTABLES_DIRECTORY)/$(NAME_CAMELIZED)-test.js
+endif
+endif
+
+ifeq "$(NAME)" ""
module:
@echo "ERROR: You're required to give the NAME argument to the 'module' task to create a new module in your project."
@echo "SYNTAX: make module NAME=ModuleName [GROUP=GroupName]"
@@ -213,7 +235,7 @@ prepare:
@make move-files-to-deployment
endif
-.PHONY: help version clean create update mit-license dependencies module build watch run test prepare
+.PHONY: help version clean create update mit-license dependencies executable module build watch run test prepare
# Helpers

0 comments on commit df40970

Please sign in to comment.