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