source: CMT/v1r18p20050401/mgr/Makefile @ 615

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

Finalize the release - CL 263

  • Property svn:eol-style set to native
File size: 12.0 KB
Line 
1
2cppflags  = $(CFLAGS)
3
4
5cpp = g++ -O2
6
7ifeq ($(CMTBIN),LinuxDebug)
8cpp = g++ -g
9endif
10
11ifeq ($(CMTBIN),Linux-i686Debug)
12cpp = g++ -g
13endif
14
15ifeq ($(CMTBIN),LinuxProf)
16cpp = g++ -g -pg
17endif
18
19ifeq ($(CMTBIN),Linux-i686Prof)
20cpp = g++ -g -pg
21endif
22
23
24ifeq ($(CMTBIN),LinuxInsure)
25cpp = insure -g
26endif
27
28ifeq ($(CMTBIN),OSF1DEB)
29cpp           = cxx -g3 -pg
30endif
31
32ifeq ($(CMTBIN),OSF1-alpha)
33cpp           = cxx
34endif
35
36ifeq ($(CMTBIN),SunOS-sun4u)
37cpp       = CC
38endif
39
40ifeq ($(CMTBIN),HP-UX)
41cpp       = aCC
42endif
43
44ifeq ($(CMTBIN),Darwin)
45cpp       = c++ -O2
46endif
47
48#ifeq ($(CMTBIN),OSF1)
49#remote_launch = rsh
50#else
51remote_launch = ssh
52#endif
53
54ifeq ($(CMTBIN),CYGWIN_NT-5.1-i686)
55cpp = g++ -O2 -Wno-deprecated
56cpp = g++ -g -Wno-deprecated
57endif
58
59ifeq ($(CMTBIN),LynxOS-PowerPC)
60cpp = g++
61endif
62
63ifeq ($(CMTBIN),AIX-002065204C00)
64cpp = g++ -O2 -Wno-deprecated
65endif
66
67
68cppcomp   = $(cpp) -c -I${inc} $(cppflags)
69cpplink   = $(cpp)
70
71src       = ../src/
72inc       = ../src/
73mgr       = ../mgr/
74bin       = ../${CMTBIN}/
75binshort  = ../${CMTBIN}
76
77cpp_silent =
78cpp_echo = @--->
79link_silent =
80link_echo = @--->
81
82SHELL     = /bin/sh
83
84tag       = 
85
86application_suffix = .exe
87cmtexe    = $(CMTROOT)/$(CMTBIN)/cmt.exe
88
89build_dependencies = test -d $(bin) || mkdir -p $(binshort); test -f $(cmtexe) || cp ../mgr/cmt_dependencies.make $(bin); test -f $(bin)CMT_setup.make || touch $(bin)CMT_setup.make ; echo 
90
91PACKAGE_ROOT = ${CMTROOT}
92
93all :: dirs
94        -@cd $(bin); /bin/rm -f last-rebuild; date >last-rebuild
95
96dirs ::
97        @if test ! -d $(bin) ; then mkdir -p $(binshort) ; fi
98
99#---------------------------------------------------------
100#
101# Re-building CMT
102#
103#---------------------------------------------------------
104
105done :
106        @echo "CMT has been succesfully rebuilt."
107
108CFLAGS = 
109clinkflags = 
110
111#---------------------------------------------------------
112all :: cmt post_build done
113        @cd $(bin); /bin/rm -f cmt; cp cmt.exe cmt
114        @echo all ok
115
116cmt_install_action = echo
117cmt_uninstall_action = echo
118CMTINSTALLAREA = 
119
120include cmt.make
121
122post_build :: cmt_dependencies.make $(bin)/cmt_dependencies.make
123        echo post_build done
124
125cmt_dependencies.make $(bin)/cmt_dependencies.make : $(cmtexe)
126        $(cmtexe) build dependencies cmt -all_sources -no_stamps
127        cp $(bin)/cmt_dependencies.make ../mgr
128        $(cmtexe) build dependencies cmt -all_sources
129
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#---------------------------------------------------------
152###binaries = Linux OSF1 HP-UX VisualC
153##binaries = $(shell '/usr/bin/find ../ -name cmt.exe')
154
155
156#---------------------------------------------------------
157# Regenerates the Doxygen documentation of CMT
158# A priori as it is written it works at LAL only
159# The result is also transported to the Web site
160#---------------------------------------------------------
161doxygen ::
162        . /lal/Doxygen/Linux/setup.sh; cd ../doc; /bin/rm -Rf Doxygen; doxygen
163        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/Doxygen
164
165#---------------------------------------------------------
166# Converts CMTDoc.html CMTFAQ.html into pdf and ps
167#---------------------------------------------------------
168pdf ::
169        html2ps -nu -o ../doc/CMTDoc.ps ../doc/CMTDoc.html
170        ps2pdf ../doc/CMTDoc.ps ../doc/CMTDoc.pdf
171        html2ps -nu -o ../doc/CMTFAQ.ps ../doc/CMTFAQ.html
172        ps2pdf ../doc/CMTFAQ.ps ../doc/CMTFAQ.pdf
173
174python = /afs/cern.ch/sw/lcg/external/Python/2.2.2/rh73_gcc32/bin/python2.2
175python = /cygdrive/c/Arnault/Python23/python.exe
176
177#---------------------------------------------------------
178# Generates the html form of the doc from the XML form
179#---------------------------------------------------------
180gendoc ::
181        @cd ../doc; $(python) gendoc.py CMTDoc.xml > CMTDoc.html
182        @echo "CMTDoc.html generated from CMTDoc.xml"
183
184
185#---------------------------------------------------------
186# Transfer the docs into the Web site.
187#---------------------------------------------------------
188docs ::
189        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/index.html
190        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/table.html
191        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/intro.html
192        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/projectmanagement.html
193        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/copyright.html
194        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/documents.html
195        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/discussion.html
196        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/repository.html
197        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/download.html
198        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/install.html
199        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.html
200        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.ps
201        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.pdf
202        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.html
203        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/ReleaseNotes.html
204        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/ChangeLog
205        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/mgr/ChangeLog.php
206        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.ps
207        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.pdf
208
209#        echo '  <tr><td><a href="CMT-'$${version}'-1.i386.rpm">RPM for redhat 7.2</a></td></tr>' >>doc/CMTDownload.html;
210
211
212#---------------------------------------------------------
213# Construct the tar balls for the binary kits for all
214# existing binaries available in ../*.cmt.exe
215# Binary kits are now autonomous (ie they don't require
216# the source kit)
217#---------------------------------------------------------
218bintar :: docs
219        cd ..; root=`pwd`; \
220        tag=`cmt version`; \
221        version=`basename $${root}`; \
222        tag=$${version} ; \
223        package=`dirname $${root}`; \
224        package=`basename $${package}`; \
225        cat doc/CMTDownload1.html >| doc/CMTDownload.html; \
226        echo '  <tr><td><a href="CMT'$${version}'.tar.gz">Source kit</a> </td></tr>' >> doc/CMTDownload.html; \
227        binaries=`/usr/bin/find ./ -name cmt.exe | sed -e 's#[.]/##' -e 's#/.*##'`; \
228        for f in `echo $${binaries}`; do \
229          echo '  <tr><td><a href="CMT'$${version}$${f}'.tar.gz">'$${f}'</a> </td></tr>' >> doc/CMTDownload.html; \
230        done; \
231        cat doc/CMTDownload2.html >> doc/CMTDownload.html; \
232        ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${root}/doc/CMTDownload.html $${tag}; \
233        if test -d rpm; then \
234          ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${root}/rpm/CMT-$${version}-1.i386.rpm $${tag}; \
235        fi; \
236        cd ../../; \
237        for branch in `echo $${binaries}` ; \
238        do \
239          echo $${branch} ; \
240          tarfile=$${package}/$${package}$${version}$${branch}.tar; \
241          tar cf $${tarfile} $${package}/$${version}/mgr $${package}/$${version}/src $${package}/$${version}/$${branch} ; \
242          gzip $${tarfile}; \
243          ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${tarfile}.gz $${tag} ; \
244        done
245
246
247#----------------------------------------------------------
248#
249#  Building an RPM for CMT.
250#
251#   reinstallation is done by:
252#
253#  rpm -Uvh --relocate /CMT=/newdir/CMT CMT-${version}-1.i386.rpm
254#
255#----------------------------------------------------------
256rpm ::
257        version=`$(cmtexe) version`; \
258        tempdir=/tmp/CMT; \
259        rm -rf $${tempdir}; \
260        for f in BUILD RPMS SOURCES SPECS SRPMS ; do \
261          mkdir -p $${tempdir}/$${f}; \
262        done; \
263        (cd ../; tar cf $${tempdir}/SOURCES/CMT$${version}.tar --exclude CVS mgr src source); \
264        gzip $${tempdir}/SOURCES/CMT$${version}.tar; \
265        if test ! -d ../rpm; then mkdir -p ../rpm; fi; \
266        rpmbuild -ba --define "_topdir $${tempdir}" --define "_version $${version}" CMT.spec; \
267        cp $${tempdir}/RPMS/i386/CMT-$${version}-1.i386.rpm ../rpm ; \
268        cp $${tempdir}/SRPMS/CMT-$${version}-1.src.rpm ../rpm ; \
269        rm -r $${tempdir}
270
271#
272#        cp CMT.spec $${tempdir}; \
273#        find ../fragments ../mgr ../src ! -path '*/CVS*' ! -name '*~' ! -type d | \
274#          sed -e 's#[.][.]#%{prefix}/%{version}#' >>$${tempdir}/CMT.spec ; \
275#
276
277
278#----------------------------------------------------------
279# Construct a source kit
280#----------------------------------------------------------
281srctar ::
282        ${CMTROOT}/mgr/cmt_tar_export.sh CVS source mgr src Visual grafviz java doc
283
284
285#----------------------------------------------------------
286# Construct the kits
287#----------------------------------------------------------
288Export :: srctar bintar
289        @echo Export done
290
291democlean ::
292        /bin/rm -rf ../demo/*
293
294demo_location = ../demo
295demo_sequence = demo1
296
297#----------------------------------------------------------
298# Run the autotest sequence
299#----------------------------------------------------------
300demo :: democlean
301        @echo "------------------------------------------"
302        @echo "Starting general auto test sequence"
303        @echo "  Creating $(demo_location) work area..."
304        @mkdir -p $(demo_location)
305        @echo "  Creating all $(demo_sequence) packages..."
306        cd $(demo_location); \
307        version=`$(cmtexe) version`; \
308        ($(cmtexe) run_sequence ${CMTROOT}/src/demo/$(demo_sequence).cmt | \
309          sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
310              -e "s#$${version}#"'$${version}'"#" \
311              -e "s#$${CMTCONFIG}#"'$${CMTCONFIG}'"#"; \
312          ) >$(demo_sequence).txt
313        @echo "  Comparing results with reference output (${CMTROOT}/src/demo/$(demo_sequence).out) ..."
314        @cd $(demo_location); \
315        diff $(demo_sequence).txt ${CMTROOT}/src/demo/$(demo_sequence).out; s=$$?; \
316        if test $${s} = 0; then \
317          echo "    => no differences"; \
318        else \
319          echo "    => errors?"; \
320          cp $(demo_sequence).txt ${CMTROOT}/src/demo/$(demo_sequence).out; \
321        fi
322
323#---------------------------------------------------------
324
325
326tprivate :: democlean
327        @echo "------------------------------------------"; \
328        sequence=tprivate; \
329        location=../demo; \
330        echo "Starting auto test sequence on private uses"; \
331        echo "  Creating $${location} work area..."; \
332        mkdir -p $${location}; \
333        cd $${location}; \
334        version=`$(cmtexe) version`; \
335        echo "  Creating all $${sequence} packages..."; \
336        ($(cmtexe) run_sequence ${CMTROOT}/src/demo/$${sequence}.cmt | \
337          sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
338              -e "s#$${version}#"'$${version}'"#" \
339              -e "s#$${CMTCONFIG}#"'$${CMTCONFIG}'"#"; \
340          ) >$${sequence}.txt; \
341        echo "  Comparing results with reference output (${CMTROOT}/src/demo/$${sequence}.out) ..."; \
342        diff $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; s=$$?; \
343        if test $${s} = 0; then \
344          echo "    => no differences"; \
345        else \
346          echo "    => errors?"; \
347          cp $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; \
348        fi
349
350
351
352#---------------------------------------------------------
353
354help ::
355        @echo "------------------------------------------------------------"
356        @echo "  [all]      : Default target"
357        @echo "  "
358        @echo "  installcvs : "
359        @echo "  doxygen    : Documentation generation"
360        @echo "  docs       : Documentation production and installation"
361        @echo "  pdf        : Convert html docs into pdf and ps"
362        @echo "  gendoc     : Convert xml doc into html"
363        @echo "  srctar     : Production and installation of source tar-ball"
364        @echo "                (include Linux binary directory)"
365        @echo "  bintar     : Production and installation of binary tar-balls"
366        @echo "  rpm        : Production of the RPM"
367        @echo "  Export     : Installation in the web site"
368        @echo "  democlean  : Cleaning the demo area"
369        @echo "  demo       : Run the demo sequence on private uses"
370        @echo "      (Site-specific targets for building CMT)"
371        @echo "  LAL        : asc lx1 papou1-fe hp2 #virgo-control1"
372        @echo "  LHCB       : lxtest hpplus dxplus rsplus"
373        @echo "  Atlas      : atlinux atlas50"
374        @echo "  Virgo      : ax7 vmpc13a rio0a"
375        @echo "  CCIN2P3    : ccars ccahp ccali ccasn"
376        @echo "------------------------------------------------------------"
377
Note: See TracBrowser for help on using the repository browser.