Reviewed By: @cristianoc Differential Revision: D2511918 fb-gh-sync-id: feb838bmaster
parent
b277d8164c
commit
4f7a56d470
@ -1,24 +1,30 @@
|
||||
DEPENDENCIES = ../../dependencies
|
||||
CWD = $(shell pwd)
|
||||
DEPENDENCIES = $(CWD)/../../dependencies
|
||||
LIB = $(CWD)/../lib/java
|
||||
JSR_JAR = $(DEPENDENCIES)/java/jsr-305/jsr305.jar
|
||||
ANNOT_SOURCES = `find com/facebook/infer/annotation -name "*.java"`
|
||||
PROCESSOR_SOURCES = `find com/facebook/infer/annotprocess -name "*.java"`
|
||||
ANNOT_SOURCES = $(shell find com/facebook/infer/annotation -name "*.java")
|
||||
PROCESSOR_SOURCES = $(shell find com/facebook/infer/annotprocess -name "*.java")
|
||||
ANNOT_CLASSES = 'annot_classes'
|
||||
PROCESSOR_CLASSES = 'processor_classes'
|
||||
|
||||
all: annotations processor
|
||||
ANNOTATIONS_JAR = $(CWD)/annotations.jar
|
||||
PROCESSOR_JAR = $(LIB)/processor.jar
|
||||
|
||||
annotations:
|
||||
all: $(ANNOTATIONS_JAR) $(PROCESSOR_JAR)
|
||||
|
||||
$(ANNOTATIONS_JAR): $(ANNOT_SOURCES)
|
||||
mkdir -p $(ANNOT_CLASSES)
|
||||
javac -cp $(JSR_JAR) $(ANNOT_SOURCES) -d $(ANNOT_CLASSES)
|
||||
cd $(ANNOT_CLASSES) && jar cvf annotations.jar com && cp annotations.jar ../
|
||||
cd $(ANNOT_CLASSES) && jar cvf $(ANNOTATIONS_JAR) com
|
||||
|
||||
processor:
|
||||
$(PROCESSOR_JAR): $(PROCESSOR_SOURCES)
|
||||
mkdir -p $(PROCESSOR_CLASSES)
|
||||
javac $(PROCESSOR_SOURCES) -d $(PROCESSOR_CLASSES)
|
||||
cd $(PROCESSOR_CLASSES) && cp -r ../resources/META-INF . && jar cvMf processor.jar com META-INF && cp processor.jar ../
|
||||
jar cvMf processor.jar -C resources META-INF -C $(PROCESSOR_CLASSES) com
|
||||
mv processor.jar $(PROCESSOR_JAR)
|
||||
|
||||
clean:
|
||||
rm -rf $(ANNOT_CLASSES)
|
||||
rm -f annotations.jar
|
||||
rm -f $(ANNOTATIONS_JAR)
|
||||
rm -rf $(PROCESSOR_CLASSES)
|
||||
rm -f processor.jar
|
||||
rm -f $(PROCESSOR_JAR)
|
||||
|
Loading…
Reference in new issue