3 |
|
|
4 |
|
include Config.inc |
5 |
|
|
6 |
< |
all : build |
6 |
> |
.PHONY : all |
7 |
> |
all : dist |
8 |
|
|
9 |
< |
genidl : |
9 |
< |
cd idl && $(MAKE) idl |
9 |
> |
### Code Building |
10 |
|
|
11 |
< |
buildidl : genidl |
12 |
< |
cd idl && $(MAKE) build |
11 |
> |
.PHONY : build |
12 |
> |
build : $(IDLCHECK) |
13 |
> |
cd uk/org/iscream/cms/server && $(MAKE) all |
14 |
> |
cd $(BUILD) && $(MAKE) package |
15 |
|
|
16 |
< |
code : genidl |
15 |
< |
cd uk/org/iscream && $(MAKE) all |
16 |
> |
### Source, Doc, & Changelog |
17 |
|
|
18 |
< |
build : buildidl code |
19 |
< |
cd build && $(MAKE) package |
18 |
> |
.PHONY : src |
19 |
> |
src : $(SRCCHECK) |
20 |
|
|
21 |
< |
run : build |
22 |
< |
cd build && ./run.sh |
21 |
> |
.PHONY : mksrc |
22 |
> |
mksrc : |
23 |
> |
if test ! -d "$(SRCDIR)"; then mkdir -p $(SRCDIR); fi |
24 |
> |
echo "CVS" > TAR_EXCLUDE_TMP |
25 |
> |
echo ".#*" >> TAR_EXCLUDE_TMP |
26 |
> |
echo "*.jar" >> TAR_EXCLUDE_TMP |
27 |
> |
echo ".done*" >> 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 |
+ |
.PHONY : javadoc |
33 |
+ |
javadoc : $(JAVADOCCHECK) |
34 |
+ |
|
35 |
+ |
.PHONY : mkjavadoc |
36 |
+ |
mkjavadoc : $(IDLCHECK) |
37 |
+ |
if test ! -d "$(DOCDIR)"; then mkdir -p $(DOCDIR); fi |
38 |
+ |
if test ! -d "$(DOCTMPDIR)"; then mkdir -p $(DOCTMPDIR); fi |
39 |
+ |
cp -R $(SOURCEROOT)/uk $(DOCTMPDIR) |
40 |
+ |
cp -R $(SOURCEROOT)/idl/uk $(DOCTMPDIR) |
41 |
+ |
$(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) |
42 |
+ |
rm -Rf $(DOCTMPDIR) |
43 |
+ |
@touch $(JAVADOCCHECK) |
44 |
+ |
|
45 |
+ |
.PHONY : changelog |
46 |
+ |
changelog : $(CHANGELOG) |
47 |
+ |
|
48 |
+ |
.PHONY : mkchangelog |
49 |
+ |
mkchangelog : |
50 |
+ |
if [ -d $(SOURCEROOT)/CVS ]; then \ |
51 |
+ |
$(CVS2CL) $(CVS2CLFLAGS) > $(CHANGELOG); \ |
52 |
+ |
else \ |
53 |
+ |
echo "Can't generate ChangeLog from non-checked out copy." > $(CHANGELOG); \ |
54 |
+ |
fi |
55 |
+ |
|
56 |
+ |
### Dist Making |
57 |
+ |
|
58 |
+ |
.PHONY : dist |
59 |
+ |
dist : |
60 |
+ |
cd $(BUILD) && $(MAKE) dist dest=$(DISTDEST) |
61 |
+ |
|
62 |
+ |
.PHONY : dist-bin |
63 |
+ |
dist-bin : |
64 |
+ |
cd $(BUILD) && $(MAKE) dist-bin dest=$(DISTDEST) |
65 |
+ |
|
66 |
+ |
### Code Cleaning |
67 |
+ |
|
68 |
+ |
.PHONY : clean |
69 |
|
clean : |
70 |
|
cd idl && $(MAKE) clean |
71 |
< |
cd build && $(MAKE) clean |
72 |
< |
cd uk/org/iscream && $(MAKE) clean |
73 |
< |
rm -Rf $(BUILDCHECK) $(IDLCHECK) |
74 |
< |
rm -Rf $(CVSBUILDTEMP) |
29 |
< |
rm -Rf $(DOCDIR) $(DOCTMPDIR) |
71 |
> |
cd $(BUILD) && $(MAKE) clean ver=$(VERSION) |
72 |
> |
cd uk/org/iscream/cms/server && $(MAKE) clean |
73 |
> |
rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) |
74 |
> |
rm -Rf $(DOCTMPDIR) |
75 |
|
|
76 |
+ |
.PHONY : distclean |
77 |
|
distclean : clean |
78 |
|
cd $(BUILD) && rm -f $(CLPATH) |
79 |
+ |
rm -Rf $(APICACHE) |
80 |
|
rm -f Config.inc |
81 |
|
|
82 |
< |
install : build |
36 |
< |
@echo "-------------------------------------------------------" |
37 |
< |
@echo "Installing to $(INSTALL)" |
38 |
< |
@echo " copying $(PACKAGE) to $(INSTALL)" |
39 |
< |
mkdir -p $(INSTALL) |
40 |
< |
cp $(BUILD)/$(PACKAGE) $(INSTALL) |
41 |
< |
@echo " copying libs to $(INSTALL)/lib" |
42 |
< |
mkdir -p $(INSTALL)/lib |
43 |
< |
cp $(LIBDIR)/*.jar $(INSTALL)/lib |
44 |
< |
@echo " copying etc to $(INSTALL)/etc" |
45 |
< |
mkdir -p $(INSTALL)/etc |
46 |
< |
cp $(BUILD)/etc/default.properties $(INSTALL)/etc |
47 |
< |
cp $(BUILD)/etc/*.conf $(INSTALL)/etc |
48 |
< |
@echo " copying scripts to $(INSTALL)" |
49 |
< |
cp $(BUILD)/run.sh $(INSTALL) |
50 |
< |
cp $(BUILD)/run.bat $(INSTALL) |
51 |
< |
@echo "Completed install to $(INSTALL)" |
52 |
< |
@echo "-------------------------------------------------------" |
82 |
> |
### Database |
83 |
|
|
84 |
< |
cvsbuild : |
55 |
< |
$(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) |
56 |
< |
cd $(CVSBUILDTEMP) && ./configure |
57 |
< |
cd $(CVSBUILDTEMP) && $(MAKE) buildutil |
58 |
< |
cd $(CVSBUILDTEMP) && $(MAKE) build |
59 |
< |
cp $(CVSBUILDTEMP)/build/$(TARGZFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(TARGZEXT) |
60 |
< |
cp $(CVSBUILDTEMP)/build/$(ZIPFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(ZIPEXT) |
61 |
< |
cp $(CVSBUILDTEMP)/build/$(UTILPACKAGE) $(BUILD) |
62 |
< |
|
63 |
< |
javadoc : genidl |
64 |
< |
if test ! -d "$(DOCDIR)"; then mkdir $(DOCDIR); fi |
65 |
< |
if test ! -d "$(DOCTMPDIR)"; then mkdir $(DOCTMPDIR); fi |
66 |
< |
cp -R $(SOURCEROOT)/uk $(SOURCEROOT)/$(DOCTMPDIR) |
67 |
< |
cp -R $(SOURCEROOT)/idl/uk $(SOURCEROOT)/$(DOCTMPDIR) |
68 |
< |
javadoc -d $(SOURCEROOT)/$(DOCDIR) -sourcepath $(SOURCEROOT)/$(DOCTMPDIR) -classpath $(JCCLASSPATH) -windowtitle $(JDTITLE) -author -version -private -header $(JDHEADER) $(PKGLIST) |
69 |
< |
rm -Rf doctemp |
70 |
< |
|
71 |
< |
buildutil : clean |
72 |
< |
cd uk/org/iscream/util && $(MAKE) all |
73 |
< |
cd build && $(MAKE) packageutil |
74 |
< |
|
84 |
> |
.PHONY : createtable |
85 |
|
createtable : |
86 |
|
cd db && $(MAKE) create |
87 |
|
|
88 |
+ |
.PHONY : droptable |
89 |
|
droptable : |
90 |
|
cd db && $(MAKE) drop |
91 |
+ |
|
92 |
+ |
### Install |
93 |
+ |
|
94 |
+ |
.PHONY : install |
95 |
+ |
install : $(MCOMPILECHECK) $(JAVADOCCHECK) $(CHANGELOG) |
96 |
+ |
@echo "-------------------------------------------------------" |
97 |
+ |
@echo "Installing to $(INSTALLPREFIX)" |
98 |
+ |
@echo " copying $(PACKAGE) to $(INSTALLPREFIX)" |
99 |
+ |
@mkdir -p $(INSTALLPREFIX) |
100 |
+ |
@cp $(BUILD)/$(PACKAGE) $(INSTALLPREFIX) |
101 |
+ |
@echo " copying libs to $(INSTALLPREFIX)/lib" |
102 |
+ |
@mkdir -p $(INSTALLPREFIX)/lib |
103 |
+ |
@cp $(LIBDIR)/*.jar $(INSTALLPREFIX)/lib |
104 |
+ |
@echo " copying etc to $(INSTALLPREFIX)/etc" |
105 |
+ |
@mkdir -p $(INSTALLPREFIX)/etc |
106 |
+ |
@cp $(BUILD)/etc/default.properties $(INSTALLPREFIX)/etc |
107 |
+ |
@cp $(BUILD)/etc/*.conf $(INSTALLPREFIX)/etc |
108 |
+ |
@echo " copying scripts to $(INSTALLPREFIX)" |
109 |
+ |
@cp $(BUILD)/run.sh $(INSTALLPREFIX) |
110 |
+ |
@cp $(BUILD)/run.bat $(INSTALLPREFIX) |
111 |
+ |
@echo " copying documention to $(INSTALLPREFIX)/doc" |
112 |
+ |
@cp -R $(BUILD)/doc $(INSTALLPREFIX) |
113 |
+ |
@echo " copying text information files to $(INSTALLPREFIX" |
114 |
+ |
@cp $(BUILD)/COPYING $(CHANGELOG) $(INSTALLPREFIX) |
115 |
+ |
@echo "Completed install to $(INSTALLPREFIX)" |
116 |
+ |
@echo "-------------------------------------------------------" |
117 |
+ |
|
118 |
+ |
### Other |
119 |
+ |
|
120 |
+ |
.PHONY : run |
121 |
+ |
run : $(MCOMPILECHECK) |
122 |
+ |
cd $(BUILD) && ./run.sh |
123 |
+ |
|
124 |
+ |
### Global Include |
125 |
|
|
126 |
|
include $(MKINC) |