1 |
|
# Makefile for server |
2 |
|
# $Id$ |
3 |
|
|
4 |
< |
IDL = idl/.madeidl |
4 |
> |
include Config.inc |
5 |
|
|
6 |
< |
all : buildidl code |
6 |
> |
all : dist |
7 |
|
|
8 |
< |
idl : $(IDL) |
9 |
< |
$(IDL) : idl/iscream.idl |
8 |
> |
### Code Building |
9 |
> |
|
10 |
> |
genidl : $(IDLCHECK) |
11 |
> |
$(IDLCHECK) : |
12 |
|
cd idl && $(MAKE) idl |
13 |
|
|
14 |
< |
buildidl : $(IDL) idl |
15 |
< |
cd idl/uk/ac/ukc/iscream/clientinterface && javac -g:none -O -d ../../../../../../build *.java |
14 |
< |
cd idl/uk/ac/ukc/iscream/core && javac -g:none -O -d ../../../../../../build *.java |
15 |
< |
cd idl/uk/ac/ukc/iscream/filter && javac -g:none -O -d ../../../../../../build *.java |
14 |
> |
buildidl : genidl |
15 |
> |
cd idl && $(MAKE) build |
16 |
|
|
17 |
< |
code : |
18 |
< |
cd uk/ac/ukc/iscream && $(MAKE) all |
17 |
> |
build : buildidl |
18 |
> |
cd uk/org/iscream/cms/server && $(MAKE) all |
19 |
> |
cd $(BUILD) && $(MAKE) package |
20 |
|
|
21 |
+ |
### Source, Doc, & Changelog |
22 |
+ |
|
23 |
+ |
src : $(SRCCHECK) |
24 |
+ |
$(SRCCHECK) : |
25 |
+ |
if test ! -d "$(SRCDIR)"; then mkdir -p $(SRCDIR); fi |
26 |
+ |
echo "CVS" > TAR_EXCLUDE_TMP |
27 |
+ |
echo ".#*" >> TAR_EXCLUDE_TMP |
28 |
+ |
tar -cf - -X TAR_EXCLUDE_TMP $(SRCFILES) | ( cd $(SRCDIR) && tar -xf - ) |
29 |
+ |
rm -f TAR_EXCLUDE_TMP |
30 |
+ |
@touch $(SRCCHECK) |
31 |
+ |
|
32 |
+ |
javadoc : $(JAVADOCCHECK) |
33 |
+ |
$(JAVADOCCHECK) : $(IDLCHECK) |
34 |
+ |
if test ! -d "$(DOCDIR)"; then mkdir -p $(DOCDIR); fi |
35 |
+ |
if test ! -d "$(DOCTMPDIR)"; then mkdir -p $(DOCTMPDIR); fi |
36 |
+ |
cp -R $(SOURCEROOT)/uk $(DOCTMPDIR) |
37 |
+ |
cp -R $(SOURCEROOT)/idl/uk $(DOCTMPDIR) |
38 |
+ |
$(JAVADOCBIN) -d $(DOCDIR) -sourcepath $(DOCTMPDIR) -classpath $(JCCLASSPATH) -windowtitle $(JDTITLE) -author -version -private -use -header $(JDHEADER) -bottom $(JDBOTTOM) -linkoffline $(JDJAPI) $(JDJAPIC) -linkoffline $(JDPBAPI) $(JDPBAPIC) $(PKGLIST) |
39 |
+ |
rm -Rf $(DOCTMPDIR) |
40 |
+ |
@touch $(JAVADOCCHECK) |
41 |
+ |
|
42 |
+ |
changelog : $(CHANGELOG) |
43 |
+ |
$(CHANGELOG) : |
44 |
+ |
$(CVS2CL) $(CVS2CLFLAGS) > $(CHANGELOG) |
45 |
+ |
|
46 |
+ |
### Dist Making |
47 |
+ |
|
48 |
+ |
dist : build src javadoc changelog |
49 |
+ |
cd $(BUILD) && $(MAKE) dist ver=$(VERSION) dest=$(DISTDEST) |
50 |
+ |
|
51 |
+ |
dist-bin : build changelog |
52 |
+ |
cd $(BUILD) && $(MAKE) dist-bin ver=$(VERSION) dest=$(DISTDEST) |
53 |
+ |
|
54 |
+ |
### CVS Magic :) |
55 |
+ |
|
56 |
+ |
cvs-dist : |
57 |
+ |
$(CVS) -d $(CVSROOT) export -r $(CVSTAG) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) |
58 |
+ |
cd $(CVSBUILDTEMP) && ./configure |
59 |
+ |
cd $(CVSBUILDTEMP) && $(MAKE) dist ver=$(VERSION) dest=$(DISTDEST) |
60 |
+ |
|
61 |
+ |
cvs-dist-bin : |
62 |
+ |
$(CVS) -d $(CVSROOT) export -r $(CVSTAG) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) |
63 |
+ |
cd $(CVSBUILDTEMP) && ./configure |
64 |
+ |
cd $(CVSBUILDTEMP) && $(MAKE) dist-bin ver=$(VERSION) dest=$(DISTDEST) |
65 |
+ |
|
66 |
+ |
### Code Cleaning |
67 |
+ |
|
68 |
|
clean : |
69 |
|
cd idl && $(MAKE) clean |
70 |
< |
cd uk/ac/ukc/iscream && $(MAKE) clean |
71 |
< |
cd build && $(MAKE) clean |
70 |
> |
cd $(BUILD) && $(MAKE) clean ver=$(VERSION) |
71 |
> |
cd uk/org/iscream/cms/server && $(MAKE) clean |
72 |
> |
rm -f $(BUILDCHECK) $(IDLCHECK) $(JAVADOCCHECK) $(SRCCHECK) |
73 |
> |
rm -Rf $(CVSBUILDTEMP) $(DOCTMPDIR) |
74 |
|
|
75 |
< |
update : |
76 |
< |
cvs -q -d /usr/local/proj/co600_10/cvs update |
75 |
> |
distclean : clean |
76 |
> |
cd $(BUILD) && rm -f $(CLPATH) |
77 |
> |
rm -Rf $(APICACHE) |
78 |
> |
rm -f Config.inc |
79 |
|
|
80 |
< |
runclientinterface : |
29 |
< |
cd uk/ac/ukc/iscream/clientinterface && $(MAKE) all |
30 |
< |
cd build && java uk.ac.ukc.iscream.clientinterface.ClientInterfaceMain |
80 |
> |
### Util Package |
81 |
|
|
82 |
< |
runcore : |
83 |
< |
cd uk/ac/ukc/iscream/core && $(MAKE) all |
84 |
< |
cd build && java uk.ac.ukc.iscream.core.Core -l etc/default.properties |
82 |
> |
buildutil : clean |
83 |
> |
cd uk/org/iscream/cms/server/util && $(MAKE) all |
84 |
> |
cd $(BUILD) && $(MAKE) packageutil |
85 |
|
|
86 |
< |
rundbinterface : |
37 |
< |
cd uk/ac/ukc/iscream/dbinterface && $(MAKE) all |
38 |
< |
cd build && java uk.ac.ukc.iscream.dbinterface.DBInterfaceMain |
86 |
> |
### Database |
87 |
|
|
88 |
< |
runfiltermanager : |
89 |
< |
cd uk/ac/ukc/iscream/filtermanager && $(MAKE) all |
42 |
< |
cd build && java uk.ac.ukc.iscream.filtermanager.FilterManager |
88 |
> |
createtable : |
89 |
> |
cd db && $(MAKE) create |
90 |
|
|
91 |
< |
runrootfilter : |
92 |
< |
cd uk/ac/ukc/iscream/rootfilter && $(MAKE) all |
46 |
< |
cd build &&java uk.ac.ukc.iscream.rootfilter.RootFilterMain |
91 |
> |
droptable : |
92 |
> |
cd db && $(MAKE) drop |
93 |
|
|
94 |
< |
runfilter : |
49 |
< |
cd uk/ac/ukc/iscream/filter && $(MAKE) all |
50 |
< |
cd build && java uk.ac.ukc.iscream.filter.FilterMain $(NAME) |
94 |
> |
### Install |
95 |
|
|
96 |
< |
build : all |
97 |
< |
cd build && $(MAKE) package |
96 |
> |
install : build |
97 |
> |
@echo "-------------------------------------------------------" |
98 |
> |
@echo "Installing to $(INSTALL)" |
99 |
> |
@echo " copying $(PACKAGE) to $(INSTALL)" |
100 |
> |
mkdir -p $(INSTALL) |
101 |
> |
cp $(BUILD)/$(PACKAGE) $(INSTALL) |
102 |
> |
@echo " copying libs to $(INSTALL)/lib" |
103 |
> |
mkdir -p $(INSTALL)/lib |
104 |
> |
cp $(LIBDIR)/*.jar $(INSTALL)/lib |
105 |
> |
@echo " copying etc to $(INSTALL)/etc" |
106 |
> |
mkdir -p $(INSTALL)/etc |
107 |
> |
cp $(BUILD)/etc/default.properties $(INSTALL)/etc |
108 |
> |
cp $(BUILD)/etc/*.conf $(INSTALL)/etc |
109 |
> |
@echo " copying scripts to $(INSTALL)" |
110 |
> |
cp $(BUILD)/run.sh $(INSTALL) |
111 |
> |
cp $(BUILD)/run.bat $(INSTALL) |
112 |
> |
@echo "Completed install to $(INSTALL)" |
113 |
> |
@echo "-------------------------------------------------------" |
114 |
> |
|
115 |
> |
### Other |
116 |
> |
|
117 |
> |
run : build |
118 |
> |
cd $(BUILD) && ./run.sh |
119 |
> |
|
120 |
> |
### Global Include |
121 |
> |
|
122 |
> |
include $(MKINC) |