2 # this makefile is used for command packages
5 PKGDIR
=$(subst .
,/,$(PACKAGE
))
7 CLASS_SOURCES
=$(shell for i in
$(CLASSES
); do echo
$$i.java
; done
)
8 REAL_CLASS_FILES
=$(shell for i in
$(CLASSES
); do echo
$(BUILDDIR
)/$(PKGDIR
)/$$i.class
; done
)
9 REAL_OBJ_FILES
=$(shell for i in
$(CLASSES
); do echo
$(BUILDDIR
)/$(PKGDIR
)/$$i.o
; done
)
10 XXX_CLASS_FILES
=$(shell for i in
$(CLASSES
); do echo
$(PKGDIR
)/$$i.class
; done
)
11 XXX_OBJ_FILES
=$(shell for i in
$(CLASSES
); do echo
$(PKGDIR
)/$$i.o
; done
)
12 IMPORT_FILES
=$(shell for i in
$(IMPORTS
); do echo
$(BUILDDIR
)/$$i.jar
; done
)
15 #all: prepare $(REAL_CLASS_FILES) $(COMMAND)
16 all: prepare
$(COMMAND
)
18 .SUFFIXES
: .java .class
20 $(BUILDDIR
)$(PACKAGE
).jar
: $(REAL_CLASS_FILES
)
21 cd
$(BUILDDIR
)/ && jar cvf
$(PACKAGE
).jar
$(XXX_CLASS_FILES
)
24 mkdir
-p
$(BUILDDIR
)/$(PKGDIR
)
26 $(BUILDDIR
)/$(PKGDIR
)/%.o
: %.java
28 mv
*.o
$(BUILDDIR
)/$(PKGDIR
)
30 $(BUILDDIR
)/$(PKGDIR
)/%.class
: %.java
31 CLASSPATH
=$(CLASSPATH
) gcj
-C
$<
32 mv
*.class
$(BUILDDIR
)/$(PKGDIR
)
35 CLASSPATH
=$(CLASSPATH
) $(JAVAC
) $(COMMAND
).java
38 rm -f
*.o
*.class run-unit-test
$(REAL_CLASS_FILES
) $(REAL_OBJ_FILES
) $(BUILDDIR
)$(PACKAGE
).jar