source: CMT/v1r12p20020606/mgr/Makefile @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 9.0 KB
Line 
1
2cppflags  = $(CFLAGS)
3
4ifeq ($(CMTBIN),OSF1)
5cpp           = cxx -g
6remote_launch = rsh
7
8else
9
10remote_launch = ssh
11
12ifeq ($(CMTBIN),SunOS)
13cpp       = CC
14else
15
16ifeq ($(CMTBIN),HP-UX)
17cpp       = aCC
18else
19
20ifeq ($(CMTBIN),Darwin)
21cpp       = c++
22else
23cpp       = g++
24endif
25
26endif
27
28endif
29
30endif
31
32cppcomp   = $(cpp) -c -I${inc} $(cppflags)
33cpplink   = $(cpp)
34
35src       = ../src/
36inc       = ../src/
37mgr       = ../mgr/
38bin       = ../${CMTBIN}/
39binshort  = ../${CMTBIN}
40
41cpp_silent =
42cpp_echo = @--->
43link_silent =
44link_echo = @--->
45
46SHELL     = /bin/sh
47
48tag       = 
49
50application_suffix = .exe
51cmtexe    = $(CMTROOT)/$(CMTBIN)/cmt.exe
52
53build_dependencies = test -d $(bin) || mkdir -p $(binshort); test -f $(cmtexe) || cp ../mgr/cmt_dependencies.make $(bin) ; echo 
54
55PACKAGE_ROOT = ${CMTROOT}
56
57all :: dirs
58        -@cd $(bin); /bin/rm -f last-rebuild; date >last-rebuild
59
60dirs ::
61        @if test ! -d $(bin) ; then mkdir $(binshort) ; fi
62
63#---------------------------------------------------------
64#
65# A list of some hosts where it is possible to rebuild CMT
66#
67#---------------------------------------------------------
68hosts       = asc dxplus papou1-fe hp2 aleph hp1 hpplus ccahp atlas04 atlas50
69BOOL_hosts  = ccasn
70gmake_hosts = lx1 atlinux lxtest ax7 ccali ccali61 atlas
71make_hosts  = virgo-control1 rio0a vmpc38a vmpc13a
72zsh_hosts   = ccars rsplus
73#---------------------------------------------------------
74
75#---------------------------------------------------------
76#
77# Re-building CMT
78#
79#---------------------------------------------------------
80
81done :
82        @echo "CMT has been succesfully rebuilt."
83        @echo "A mail to Christian Arnault is now being sent to acknowledge"
84        @echo "your use of CMT".
85        @echo "Congratulations !!!"
86        @echo "CMT rebuilt at $(target)(`hostname`) by ${USER} in ${CMTROOT}" | \
87        mail arnault@lal.in2p3.fr
88
89###     mailx -s "CMT rebuilt by ${USER} at `hostname`" arnault@lal.in2p3.fr
90
91LAL : asc lx1 papou1-fe hp2 #virgo-control1
92        @gmake done target=$@
93LHCB : lxtest hpplus dxplus rsplus
94        @gmake done target=$@
95Atlas : atlinux atlas50
96        @gmake done target=$@
97Virgo : ax7 vmpc13a rio0a
98        @gmake done target=$@
99CCIN2P3 : ccars ccahp ccali ccasn
100        @gmake done target=$@
101
102#---------------------------------------------------------
103
104$(hosts) : 
105        $(remote_launch) $@ "sh -c '(cd $(PACKAGE_ROOT)/mgr; . setup.sh; $(MAKE) --no-print-directory $(MAKEFLAGS))'"
106
107$(BOOL_hosts) :
108        $(remote_launch) $@ "zsh -c '(cd $(PACKAGE_ROOT)/mgr; . setup.sh; $(MAKE) --no-print-directory cppflags=-D_BOOL $(MAKEFLAGS))'"
109
110$(gmake_hosts) :
111        $(remote_launch) $@ "sh -c '(cd $(PACKAGE_ROOT)/mgr; . setup.sh; gmake $(MAKEFLAGS))'"
112
113$(zsh_hosts) :
114        $(remote_launch) $@ "zsh -c '(cd $(PACKAGE_ROOT)/mgr; . setup.sh; gmake $(MAKEFLAGS))'"
115
116$(make_hosts) :
117        $(remote_launch) $@ "sh -c '(cd $(PACKAGE_ROOT)/mgr; . setup.sh; make $(MAKEFLAGS))'"
118#---------------------------------------------------------
119
120
121CFLAGS = 
122clinkflags = 
123
124#---------------------------------------------------------
125all :: cmt done
126        @echo all ok
127        @cd $(bin); /bin/rm -f cmt; /bin/ln -fs cmt.exe cmt
128
129include cmt.make
130#---------------------------------------------------------
131
132#---------------------------------------------------------
133# This procedure installs a hook into the commitinfo management file.
134# then the
135#---------------------------------------------------------
136installcvs :
137        cd `echo ${CVSROOT} | cut -f4 -d':'`/CVSROOT;\
138        if [ "`grep cmt_buildcvsinfos loginfo`" = "" ] ; then \
139          echo "======== Configuring loginfo in `pwd`>>>>>> "; \
140          chmod u+w loginfo; \
141          echo '.cmtcvsinfos $${CVSROOT}/CVSROOT/cmt_buildcvsinfos2.sh' >> loginfo; \
142          chmod u-w loginfo; \
143        else \
144          echo "======== loginfo already configured in `pwd` >>>>>> "; \
145        fi; \
146        cp ${CMTROOT}/mgr/cmt_buildcvsinfos2.sh .; \
147        /bin/rm -rf ../.cmtcvsinfos/*
148
149#---------------------------------------------------------
150
151#---------------------------------------------------------
152binaries = Linux OSF1 HP-UX VisualC
153
154doxygen ::
155        $(remote_launch) lx1 "(cd `pwd`; source /lal/Doxygen/Linux/setup.csh; cd ../doc; /bin/rm -Rf Doxygen; doxygen)"
156        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/Doxygen
157
158#       html2ps -nu -o ../doc/CMTDoc.ps ../doc/CMTDoc.html
159#       ps2pdf ../doc/CMTDoc.ps ../doc/CMTDoc.pdf
160
161docs ::
162        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/index.html
163        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/table.html
164        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/intro.html
165        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/projectmanagement.html
166        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/copyright.html
167        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/documents.html
168        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/discussion.html
169        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/repository.html
170        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/download.html
171        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/install.html
172        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.html
173        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.ps
174        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.pdf
175        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.html
176        html2ps -nu -o ../doc/CMTFAQ.ps ../doc/CMTFAQ.html
177        ps2pdf ../doc/CMTFAQ.ps ../doc/CMTFAQ.pdf
178        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.ps
179        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.pdf
180
181bintar :: docs doxygen
182        cd ..; root=`pwd`; \
183        tag=`cmt version`; \
184        version=`basename $${root}`; \
185        tag=$${version} ; \
186        package=`dirname $${root}`; \
187        package=`basename $${package}`; \
188        ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${root}/doc/CMTDownload.html $${tag}; \
189        cd ../../; \
190        for branch in $(binaries) ; \
191        do \
192          echo $${branch} ; \
193          tarfile=$${package}/$${package}$${version}$${branch}.tar; \
194          tar cf $${tarfile} $${package}/$${version}/$${branch} ; \
195          compress $${tarfile}; \
196          ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${tarfile}.Z $${tag} ; \
197        done
198
199
200Export :: bintar
201        ${CMTROOT}/mgr/cmt_tar_export.sh CVS mgr src fragments Visual grafviz java doc
202
203democlean ::
204        /bin/rm -rf ../demo/*
205
206demo :: democlean
207        @echo "------------------------------------------"; \
208        sequence=demo1; \
209        location=../demo; \
210        echo "Starting general auto test sequence"; \
211        echo "  Creating $${location} work area..."; \
212        mkdir -p $${location}; \
213        cd $${location}; \
214        version=`$(cmtexe) version`; \
215        echo "  Creating all $${sequence} packages..."; \
216        ($(cmtexe) run_sequence ${CMTROOT}/src/demo/$${sequence}.cmt | \
217          sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
218              -e "s#$${version}#"'$${version}'"#" \
219              -e "s#$${CMTCONFIG}#"'$${CMTCONFIG}'"#"; \
220          ) >$${sequence}.txt; \
221        echo "  Comparing results with reference output (${CMTROOT}/src/demo/$${sequence}.out) ..."; \
222        diff $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; s=$$?; \
223        if test $${s} = 0; then \
224          echo "    => no differences"; \
225        else \
226          echo "    => errors?"; \
227          cp $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; \
228        fi
229
230#---------------------------------------------------------
231
232
233tprivate :: democlean
234        @echo "------------------------------------------"; \
235        sequence=tprivate; \
236        location=../demo; \
237        echo "Starting auto test sequence on private uses"; \
238        echo "  Creating $${location} work area..."; \
239        mkdir -p $${location}; \
240        cd $${location}; \
241        version=`$(cmtexe) version`; \
242        echo "  Creating all $${sequence} packages..."; \
243        ($(cmtexe) run_sequence ${CMTROOT}/src/demo/$${sequence}.cmt | \
244          sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
245              -e "s#$${version}#"'$${version}'"#" \
246              -e "s#$${CMTCONFIG}#"'$${CMTCONFIG}'"#"; \
247          ) >$${sequence}.txt; \
248        echo "  Comparing results with reference output (${CMTROOT}/src/demo/$${sequence}.out) ..."; \
249        diff $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; s=$$?; \
250        if test $${s} = 0; then \
251          echo "    => no differences"; \
252        else \
253          echo "    => errors?"; \
254          cp $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; \
255        fi
256
257
258
259#---------------------------------------------------------
260
261help ::
262        @echo "------------------------------------------------------------"
263        @echo "  [all]"
264        @echo "      Default target"
265        @echo "  "
266        @echo "  LAL : asc lx1 papou1-fe hp2 #virgo-control1"
267        @echo "  LHCB : lxtest hpplus dxplus rsplus"
268        @echo "  Atlas : atlinux atlas50"
269        @echo "  Virgo : ax7 vmpc13a rio0a"
270        @echo "  CCIN2P3 : ccars ccahp ccali ccasn"
271        @echo "      Site-specific targets for building CMT"
272        @echo ""
273        @echo "  installcvs"
274        @echo "  doxygen"
275        @echo "      Documentation generation"
276        @echo "  docs"
277        @echo "      Documentation production and installation"
278        @echo "  bintar"
279        @echo "      Production and installation of binary tar-balls"
280        @echo "  Export"
281        @echo "      Installation in the web site"
282        @echo ""
283        @echo "  democlean"
284        @echo "      Cleaning the demo area"
285        @echo "  demo"
286        @echo "      Run the demo sequence"
287        @echo "  tprivate"
288        @echo "      Run the demo sequence on private uses"
289        @echo "------------------------------------------------------------"
Note: See TracBrowser for help on using the repository browser.