Commits

Cat's Eye Technologies  committed ecec70e

GNU Make-specific conditional that "just works" under Cygwin.

  • Participants
  • Parent commits 251babd

Comments (0)

Files changed (1)

 
 JAVAC?=javac
 JAVA?=java
-PATHSEP?=:
+ifeq ($(OS),Windows_NT)
+  PATHSEP=;
+else
+  PATHSEP=:
+endif
 
 JFLAGS?=-Xlint:deprecation -Xlint:unchecked
 CDIR=bin/tc/catseye/ypsilax
 CLASSES=$(CDIR)/YpsilaxState.class
 
 YOOBDIR?=../yoob
-CLASSPATH?=bin$(PATHSEP)$(YOOBDIR)/bin
+CP?=bin$(PATHSEP)$(YOOBDIR)/bin
 
 all: $(CLASSES)
 
 $(CDIR)/YpsilaxState.class: src/YpsilaxState.java
-	$(JAVAC) $(JFLAGS) -cp "$(CLASSPATH)" -d bin src/YpsilaxState.java
+	$(JAVAC) $(JFLAGS) -cp "$(CP)" -d bin src/YpsilaxState.java
 
 clean:
 	rm -rf $(CDIR)/*.class
 
 test: $(CLASSES)
-	$(JAVA) -cp "$(CLASSPATH)" tc.catseye.yoob.GUI -c "tc.catseye.ypsilax.YpsilaxState/Ypsilax" -s Ypsilax
+	$(JAVA) -cp "$(CP)" tc.catseye.yoob.GUI -c "tc.catseye.ypsilax.YpsilaxState/Ypsilax" -s Ypsilax