source: tags/se/lu/thep/affymetrix-0.6/Makefile @ 307

Last change on this file since 307 was 304, checked in by Jari Häkkinen, 16 years ago

Bumped version number.

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