1#
2# @(#)GNUmakefile	1.31 06/10/30
3#
4# Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
5# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6#
7# This code is free software; you can redistribute it and or modify it
8# under the terms of the GNU General Public License version 2 only, as
9# published by the Free Software Foundation.  Sun designates this
10# particular file as subject to the "Classpath" exception as provided
11# by Sun in the LICENSE file that accompanied this code.
12#
13# This code is distributed in the hope that it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16# version 2 for more details (a copy is included in the LICENSE file that
17# accompanied this code).
18#
19# You should have received a copy of the GNU General Public License version
20# 2 along with this work; if not, write to the Free Software Foundation,
21# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22#
23# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
24# CA 95054 USA or visit www.sun.com if you need additional information or
25# have any questions.
26#
27
28# This is a bare-bones Makefile just to build the engine from scratch.
29#
30# It should be replaced by a real Makefile.
31
32TOP := $(shell pwd)
33
34ifeq ($(JHHOMEWS),)
35TOP=$(shell pwd)
36JHHOMEWS=$(TOP)/../JavaHelp
37endif
38
39CP=/bin/cp -f
40
41PKG = com/sun/java/help/search
42JARS = 	lib/jsearch-misc.jar \
43	lib/jsearch-client.jar \
44	lib/jsearch-indexer.jar \
45	lib/jsearch.jar
46
47all: lib ${JARS} binaries demos
48
49clean:
50	rm -rf lib
51	cd client ; $(MAKE) clean
52	cd indexer ; $(MAKE) clean
53	cd misc ; $(MAKE) clean
54
55# simple scripts
56
57binaries: jhindexer jhsearch
58	- chmod a+x jhindexer
59	- chmod a+x jhsearch
60
61# a test case
62
63demos: demos/holidays
64
65demos/holidays:
66	mkdir -p demos/holidays
67	cd demos/holidays ; export to ; to=`pwd` ; \
68	cd ${JHHOMEWS}/demos/hs/holidays ; \
69	tar cf - hol | ( cd $${to} ; tar xvf - )
70
71
72## JAR files
73
74lib/jsearch.jar: lib/jsearch-client.jar lib/jsearch-indexer.jar lib/jsearch-misc.jar
75	/bin/csh -f jarinto FORCE lib/jsearch.jar \
76		lib/jsearch-client.jar lib/jsearch-indexer.jar lib/jsearch-misc.jar
77
78lib/jsearch-misc.jar: FORCE
79	cd misc ; $(MAKE) JHHOMEWS=$(JHHOMEWS) jar
80
81lib/jsearch-client.jar: lib/jsearch-misc.jar FORCE
82	cd client ; $(MAKE) jar
83
84lib/jsearch-indexer.jar: lib/jsearch-misc.jar FORCE
85	cd indexer ; $(MAKE) jar
86
87## Directories
88
89lib:
90	mkdir -p lib
91
92FORCE:
93