source: CMT/v1r18p20050501/mgr/Makefile

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

Prepare new release v1r18p20050501

  • Property svn:eol-style set to native
File size: 12.3 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
174#python = python
175python = /afs/cern.ch/sw/lcg/external/Python/2.3.4/rh73_gcc323/bin/python
176#python = /cygdrive/c/Arnault/Python23/python.exe
177
178#---------------------------------------------------------
179# Generates the html form of the doc from the XML form
180#---------------------------------------------------------
181gendoc ::
182        @cd ../doc; $(python) gendoc.py CMTDoc.xml > CMTDoc.html
183        @echo "CMTDoc.html generated from CMTDoc.xml"
184
185
186#---------------------------------------------------------
187# Transfer the docs into the Web site.
188#---------------------------------------------------------
189docs ::
190        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/index.html
191        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/table.html
192        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/intro.html
193        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/projectmanagement.html
194        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/copyright.html
195        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/documents.html
196        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/discussion.html
197        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/repository.html
198        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/download.html
199        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/install.html
200        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.html
201        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.ps
202        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTDoc.pdf
203        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.html
204        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/ReleaseNotes.html
205        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/ChangeLog
206        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/mgr/ChangeLog.php
207        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.ps
208        ${CMTROOT}/mgr/cmt_export.sh CMT/ ${CMTROOT}/doc/CMTFAQ.pdf
209
210#        echo '  <tr><td><a href="CMT-'$${version}'-1.i386.rpm">RPM for redhat 7.2</a></td></tr>' >>doc/CMTDownload.html;
211
212#---------------------------------------------------------
213# Construct the pacman file from the generic form
214#---------------------------------------------------------
215pacman ::
216        version=`cmt version`; \
217        sed -e 's#<version>#'"$${version}"'#g' CMT.pacman >CMT-$${version}.pacman
218
219#---------------------------------------------------------
220# Construct the tar balls for the binary kits for all
221# existing binaries available in ../*.cmt.exe
222# Binary kits are now autonomous (ie they don't require
223# the source kit)
224#---------------------------------------------------------
225bintar :: docs
226        cd ..; root=`pwd`; \
227        tag=`cmt version`; \
228        version=`basename $${root}`; \
229        tag=$${version} ; \
230        package=`dirname $${root}`; \
231        package=`basename $${package}`; \
232        cat doc/CMTDownload1.html >| doc/CMTDownload.html; \
233        echo '  <tr><td><a href="CMT'$${version}'.tar.gz">Source kit</a> </td></tr>' >> doc/CMTDownload.html; \
234        binaries=`/usr/bin/find ./ -name cmt.exe | sed -e 's#[.]/##' -e 's#/.*##'`; \
235        for f in `echo $${binaries}`; do \
236          echo '  <tr><td><a href="CMT'$${version}$${f}'.tar.gz">'$${f}'</a> </td></tr>' >> doc/CMTDownload.html; \
237        done; \
238        cat doc/CMTDownload2.html >> doc/CMTDownload.html; \
239        ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${root}/doc/CMTDownload.html $${tag}; \
240        if test -d rpm; then \
241          ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${root}/rpm/CMT-$${version}-1.i386.rpm $${tag}; \
242        fi; \
243        cd ../../; \
244        for branch in `echo $${binaries}` ; \
245        do \
246          echo $${branch} ; \
247          tarfile=$${package}/$${package}$${version}$${branch}.tar; \
248          tar cf $${tarfile} $${package}/$${version}/mgr $${package}/$${version}/src $${package}/$${version}/$${branch} ; \
249          gzip $${tarfile}; \
250          ${CMTROOT}/mgr/cmt_export.sh $${package}/ $${tarfile}.gz $${tag} ; \
251        done
252
253
254#----------------------------------------------------------
255#
256#  Building an RPM for CMT.
257#
258#   reinstallation is done by:
259#
260#  rpm -Uvh --relocate /CMT=/newdir/CMT CMT-${version}-1.i386.rpm
261#
262#----------------------------------------------------------
263rpm ::
264        version=`$(cmtexe) version`; \
265        tempdir=/tmp/CMT; \
266        rm -rf $${tempdir}; \
267        for f in BUILD RPMS SOURCES SPECS SRPMS ; do \
268          mkdir -p $${tempdir}/$${f}; \
269        done; \
270        (cd ../; tar cf $${tempdir}/SOURCES/CMT$${version}.tar --exclude CVS mgr src source); \
271        gzip $${tempdir}/SOURCES/CMT$${version}.tar; \
272        if test ! -d ../rpm; then mkdir -p ../rpm; fi; \
273        rpmbuild -ba --define "_topdir $${tempdir}" --define "_version $${version}" CMT.spec; \
274        cp $${tempdir}/RPMS/i386/CMT-$${version}-1.i386.rpm ../rpm ; \
275        cp $${tempdir}/SRPMS/CMT-$${version}-1.src.rpm ../rpm ; \
276        rm -r $${tempdir}
277
278#
279#        cp CMT.spec $${tempdir}; \
280#        find ../fragments ../mgr ../src ! -path '*/CVS*' ! -name '*~' ! -type d | \
281#          sed -e 's#[.][.]#%{prefix}/%{version}#' >>$${tempdir}/CMT.spec ; \
282#
283
284
285#----------------------------------------------------------
286# Construct a source kit
287#----------------------------------------------------------
288srctar ::
289        ${CMTROOT}/mgr/cmt_tar_export.sh CVS source mgr src Visual grafviz java doc
290
291
292#----------------------------------------------------------
293# Construct the kits
294#----------------------------------------------------------
295Export :: srctar bintar
296        @echo Export done
297
298democlean ::
299        /bin/rm -rf ../demo/*
300
301demo_location = ../demo
302demo_sequence = demo1
303
304#----------------------------------------------------------
305# Run the autotest sequence
306#----------------------------------------------------------
307demo :: democlean
308        @echo "------------------------------------------"
309        @echo "Starting general auto test sequence"
310        @echo "  Creating $(demo_location) work area..."
311        @mkdir -p $(demo_location)
312        @echo "  Creating all $(demo_sequence) packages..."
313        cd $(demo_location); \
314        version=`$(cmtexe) version`; \
315        ($(cmtexe) run_sequence ${CMTROOT}/src/demo/$(demo_sequence).cmt | \
316          sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
317              -e "s#$${version}#"'$${version}'"#" \
318              -e "s#$${CMTCONFIG}#"'$${CMTCONFIG}'"#"; \
319          ) >$(demo_sequence).txt
320        @echo "  Comparing results with reference output (${CMTROOT}/src/demo/$(demo_sequence).out) ..."
321        @cd $(demo_location); \
322        diff $(demo_sequence).txt ${CMTROOT}/src/demo/$(demo_sequence).out; s=$$?; \
323        if test $${s} = 0; then \
324          echo "    => no differences"; \
325        else \
326          echo "    => errors?"; \
327          cp $(demo_sequence).txt ${CMTROOT}/src/demo/$(demo_sequence).out; \
328        fi
329
330#---------------------------------------------------------
331
332
333tprivate :: democlean
334        @echo "------------------------------------------"; \
335        sequence=tprivate; \
336        location=../demo; \
337        echo "Starting auto test sequence on private uses"; \
338        echo "  Creating $${location} work area..."; \
339        mkdir -p $${location}; \
340        cd $${location}; \
341        version=`$(cmtexe) version`; \
342        echo "  Creating all $${sequence} packages..."; \
343        ($(cmtexe) run_sequence ${CMTROOT}/src/demo/$${sequence}.cmt | \
344          sed -e "s#$${CMTROOT}#"'$${CMTROOT}'"#" \
345              -e "s#$${version}#"'$${version}'"#" \
346              -e "s#$${CMTCONFIG}#"'$${CMTCONFIG}'"#"; \
347          ) >$${sequence}.txt; \
348        echo "  Comparing results with reference output (${CMTROOT}/src/demo/$${sequence}.out) ..."; \
349        diff $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; s=$$?; \
350        if test $${s} = 0; then \
351          echo "    => no differences"; \
352        else \
353          echo "    => errors?"; \
354          cp $${sequence}.txt ${CMTROOT}/src/demo/$${sequence}.out; \
355        fi
356
357
358
359#---------------------------------------------------------
360
361help ::
362        @echo "------------------------------------------------------------"
363        @echo "  [all]      : Default target"
364        @echo "  "
365        @echo "  installcvs : "
366        @echo "  doxygen    : Documentation generation"
367        @echo "  docs       : Documentation production and installation"
368        @echo "  pdf        : Convert html docs into pdf and ps"
369        @echo "  gendoc     : Convert xml doc into html"
370        @echo "  srctar     : Production and installation of source tar-ball"
371        @echo "                (include Linux binary directory)"
372        @echo "  bintar     : Production and installation of binary tar-balls"
373        @echo "  rpm        : Production of the RPM"
374        @echo "  Export     : Installation in the web site"
375        @echo "  democlean  : Cleaning the demo area"
376        @echo "  demo       : Run the demo sequence on private uses"
377        @echo "      (Site-specific targets for building CMT)"
378        @echo "  LAL        : asc lx1 papou1-fe hp2 #virgo-control1"
379        @echo "  LHCB       : lxtest hpplus dxplus rsplus"
380        @echo "  Atlas      : atlinux atlas50"
381        @echo "  Virgo      : ax7 vmpc13a rio0a"
382        @echo "  CCIN2P3    : ccars ccahp ccali ccasn"
383        @echo "------------------------------------------------------------"
384
Note: See TracBrowser for help on using the repository browser.