1 |
tdb |
1.1 |
# Makefile for server |
2 |
tdb |
1.35 |
# $Id: Makefile,v 1.34 2003/02/16 00:48:29 tdb Exp $ |
3 |
tdb |
1.1 |
|
4 |
tdb |
1.8 |
include Config.inc |
5 |
tdb |
1.1 |
|
6 |
tdb |
1.27 |
.PHONY : all |
7 |
tdb |
1.25 |
all : dist |
8 |
|
|
|
9 |
|
|
### Code Building |
10 |
tdb |
1.1 |
|
11 |
tdb |
1.27 |
.PHONY : build |
12 |
|
|
build : $(IDLCHECK) |
13 |
tdb |
1.23 |
cd uk/org/iscream/cms/server && $(MAKE) all |
14 |
tdb |
1.35 |
cp $(SOURCEROOT)/$(LICFILE) $(BUILD) |
15 |
tdb |
1.25 |
cd $(BUILD) && $(MAKE) package |
16 |
|
|
|
17 |
|
|
### Source, Doc, & Changelog |
18 |
|
|
|
19 |
tdb |
1.27 |
.PHONY : src |
20 |
tdb |
1.26 |
src : $(SRCCHECK) |
21 |
tdb |
1.27 |
|
22 |
|
|
.PHONY : mksrc |
23 |
|
|
mksrc : |
24 |
tdb |
1.25 |
if test ! -d "$(SRCDIR)"; then mkdir -p $(SRCDIR); fi |
25 |
|
|
echo "CVS" > TAR_EXCLUDE_TMP |
26 |
|
|
echo ".#*" >> TAR_EXCLUDE_TMP |
27 |
tdb |
1.29 |
echo "*.jar" >> TAR_EXCLUDE_TMP |
28 |
tdb |
1.30 |
echo ".done*" >> TAR_EXCLUDE_TMP |
29 |
tdb |
1.25 |
tar -cf - -X TAR_EXCLUDE_TMP $(SRCFILES) | ( cd $(SRCDIR) && tar -xf - ) |
30 |
|
|
rm -f TAR_EXCLUDE_TMP |
31 |
tdb |
1.26 |
@touch $(SRCCHECK) |
32 |
tdb |
1.25 |
|
33 |
tdb |
1.27 |
.PHONY : javadoc |
34 |
tdb |
1.26 |
javadoc : $(JAVADOCCHECK) |
35 |
tdb |
1.27 |
|
36 |
|
|
.PHONY : mkjavadoc |
37 |
|
|
mkjavadoc : $(IDLCHECK) |
38 |
tdb |
1.25 |
if test ! -d "$(DOCDIR)"; then mkdir -p $(DOCDIR); fi |
39 |
|
|
if test ! -d "$(DOCTMPDIR)"; then mkdir -p $(DOCTMPDIR); fi |
40 |
|
|
cp -R $(SOURCEROOT)/uk $(DOCTMPDIR) |
41 |
|
|
cp -R $(SOURCEROOT)/idl/uk $(DOCTMPDIR) |
42 |
tdb |
1.33 |
$(JAVADOCBIN) -d $(DOCDIR) -sourcepath $(DOCTMPDIR) -classpath $(JCCLASSPATH) -windowtitle $(JDTITLE) -author -version -private -use -header $(JDHEADER) -bottom $(JDBOTTOM) -linkoffline $(JDJAPI) $(JDJAPIC) -linkoffline $(JDPBAPI) $(JDPBAPIC) -linkoffline $(JDUAPI) $(JDUAPIC) $(PKGLIST) |
43 |
tdb |
1.25 |
rm -Rf $(DOCTMPDIR) |
44 |
tdb |
1.26 |
@touch $(JAVADOCCHECK) |
45 |
tdb |
1.1 |
|
46 |
tdb |
1.27 |
.PHONY : changelog |
47 |
tdb |
1.26 |
changelog : $(CHANGELOG) |
48 |
tdb |
1.27 |
|
49 |
|
|
.PHONY : mkchangelog |
50 |
|
|
mkchangelog : |
51 |
|
|
if [ -d $(SOURCEROOT)/CVS ]; then \ |
52 |
|
|
$(CVS2CL) $(CVS2CLFLAGS) > $(CHANGELOG); \ |
53 |
|
|
else \ |
54 |
|
|
echo "Can't generate ChangeLog from non-checked out copy." > $(CHANGELOG); \ |
55 |
|
|
fi |
56 |
tdb |
1.8 |
|
57 |
tdb |
1.25 |
### Dist Making |
58 |
|
|
|
59 |
tdb |
1.27 |
.PHONY : dist |
60 |
|
|
dist : |
61 |
|
|
cd $(BUILD) && $(MAKE) dist dest=$(DISTDEST) |
62 |
|
|
|
63 |
|
|
.PHONY : dist-bin |
64 |
|
|
dist-bin : |
65 |
|
|
cd $(BUILD) && $(MAKE) dist-bin dest=$(DISTDEST) |
66 |
tdb |
1.25 |
|
67 |
|
|
### Code Cleaning |
68 |
tdb |
1.8 |
|
69 |
tdb |
1.27 |
.PHONY : clean |
70 |
tdb |
1.1 |
clean : |
71 |
tdb |
1.3 |
cd idl && $(MAKE) clean |
72 |
tdb |
1.25 |
cd $(BUILD) && $(MAKE) clean ver=$(VERSION) |
73 |
tdb |
1.23 |
cd uk/org/iscream/cms/server && $(MAKE) clean |
74 |
tdb |
1.27 |
rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) |
75 |
|
|
rm -Rf $(DOCTMPDIR) |
76 |
tdb |
1.1 |
|
77 |
tdb |
1.27 |
.PHONY : distclean |
78 |
tdb |
1.8 |
distclean : clean |
79 |
tdb |
1.10 |
cd $(BUILD) && rm -f $(CLPATH) |
80 |
tdb |
1.26 |
rm -Rf $(APICACHE) |
81 |
tdb |
1.8 |
rm -f Config.inc |
82 |
tdb |
1.25 |
|
83 |
|
|
### Database |
84 |
|
|
|
85 |
tdb |
1.27 |
.PHONY : createtable |
86 |
tdb |
1.25 |
createtable : |
87 |
|
|
cd db && $(MAKE) create |
88 |
|
|
|
89 |
tdb |
1.27 |
.PHONY : droptable |
90 |
tdb |
1.25 |
droptable : |
91 |
|
|
cd db && $(MAKE) drop |
92 |
|
|
|
93 |
|
|
### Install |
94 |
|
|
|
95 |
tdb |
1.27 |
.PHONY : install |
96 |
tdb |
1.31 |
install : $(MCOMPILECHECK) $(JAVADOCCHECK) $(CHANGELOG) |
97 |
tdb |
1.8 |
@echo "-------------------------------------------------------" |
98 |
tdb |
1.31 |
@echo "Installing to $(INSTALLPREFIX)" |
99 |
|
|
@echo " copying $(PACKAGE) to $(INSTALLPREFIX)" |
100 |
|
|
@mkdir -p $(INSTALLPREFIX) |
101 |
|
|
@cp $(BUILD)/$(PACKAGE) $(INSTALLPREFIX) |
102 |
|
|
@echo " copying libs to $(INSTALLPREFIX)/lib" |
103 |
|
|
@mkdir -p $(INSTALLPREFIX)/lib |
104 |
|
|
@cp $(LIBDIR)/*.jar $(INSTALLPREFIX)/lib |
105 |
|
|
@echo " copying etc to $(INSTALLPREFIX)/etc" |
106 |
|
|
@mkdir -p $(INSTALLPREFIX)/etc |
107 |
|
|
@cp $(BUILD)/etc/default.properties $(INSTALLPREFIX)/etc |
108 |
|
|
@cp $(BUILD)/etc/*.conf $(INSTALLPREFIX)/etc |
109 |
|
|
@echo " copying scripts to $(INSTALLPREFIX)" |
110 |
|
|
@cp $(BUILD)/run.sh $(INSTALLPREFIX) |
111 |
|
|
@cp $(BUILD)/run.bat $(INSTALLPREFIX) |
112 |
|
|
@echo " copying documention to $(INSTALLPREFIX)/doc" |
113 |
|
|
@cp -R $(BUILD)/doc $(INSTALLPREFIX) |
114 |
tdb |
1.34 |
@echo " copying text information files to $(INSTALLPREFIX)" |
115 |
tdb |
1.31 |
@cp $(BUILD)/COPYING $(CHANGELOG) $(INSTALLPREFIX) |
116 |
|
|
@echo "Completed install to $(INSTALLPREFIX)" |
117 |
tdb |
1.8 |
@echo "-------------------------------------------------------" |
118 |
|
|
|
119 |
tdb |
1.25 |
### Other |
120 |
tdb |
1.11 |
|
121 |
tdb |
1.27 |
.PHONY : run |
122 |
|
|
run : $(MCOMPILECHECK) |
123 |
tdb |
1.25 |
cd $(BUILD) && ./run.sh |
124 |
tdb |
1.13 |
|
125 |
tdb |
1.25 |
### Global Include |
126 |
tdb |
1.5 |
|
127 |
tdb |
1.8 |
include $(MKINC) |