clean out
add interface/InterfaceName target to create a template interface move generate_newclass.sh to generate_new.sh and take class or interface as argument Signed-off-by: philippe lhardy <philippe@pavilionartlogiciel>
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
PACKAGE=org.artisanlogiciel.games
|
||||
PACKAGE_DIR=$(subst .,/,$(PACKAGE))
|
||||
OUT=out
|
||||
EDITOR=emacs
|
||||
|
||||
$(OUT):
|
||||
mkdir -p $(OUT)
|
||||
|
||||
clean:
|
||||
find $(OUT) -name "*.class" -type f -print0|xargs -0 rm
|
||||
@find $(OUT) -name "*.class" -type f -print0|xargs -0 rm 2>/dev/null || echo "nothing to clean"
|
||||
|
||||
test:
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/LabyModel.java
|
||||
@@ -29,17 +30,21 @@ compile/%:
|
||||
javac -d $(OUT) $(PACKAGE_DIR)/$(subst compile/,,$@).java
|
||||
|
||||
$(PACKAGE_DIR)/%.java:
|
||||
./generate_newclass.sh $(subst .java,,$(subst $(PACKAGE_DIR)/,,$@))
|
||||
./generate_new.sh class $(subst .java,,$(subst $(PACKAGE_DIR)/,,$@))
|
||||
|
||||
interface/%:
|
||||
./generate_new.sh interface package_dir=$(PACKAGE_DIR) $(subst interface/,,$@)
|
||||
$(EDITOR) $(PACKAGE_DIR)/$(subst interface/,,$@).java
|
||||
|
||||
work/%: $(PACKAGE_DIR)/$(subst work/,,%).java
|
||||
emacs $<
|
||||
$(EDITOR) $<
|
||||
|
||||
work: work/LabyModel
|
||||
|
||||
save:
|
||||
git citool
|
||||
|
||||
.PHONY: clean test work display work/% run/% save compile/%
|
||||
.PHONY: clean test work display work/% run/% save compile/% interface/%
|
||||
|
||||
# tried to avoid intermediate file removal : does not work
|
||||
# .SECONDARY: $(PACKAGE_DIR)/%.java
|
||||
|
||||
Reference in New Issue
Block a user