source: CMT/v1r18p20041201/mgr/Makefile @ 1

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

Import all tags

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