-
Notifications
You must be signed in to change notification settings - Fork 965
/
Makefile
68 lines (50 loc) · 1.96 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copies all dependent .jar files used by j2objc into the build.
#
# Author: Keith Stanger
SUFFIXES:
.SECONDARY:
J2OBJC_ROOT = ..
include ../make/common.mk
include jars.mk
DISTRIBUTION_JARS = $(JSR305_JAR) $(JAVAX_INJECT_JAR) \
$(JUNIT_JAR) $(HAMCREST_JAR) $(MOCKITO_JAR)
INTERNAL_JARS = $(GUAVA_JAR) $(GUAVA_SOURCE_JAR) $(JUNIT_SOURCE_JAR) $(HAMCREST_SOURCE_JAR) \
$(JSR305_SOURCE_JAR) $(JAVAX_INJECT_SOURCE_JAR) $(MOCKITO_SOURCE_JAR) \
$(ECLIPSE_JARS) $(JARJAR) $(ASM_JAR) $(JAVAC_JAR)
DIST_JARS = $(DISTRIBUTION_JARS:%=$(DIST_JAR_DIR)/%)
DOCLET_JARS = $(DOCLAVA_JAR) $(JSILVER_JAR)
BUILD_DIR_JARS = $(DISTRIBUTION_JARS:%=$(BUILD_DIR)/%) $(INTERNAL_JARS:%=$(BUILD_DIR)/%)
BUILD_DIR_DOCLET_JARS = $(DOCLET_JARS:%=$(BUILD_DIR)/%)
$(BUILD_DIR_JARS): $(BUILD_DIR)/.maven_generate
$(BUILD_DIR)/.maven_generate: | $(BUILD_DIR)
mvn -q generate-resources dependency:sources
@touch $@
$(BUILD_DIR)/$(JUNIT_JAR): $(BUILD_DIR)/$(JUNIT_ROOT_JAR)
@cp -f $< $@
$(BUILD_DIR)/$(JUNIT_ROOT_JAR): $(BUILD_DIR)/.maven_generate
@:
$(BUILD_DIR)/$(JAVAC_JAR): | $(BUILD_DIR)
@cp -f $(JAVA_HOME)/lib/$(JAVAC_JAR) $@
$(BUILD_DIR)/$(JARJAR): | $(BUILD_DIR)
@cp -f internal/$(JARJAR) $@
$(BUILD_DIR) $(DIST_JAR_DIR):
@mkdir -p $@
$(DIST_JAR_DIR)/%.jar: $(BUILD_DIR)/%.jar | $(DIST_JAR_DIR)
@install -m 0644 $< $@
dist: $(BUILD_DIR_JARS) $(DIST_JARS)
@:
javadoc_jars: $(BUILD_DIR_DOCLET_JARS) | $(BUILD_DIR)
@:
clean:
@rm -rf $(BUILD_DIR) $(DIST_JARS)