source: trunk/se/lu/thep/affymetrix/Makefile @ 290

Last change on this file since 290 was 289, checked in by Peter Johansson, 16 years ago

improved dependencies

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Makefile 289 2007-05-22 15:33:49Z peter $
2
3# ======================================================================
4# Copyright (C) 2006 Jari Häkkinen
5# Copyright (C) 2007 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 = pre0.6
53
54SRCDIR = .src
55TOPDIR = ../../../..
56
57# Prefix for where to install the plug-in. This is normally the path
58# to BASE
59BASEROOT ?= /usr/local/base
60
61# Location of BASE2Core.jar. This is usually
62# $(BASEROOT)/www/WEB-INF/lib/BASE2Core.jar
63BASECORE ?= $(BASEROOT)/www/WEB-INF/lib/BASE2Core.jar
64
65# The directory, relative to $(BASEROOT), where to install the plug-in
66RELPLUGINDIR ?= www/plugins/se/lu/thep/affymetrix
67PLUGINDIR ?= $(BASEROOT)/$(RELPLUGINDIR)
68
69JAVA = RMAExpress.java Plier.java
70CLASS = $(JAVA:.java=.class)
71JAR  = affymetrix.jar
72
73# Files to include in binary distributions
74BINDISTFILES = AUTHORS ChangeLog COPYING INSTALL Makefile README $(JAR)
75# Binary package name
76BINPACKAGEFILE = base_affymetrix_plugin-$(VERSION)
77# Files to include in binary distributions
78SRCDISTFILES = AUTHORS ChangeLog COPYING INSTALL Makefile README $(JAVA)
79# Binary package name
80SRCPACKAGEFILE = $(BINPACKAGEFILE)-src
81
82all: $(SRCDIR) $(JAR)
83
84clean:; @(rm -rf *.jar *.class *~ $(SRCDIR)\
85  $(BINPACKAGEFILE) $(BINPACKAGEFILE).tar.gz $(BINPACKAGEFILE).tar.gz.MD5 \
86  $(SRCPACKAGEFILE) $(SRCPACKAGEFILE).tar.gz $(SRCPACKAGEFILE).tar.gz.MD5 )
87
88dist: clean all
89  @echo Creating dist files
90  @mkdir $(BINPACKAGEFILE)
91  @cp -p $(BINDISTFILES) $(BINPACKAGEFILE)
92  @tar zcf $(BINPACKAGEFILE).tar.gz $(BINPACKAGEFILE)
93  @md5sum $(BINPACKAGEFILE).tar.gz > $(BINPACKAGEFILE).tar.gz.MD5
94  @mkdir $(SRCPACKAGEFILE)
95  @cp -p $(SRCDISTFILES) $(SRCPACKAGEFILE)
96  @tar zcf $(SRCPACKAGEFILE).tar.gz $(SRCPACKAGEFILE)
97  @md5sum $(SRCPACKAGEFILE).tar.gz > $(SRCPACKAGEFILE).tar.gz.MD5
98
99.PHONY: all clean dist install install-precompiled
100
101install: all install-precompiled
102
103install-precompiled:
104  @install -d $(PLUGINDIR)
105  install -p $(JAR) $(PLUGINDIR)
106
107$(JAR): $(CLASS)
108  @echo Creating $(JAR)
109  @( cd $(TOPDIR) ; \
110    jar cf se/lu/thep/affymetrix/$(JAR) se/lu/thep/affymetrix/*.class )
111
112$(SRCDIR)/%.java: %.java Makefile
113  @sed -e 's/@version.*/@version $(VERSION)/' \
114  "$<" > "$@"; \
115
116%.class: $(SRCDIR)/%.java
117  javac -cp $(BASECORE) -d $(TOPDIR) $<
118
119$(SRCDIR):
120  mkdir $@
Note: See TracBrowser for help on using the repository browser.