source: trunk/icedtea-web/netx/Makefile.kmk@ 360

Last change on this file since 360 was 360, checked in by dmik, 13 years ago

icedtea-web: Add proper build steps for .java and .jar files.

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1## @file
2#
3
4SUB_DEPTH = ..
5include $(KBUILD_PATH)/subheader.kmk
6
7OTHERS += netx
8BLDDIRS += $(netx_0_OUTDIR)
9
10BUILD_PROPERTIES = $(netx_0_OUTDIR)/net/sourceforge/jnlp/build.properties
11BLDDIRS += $(dir $(BUILD_PROPERTIES))
12OTHER_CLEAN += $(BUILD_PROPERTIES)
13
14MANIFEST = $(netx_0_OUTDIR)/netx.manifest
15BLDDIRS += $(dir $(MANIFEST))
16OTHER_CLEAN += $(MANIFEST)
17
18JAVASRCLIST += $(netx_0_OUTDIR)/javasrc.list
19BLDDIRS += $(dir $(JAVASRCLIST))
20OTHER_CLEAN += $(JAVASRCLIST) $(JAVASRCLIST).rsp $(JAVASRCLIST).stamp
21
22JARFILE = $(PATH_STAGE)/lib/netx.jar
23BLDDIRS += $(dir $(JARFILE))
24OTHER_CLEAN += $(JARFILE)
25
26$$(BUILD_PROPERTIES): $(PATH_ROOT)/build.properties.in | $$(call DIRDEP,$$(dir $$(@)))
27 sed "s/@RHINO_AVAILABLE@/$(if $(WITH_RHINO),true,false)/g" < $^ > $@
28
29$$(MANIFEST): $(PATH_ROOT)/netx.manifest.in | $$(call DIRDEP,$$(dir $$(@)))
30 sed "s/@PACKAGE_NAME@/$(PACKAGE_NAME)/g; \
31 s/@FULL_VERSION@/$(FULL_VERSION)/g; " < $^ > $@
32
33$$(JAVASRCLIST): $(MAKEFILE) | $$(call DIRDEP,$$(dir $$(@)))
34 @echo 'JAVASRC = \' > $@
35 find $(PATH_SUB_CURRENT) -name '*.java' \
36 $(if $(WITH_RHINO),,! -name '*RhinoBasedPacEvaluator*') \
37 -printf '%p \\\n' >> $@
38
39$$(JAVASRCLIST).stamp: $$(JAVASRC) | $$(call DIRDEP,$$(dir $$(@)))
40 $(call MSG_COMPILE,netx,$(words $?) sources,$@,JAVA)
41 @echo $? > $(JAVASRCLIST).rsp
42 $(PATH_BOOTSTRAP_JDK)/bin/javac $(IT_JAVACFLAGS) \
43 -d "$(netx_0_OUTDIR)" \
44 -sourcepath "$(PATH_SUB_CURRENT)" \
45 -bootclasspath "$(BOOTSTRAP_JDK_RUNTIME)" \
46 @"$(JAVASRCLIST).rsp"
47 @touch "$@"
48
49$$(JARFILE): $$(BUILD_PROPERTIES) $$(MANIFEST) $$(JAVASRCLIST).stamp
50 (cd $(PATH_SUB_CURRENT)/net/sourceforge/jnlp/resources; \
51 for files in $$(find . -path ./.svn -prune -o -type f -print); \
52 do \
53 $(INSTALL_DATA) -D $${files} \
54 $(netx_0_OUTDIR)/net/sourceforge/jnlp/resources/$${files}; \
55 done)
56 cp -a $(PATH_SUB_CURRENT)/net/sourceforge/jnlp/runtime/pac-funcs.js \
57 $(netx_0_OUTDIR)/net/sourceforge/jnlp/runtime
58 (cd $(netx_0_OUTDIR); \
59 $(PATH_BOOTSTRAP_JDK)/bin/jar cfm $(JARFILE) \
60 $(MANIFEST) javax/jnlp net)
61
62netx: $$(JARFILE) | $$(call DIRDEP,$$(netx_0_OUTDIR))
63
64include $(FILE_KBUILD_SUB_FOOTER)
65
66-include $(JAVASRCLIST)
Note: See TracBrowser for help on using the repository browser.