1 | ## Process this file with automake to produce Makefile.in |
---|
2 | ## |
---|
3 | ## $Id: Makefile.am 889 2008-12-05 22:59:49Z peter $ |
---|
4 | |
---|
5 | # Copyright (C) 2007 Peter Johansson |
---|
6 | # Copyright (C) 2008 Jari Häkkinen, Peter Johansson |
---|
7 | # |
---|
8 | # This file is part of WeNNI, |
---|
9 | # http://baseplugins.thep.lu.se/wiki/se.lu.thep.WeNNI |
---|
10 | # |
---|
11 | # WeNNI is free software; you can redistribute it and/or modify it |
---|
12 | # under the terms of the GNU General Public License as published by the |
---|
13 | # Free Software Foundation; either version 3 of the License, or (at |
---|
14 | # your option) any later version. |
---|
15 | # |
---|
16 | # WeNNI is distributed in the hope that it will be useful, but WITHOUT |
---|
17 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
18 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
19 | # for more details. |
---|
20 | # |
---|
21 | # You should have received a copy of the GNU General Public License |
---|
22 | # along with WeNNI. If not, see <http://www.gnu.org/licenses/>. |
---|
23 | |
---|
24 | include $(top_srcdir)/install_plugin.am |
---|
25 | |
---|
26 | TOPBUILDDIR = .build |
---|
27 | SUBDIR = se/lu/thep/wenni |
---|
28 | BUILDDIR = $(TOPBUILDDIR)/$(SUBDIR) |
---|
29 | MANIFEST_FILE = MANIFEST.MF |
---|
30 | |
---|
31 | JAVA = WeNNI.java |
---|
32 | CLASS = $(BUILDDIR)/$(JAVA:.java=.class) |
---|
33 | WeNNI = WeNNI.jar |
---|
34 | inst_JARS = $(WeNNI) $(PLUGINutilities)/$(PLUGINutilities).jar |
---|
35 | |
---|
36 | if DOWNLOADBASEAPI |
---|
37 | DOWNLOADDEP=$(builddir)/BaseCoreAPI |
---|
38 | endif |
---|
39 | |
---|
40 | all-local: $(WeNNI) |
---|
41 | |
---|
42 | clean-local:; @( rm -rf *.jar *.class *~ $(TOPBUILDDIR) $(MANIFEST_FILE) ) |
---|
43 | |
---|
44 | distclean-local: clean-local |
---|
45 | @( rm -rf $(DOWNLOADDEP) $(PLUGINutilities) $(PLUGINutilities).tgz ) |
---|
46 | |
---|
47 | install-exec-local: $(inst_JARS) |
---|
48 | @$(NORMAL_INSTALL) |
---|
49 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" |
---|
50 | @list='$(inst_JARS)'; for p in $$list; do \ |
---|
51 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ |
---|
52 | if test -f $$d$$p; then \ |
---|
53 | f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ |
---|
54 | echo " $(INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ |
---|
55 | $(INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ |
---|
56 | else :; fi; \ |
---|
57 | done |
---|
58 | |
---|
59 | uninstall-local: |
---|
60 | @$(NORMAL_UNINSTALL) |
---|
61 | @list='$(inst_JARS)'; for p in $$list; do \ |
---|
62 | f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ |
---|
63 | echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ |
---|
64 | rm -f "$(DESTDIR)$(bindir)/$$f"; \ |
---|
65 | done |
---|
66 | |
---|
67 | $(WeNNI): $(BUILDDIR) $(PLUGINutilities) $(DOWNLOADDEP) $(CLASS) $(MANIFEST_FILE) |
---|
68 | @echo Creating $(WeNNI) |
---|
69 | @(cd $(TOPBUILDDIR) ; $(JAR) cmf ../$(MANIFEST_FILE) ../$(WeNNI) .) |
---|
70 | |
---|
71 | $(MANIFEST_FILE): Makefile |
---|
72 | @echo "Manifest-Version: 1.0" > "$(MANIFEST_FILE)" |
---|
73 | @echo "Class-Path: $(PLUGINutilities).jar" >> $(MANIFEST_FILE) |
---|
74 | |
---|
75 | $(BUILDDIR)/$(JAVA): $(srcdir)/$(JAVA) Makefile |
---|
76 | @$(SED) "s/MAKESUBSTOFVERSIONNUMBER/$(VERSION)/" $< > $@ |
---|
77 | |
---|
78 | $(CLASS): $(BUILDDIR)/$(JAVA) |
---|
79 | $(JAVAC) $(JAVACFLAGS) -cp $(JAVACCLASSPATH):$(TOPBUILDDIR) $< |
---|
80 | |
---|
81 | $(BUILDDIR): |
---|
82 | @$(MKDIR_P) $@ |
---|
83 | |
---|
84 | $(TOPBUILDDIR): |
---|
85 | @$(MKDIR_P) $@ |
---|
86 | |
---|
87 | $(builddir)/BaseCoreAPI: |
---|
88 | $(MKDIR_P) $@ |
---|
89 | ( cd $@ ; \ |
---|
90 | wget $(BASE2CoreURL)/BASE2Core.jar ; \ |
---|
91 | wget $(BASE2CoreURL)/BASE2CorePlugins.jar ) |
---|
92 | |
---|
93 | $(PLUGINutilities): $(PLUGINutilities).tgz |
---|
94 | $(AMTAR) zxpf $< |
---|
95 | |
---|
96 | $(PLUGINutilities).tgz: |
---|
97 | wget -O $@ $(PLUGINutilitiesURL) |
---|