3 |
|
|
4 |
|
include Config.inc |
5 |
|
|
6 |
+ |
.PHONY : all |
7 |
|
all : dist |
8 |
|
|
9 |
|
### Code Building |
10 |
|
|
11 |
< |
genidl : $(IDLCHECK) |
12 |
< |
$(IDLCHECK) : |
12 |
< |
cd idl && $(MAKE) idl |
13 |
< |
|
14 |
< |
buildidl : genidl |
15 |
< |
cd idl && $(MAKE) build |
16 |
< |
|
17 |
< |
build : buildidl |
11 |
> |
.PHONY : build |
12 |
> |
build : $(IDLCHECK) |
13 |
|
cd uk/org/iscream/cms/server && $(MAKE) all |
14 |
|
cd $(BUILD) && $(MAKE) package |
15 |
|
|
16 |
|
### Source, Doc, & Changelog |
17 |
|
|
18 |
+ |
.PHONY : src |
19 |
|
src : $(SRCCHECK) |
20 |
< |
$(SRCCHECK) : |
20 |
> |
|
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 |
< |
$(JAVADOCCHECK) : $(IDLCHECK) |
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) |
42 |
|
rm -Rf $(DOCTMPDIR) |
43 |
|
@touch $(JAVADOCCHECK) |
44 |
|
|
45 |
+ |
.PHONY : changelog |
46 |
|
changelog : $(CHANGELOG) |
43 |
– |
$(CHANGELOG) : |
44 |
– |
$(CVS2CL) $(CVS2CLFLAGS) > $(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 |
< |
dist : build src javadoc changelog |
59 |
< |
cd $(BUILD) && $(MAKE) dist ver=$(VERSION) dest=$(DISTDEST) |
58 |
> |
.PHONY : dist |
59 |
> |
dist : |
60 |
> |
cd $(BUILD) && $(MAKE) dist dest=$(DISTDEST) |
61 |
|
|
62 |
< |
dist-bin : build changelog |
63 |
< |
cd $(BUILD) && $(MAKE) dist-bin ver=$(VERSION) dest=$(DISTDEST) |
62 |
> |
.PHONY : dist-bin |
63 |
> |
dist-bin : |
64 |
> |
cd $(BUILD) && $(MAKE) dist-bin dest=$(DISTDEST) |
65 |
|
|
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 |
+ |
.PHONY : clean |
69 |
|
clean : |
70 |
|
cd idl && $(MAKE) clean |
71 |
|
cd $(BUILD) && $(MAKE) clean ver=$(VERSION) |
72 |
|
cd uk/org/iscream/cms/server && $(MAKE) clean |
73 |
< |
rm -f $(BUILDCHECK) $(IDLCHECK) $(JAVADOCCHECK) $(SRCCHECK) |
74 |
< |
rm -Rf $(CVSBUILDTEMP) $(DOCTMPDIR) |
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) |
81 |
|
|
82 |
|
### Util Package |
83 |
|
|
84 |
+ |
.PHONY : buildutil |
85 |
|
buildutil : clean |
86 |
|
cd uk/org/iscream/cms/server/util && $(MAKE) all |
87 |
|
cd $(BUILD) && $(MAKE) packageutil |
88 |
|
|
89 |
|
### Database |
90 |
|
|
91 |
+ |
.PHONY : createtable |
92 |
|
createtable : |
93 |
|
cd db && $(MAKE) create |
94 |
|
|
95 |
+ |
.PHONY : droptable |
96 |
|
droptable : |
97 |
|
cd db && $(MAKE) drop |
98 |
|
|
99 |
|
### Install |
100 |
|
|
101 |
< |
install : build |
101 |
> |
.PHONY : install |
102 |
> |
install : $(MCOMPILECHECK) $(JAVADOCCHECK) $(CHANGELOG) |
103 |
|
@echo "-------------------------------------------------------" |
104 |
< |
@echo "Installing to $(INSTALL)" |
105 |
< |
@echo " copying $(PACKAGE) to $(INSTALL)" |
106 |
< |
mkdir -p $(INSTALL) |
107 |
< |
cp $(BUILD)/$(PACKAGE) $(INSTALL) |
108 |
< |
@echo " copying libs to $(INSTALL)/lib" |
109 |
< |
mkdir -p $(INSTALL)/lib |
110 |
< |
cp $(LIBDIR)/*.jar $(INSTALL)/lib |
111 |
< |
@echo " copying etc to $(INSTALL)/etc" |
112 |
< |
mkdir -p $(INSTALL)/etc |
113 |
< |
cp $(BUILD)/etc/default.properties $(INSTALL)/etc |
114 |
< |
cp $(BUILD)/etc/*.conf $(INSTALL)/etc |
115 |
< |
@echo " copying scripts to $(INSTALL)" |
116 |
< |
cp $(BUILD)/run.sh $(INSTALL) |
117 |
< |
cp $(BUILD)/run.bat $(INSTALL) |
118 |
< |
@echo "Completed install to $(INSTALL)" |
104 |
> |
@echo "Installing to $(INSTALLPREFIX)" |
105 |
> |
@echo " copying $(PACKAGE) to $(INSTALLPREFIX)" |
106 |
> |
@mkdir -p $(INSTALLPREFIX) |
107 |
> |
@cp $(BUILD)/$(PACKAGE) $(INSTALLPREFIX) |
108 |
> |
@echo " copying libs to $(INSTALLPREFIX)/lib" |
109 |
> |
@mkdir -p $(INSTALLPREFIX)/lib |
110 |
> |
@cp $(LIBDIR)/*.jar $(INSTALLPREFIX)/lib |
111 |
> |
@echo " copying etc to $(INSTALLPREFIX)/etc" |
112 |
> |
@mkdir -p $(INSTALLPREFIX)/etc |
113 |
> |
@cp $(BUILD)/etc/default.properties $(INSTALLPREFIX)/etc |
114 |
> |
@cp $(BUILD)/etc/*.conf $(INSTALLPREFIX)/etc |
115 |
> |
@echo " copying scripts to $(INSTALLPREFIX)" |
116 |
> |
@cp $(BUILD)/run.sh $(INSTALLPREFIX) |
117 |
> |
@cp $(BUILD)/run.bat $(INSTALLPREFIX) |
118 |
> |
@echo " copying documention to $(INSTALLPREFIX)/doc" |
119 |
> |
@cp -R $(BUILD)/doc $(INSTALLPREFIX) |
120 |
> |
@echo " copying text information files to $(INSTALLPREFIX" |
121 |
> |
@cp $(BUILD)/COPYING $(CHANGELOG) $(INSTALLPREFIX) |
122 |
> |
@echo "Completed install to $(INSTALLPREFIX)" |
123 |
|
@echo "-------------------------------------------------------" |
124 |
|
|
125 |
|
### Other |
126 |
|
|
127 |
< |
run : build |
127 |
> |
.PHONY : run |
128 |
> |
run : $(MCOMPILECHECK) |
129 |
|
cd $(BUILD) && ./run.sh |
130 |
|
|
131 |
|
### Global Include |