[1] | 1 | |
---|
| 2 | cppflags = $(CFLAGS) |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | cpp = g++ -O2 |
---|
| 6 | |
---|
| 7 | ifeq ($(CMTBIN),LinuxDebug) |
---|
| 8 | cpp = g++ -g |
---|
| 9 | endif |
---|
| 10 | |
---|
| 11 | ifeq ($(CMTBIN),Linux-i686Debug) |
---|
| 12 | cpp = g++ -g |
---|
| 13 | endif |
---|
| 14 | |
---|
| 15 | ifeq ($(CMTBIN),LinuxProf) |
---|
| 16 | cpp = g++ -g -pg |
---|
| 17 | endif |
---|
| 18 | |
---|
| 19 | ifeq ($(CMTBIN),Linux-i686Prof) |
---|
| 20 | cpp = g++ -g -pg |
---|
| 21 | endif |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | ifeq ($(CMTBIN),LinuxInsure) |
---|
| 25 | cpp = insure -g |
---|
| 26 | endif |
---|
| 27 | |
---|
| 28 | ifeq ($(CMTBIN),OSF1DEB) |
---|
| 29 | cpp = cxx -g3 -pg |
---|
| 30 | endif |
---|
| 31 | |
---|
| 32 | ifeq ($(CMTBIN),OSF1-alpha) |
---|
| 33 | cpp = cxx |
---|
| 34 | endif |
---|
| 35 | |
---|
| 36 | ifeq ($(CMTBIN),SunOS-sun4u) |
---|
| 37 | cpp = CC |
---|
| 38 | endif |
---|
| 39 | |
---|
| 40 | ifeq ($(CMTBIN),HP-UX) |
---|
| 41 | cpp = aCC |
---|
| 42 | endif |
---|
| 43 | |
---|
| 44 | ifeq ($(CMTBIN),Darwin) |
---|
| 45 | cpp = c++ -O2 |
---|
| 46 | endif |
---|
| 47 | |
---|
| 48 | #ifeq ($(CMTBIN),OSF1) |
---|
| 49 | #remote_launch = rsh |
---|
| 50 | #else |
---|
| 51 | remote_launch = ssh |
---|
| 52 | #endif |
---|
| 53 | |
---|
| 54 | ifeq ($(CMTBIN),CYGWIN_NT-5.1-i686) |
---|
| 55 | cpp = g++ -O2 -Wno-deprecated |
---|
| 56 | endif |
---|
| 57 | |
---|
| 58 | ifeq ($(CMTBIN),LynxOS-PowerPC) |
---|
| 59 | cpp = g++ |
---|
| 60 | endif |
---|
| 61 | |
---|
| 62 | ifeq ($(CMTBIN),AIX-002065204C00) |
---|
| 63 | cpp = g++ -O2 -Wno-deprecated |
---|
| 64 | endif |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | cppcomp = $(cpp) -c -I${inc} $(cppflags) |
---|
| 68 | cpplink = $(cpp) |
---|
| 69 | |
---|
| 70 | src = ../src/ |
---|
| 71 | inc = ../src/ |
---|
| 72 | mgr = ../mgr/ |
---|
| 73 | bin = ../${CMTBIN}/ |
---|
| 74 | binshort = ../${CMTBIN} |
---|
| 75 | |
---|
| 76 | cpp_silent = |
---|
| 77 | cpp_echo = @---> |
---|
| 78 | link_silent = |
---|
| 79 | link_echo = @---> |
---|
| 80 | |
---|
| 81 | SHELL = /bin/sh |
---|
| 82 | |
---|
| 83 | tag = |
---|
| 84 | |
---|
| 85 | application_suffix = .exe |
---|
| 86 | cmtexe = $(CMTROOT)/$(CMTBIN)/cmt.exe |
---|
| 87 | |
---|
| 88 | build_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 | |
---|
| 90 | PACKAGE_ROOT = ${CMTROOT} |
---|
| 91 | |
---|
| 92 | all :: dirs |
---|
| 93 | -@cd $(bin); /bin/rm -f last-rebuild; date >last-rebuild |
---|
| 94 | |
---|
| 95 | dirs :: |
---|
| 96 | @if test ! -d $(bin) ; then mkdir -p $(binshort) ; fi |
---|
| 97 | |
---|
| 98 | #--------------------------------------------------------- |
---|
| 99 | # |
---|
| 100 | # Re-building CMT |
---|
| 101 | # |
---|
| 102 | #--------------------------------------------------------- |
---|
| 103 | |
---|
| 104 | done : |
---|
| 105 | @echo "CMT has been succesfully rebuilt." |
---|
| 106 | |
---|
| 107 | CFLAGS = |
---|
| 108 | clinkflags = |
---|
| 109 | |
---|
| 110 | #--------------------------------------------------------- |
---|
| 111 | all :: cmt post_build done |
---|
| 112 | @cd $(bin); /bin/rm -f cmt; cp cmt.exe cmt |
---|
| 113 | @echo all ok |
---|
| 114 | |
---|
| 115 | cmt_install_action = echo |
---|
| 116 | cmt_uninstall_action = echo |
---|
| 117 | CMTINSTALLAREA = |
---|
| 118 | |
---|
| 119 | include cmt.make |
---|
| 120 | |
---|
| 121 | post_build :: cmt_dependencies.make $(bin)/cmt_dependencies.make |
---|
| 122 | echo post_build done |
---|
| 123 | |
---|
| 124 | cmt_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 | #--------------------------------------------------------- |
---|
| 135 | installcvs : |
---|
| 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 | #--------------------------------------------------------- |
---|
| 160 | doxygen :: |
---|
| 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 | #--------------------------------------------------------- |
---|
| 167 | pdf :: |
---|
| 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 | |
---|
| 173 | python = /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 | #--------------------------------------------------------- |
---|
| 178 | gendoc :: |
---|
| 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 | #--------------------------------------------------------- |
---|
| 186 | docs :: |
---|
| 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 | #--------------------------------------------------------- |
---|
| 216 | bintar :: 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 | #---------------------------------------------------------- |
---|
| 254 | rpm :: |
---|
| 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 | #---------------------------------------------------------- |
---|
| 279 | srctar :: |
---|
| 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 | #---------------------------------------------------------- |
---|
| 286 | Export :: srctar bintar |
---|
| 287 | @echo Export done |
---|
| 288 | |
---|
| 289 | democlean :: |
---|
| 290 | /bin/rm -rf ../demo/* |
---|
| 291 | |
---|
| 292 | demo_location = ../demo |
---|
| 293 | demo_sequence = demo1 |
---|
| 294 | |
---|
| 295 | #---------------------------------------------------------- |
---|
| 296 | # Run the autotest sequence |
---|
| 297 | #---------------------------------------------------------- |
---|
| 298 | demo :: 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 | |
---|
| 324 | tprivate :: 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 | |
---|
| 352 | help :: |
---|
| 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 | |
---|