1 | # $Id: Makefile 189 2006-10-27 08:53:18Z jari $ |
---|
2 | |
---|
3 | # ====================================================================== |
---|
4 | # Copyright (C) 2006 Jari Häkkinen |
---|
5 | # |
---|
6 | # This file is part of RMAExpress plug-in for BASE, |
---|
7 | # http://baseplugins.thep.lu.se/wiki/thep.lu.se.RMAExpressPlugIn |
---|
8 | # |
---|
9 | # RMAExpress plug-in for BASE is free software; you can redistribute it |
---|
10 | # and/or modify it under the terms of the GNU General Public License as |
---|
11 | # published by the Free Software Foundation; either version 2 of the |
---|
12 | # License, or (at your option) any later version. |
---|
13 | # |
---|
14 | # RMAExpress plug-in for BASE is distributed in the hope that it will be |
---|
15 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | # General Public License for more details. |
---|
18 | # |
---|
19 | # You should have received a copy of the GNU General Public License |
---|
20 | # along with this program; if not, write to the Free Software |
---|
21 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
---|
22 | # USA. |
---|
23 | # ====================================================================== |
---|
24 | # |
---|
25 | # Maintainer and advanced user information. |
---|
26 | # |
---|
27 | # 'make' will compile the source and create the jar file assuming that |
---|
28 | # the BASE application is located in BASEROOT defined below, and in |
---|
29 | # consequnce use BASECORE defined below as the BASE2Core.jar file. |
---|
30 | # |
---|
31 | # 'make BASEROOT=dir' can be used to point to where the BASE |
---|
32 | # application is installed. BASECORE and PLUGINDIR will be changed |
---|
33 | # accordingly. |
---|
34 | # |
---|
35 | # 'make BASECORE=/path/to/BASE2Core.jar' can be used to set the |
---|
36 | # BASE2Core.jar file independently of the BASE appication root. |
---|
37 | # |
---|
38 | # 'make RELPLUGINDIR=dir install' sets the plug-in installation |
---|
39 | # directory location relative to BASE root when installing the |
---|
40 | # plug-in. If the plug-dir location should be outside of the BASE |
---|
41 | # directory hierarchy use 'make PLUGINDIR=dir'. |
---|
42 | # |
---|
43 | # 'make PLUGINDIR=dir install' sets the plug-in installation directory |
---|
44 | # location independently of BASE root when installing the plug-in. |
---|
45 | # |
---|
46 | # 'make dist' with optional BASEROOT or BASECORE will create binary |
---|
47 | # distribution and source distribution packages with corresponding |
---|
48 | # md5sum files. NOTE if make dist fails you MUST do 'make |
---|
49 | # versionunfix' to recover the RMAExpress.java to its previous |
---|
50 | # state. If you fail to do this, the java file will become slightly |
---|
51 | # corrupt. This is because 'make dist' will actually use 'sed' to |
---|
52 | # replace strings in the source with the version number below. |
---|
53 | # |
---|
54 | |
---|
55 | VERSION = 0.3 |
---|
56 | |
---|
57 | # Prefix for where to install the plug-in. This is normally the path |
---|
58 | # to BASE |
---|
59 | BASEROOT ?= /usr/local/base |
---|
60 | |
---|
61 | # Location of BASE2Core.jar. This is usually |
---|
62 | # $(BASEROOT)/www/WEB-INF/lib/BASE2Core.jar |
---|
63 | BASECORE ?= $(BASEROOT)/www/WEB-INF/lib/BASE2Core.jar |
---|
64 | |
---|
65 | # The directory, relative to $(BASEROOT), where to install the plug-in |
---|
66 | RELPLUGINDIR ?= www/plugins/se/lu/thep/affymetrix |
---|
67 | PLUGINDIR ?= $(BASEROOT)/$(RELPLUGINDIR) |
---|
68 | |
---|
69 | JAR = RMAExpress.jar |
---|
70 | |
---|
71 | # Files to include in binary distributions |
---|
72 | BINDISTFILES = AUTHORS ChangeLog COPYING INSTALL Makefile README RMAExpress.jar |
---|
73 | # Binary package name |
---|
74 | BINPACKAGEFILE = base_rmaexpress_plugin-$(VERSION) |
---|
75 | # Files to include in binary distributions |
---|
76 | SRCDISTFILES = AUTHORS ChangeLog COPYING INSTALL Makefile README RMAExpress.java |
---|
77 | # Binary package name |
---|
78 | SRCPACKAGEFILE = base_rmaexpress_plugin-$(VERSION)-src |
---|
79 | |
---|
80 | all: $(JAR) |
---|
81 | |
---|
82 | clean:; @(rm -rf $(JAR) *.class *~ \ |
---|
83 | $(BINPACKAGEFILE) $(BINPACKAGEFILE).tar.gz $(BINPACKAGEFILE).tar.gz.MD5 \ |
---|
84 | $(SRCPACKAGEFILE) $(SRCPACKAGEFILE).tar.gz $(SRCPACKAGEFILE).tar.gz.MD5 ) |
---|
85 | |
---|
86 | dist: clean versionfix $(JAR) versionunfix |
---|
87 | @echo Creating dist files |
---|
88 | @mkdir $(BINPACKAGEFILE) |
---|
89 | @cp -p $(BINDISTFILES) $(BINPACKAGEFILE) |
---|
90 | @tar zcf $(BINPACKAGEFILE).tar.gz $(BINPACKAGEFILE) |
---|
91 | @md5sum $(BINPACKAGEFILE).tar.gz > $(BINPACKAGEFILE).tar.gz.MD5 |
---|
92 | @mkdir $(SRCPACKAGEFILE) |
---|
93 | @cp -p $(SRCDISTFILES) $(SRCPACKAGEFILE) |
---|
94 | @tar zcf $(SRCPACKAGEFILE).tar.gz $(SRCPACKAGEFILE) |
---|
95 | @md5sum $(SRCPACKAGEFILE).tar.gz > $(SRCPACKAGEFILE).tar.gz.MD5 |
---|
96 | |
---|
97 | .PHONY: install |
---|
98 | install: $(JAR) |
---|
99 | mkdirhier $(PLUGINDIR) |
---|
100 | cp -p RMAExpress.jar $(PLUGINDIR) |
---|
101 | |
---|
102 | install-precompiled: |
---|
103 | mkdirhier $(PLUGINDIR) |
---|
104 | cp -p RMAExpress.jar $(PLUGINDIR) |
---|
105 | |
---|
106 | $(JAR): RMAExpress.class |
---|
107 | @echo Creating $(JAR) |
---|
108 | @( cd ../../../.. ; \ |
---|
109 | jar cf se/lu/thep/affymetrix/$(JAR) se/lu/thep/affymetrix/*.class ) |
---|
110 | |
---|
111 | versionfix:; |
---|
112 | @mv RMAExpress.java RMAExpress.java_orig |
---|
113 | @sed ''s/MAKESUBSTOFVERSIONNUMBER/$(VERSION)/'' \ |
---|
114 | RMAExpress.java_orig > RMAExpress.java |
---|
115 | |
---|
116 | versionunfix: |
---|
117 | @mv RMAExpress.java_orig RMAExpress.java |
---|
118 | |
---|
119 | %.class: %.java |
---|
120 | @javac -cp $(BASECORE) $< |
---|