source: CMT/v1r18p20060301/mgr/Makefile

Last change on this file was 115, checked in by garonne, 19 years ago

remove python dependency in the gendoc target

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