# PaCkAgE DaTaStReAm automake 1 4740 # end of header 070701000793f1000081a40000000000000000000000014f7aa49c0000010e000000b600010002ffffffffffffffff0000001100000000automake/pkginfoPKG=automake NAME=GNU automake 1.11.4 i86pc Solaris 11 VERSION=1.11.4 PSTAMP=3rd April 2012 VENDOR=GNU EMAIL=http://www.gnu.org/software/automake/ DESC=GNU automake makefile generator ARCH=i386 CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 070701000793f0000081a40000000000000000000000014f7aa49c0000315e000000b600010002ffffffffffffffff0000001000000000automake/pkgmap: 1 4740 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 l none /usr/local/bin/aclocal=/usr/local/bin/aclocal-1.11 1 f none /usr/local/bin/aclocal-1.11 0755 root root 31140 28573 1333437483 1 f none /usr/local/bin/automake 0755 root root 259991 50086 1333437483 1 l none /usr/local/bin/automake-1.11=/usr/local/bin/automake 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/aclocal-1.11 0755 root root 1 f none /usr/local/share/aclocal-1.11/amversion.m4 0644 root root 1662 63236 1333437483 1 f none /usr/local/share/aclocal-1.11/ar-lib.m4 0644 root root 2036 28266 1333437483 1 f none /usr/local/share/aclocal-1.11/as.m4 0644 root root 799 63460 1333437483 1 f none /usr/local/share/aclocal-1.11/auxdir.m4 0644 root root 2455 13598 1333437483 1 f none /usr/local/share/aclocal-1.11/ccstdc.m4 0644 root root 958 9049 1333437483 1 f none /usr/local/share/aclocal-1.11/cond-if.m4 0644 root root 1044 13643 1333437483 1 f none /usr/local/share/aclocal-1.11/cond.m4 0644 root root 1080 14231 1333437483 1 f none /usr/local/share/aclocal-1.11/depend.m4 0644 root root 7197 54255 1333437483 1 f none /usr/local/share/aclocal-1.11/depout.m4 0644 root root 3171 49526 1333437483 1 f none /usr/local/share/aclocal-1.11/dmalloc.m4 0644 root root 972 6015 1333437483 1 f none /usr/local/share/aclocal-1.11/gcj.m4 0644 root root 680 52422 1333437483 1 f none /usr/local/share/aclocal-1.11/header.m4 0644 root root 494 36690 1333437483 1 f none /usr/local/share/aclocal-1.11/init.m4 0644 root root 5396 38893 1333437483 1 f none /usr/local/share/aclocal-1.11/install-sh.m4 0644 root root 708 53475 1333437483 1 f none /usr/local/share/aclocal-1.11/lead-dot.m4 0644 root root 655 52793 1333437483 1 f none /usr/local/share/aclocal-1.11/lex.m4 0644 root root 732 57640 1333437483 1 f none /usr/local/share/aclocal-1.11/lispdir.m4 0644 root root 2244 45077 1333437483 1 f none /usr/local/share/aclocal-1.11/maintainer.m4 0644 root root 1750 11881 1333437483 1 f none /usr/local/share/aclocal-1.11/make.m4 0644 root root 1367 45818 1333437483 1 f none /usr/local/share/aclocal-1.11/minuso.m4 0644 root root 1328 39103 1333437483 1 f none /usr/local/share/aclocal-1.11/missing.m4 0644 root root 1207 28627 1333437483 1 f none /usr/local/share/aclocal-1.11/mkdirp.m4 0644 root root 1061 18589 1333437483 1 f none /usr/local/share/aclocal-1.11/multi.m4 0644 root root 2264 54990 1333437483 1 f none /usr/local/share/aclocal-1.11/obsol-gt.m4 0644 root root 421 34336 1333437483 1 f none /usr/local/share/aclocal-1.11/obsol-lt.m4 0644 root root 423 34439 1333437483 1 f none /usr/local/share/aclocal-1.11/obsolete.m4 0644 root root 1609 59707 1333437483 1 f none /usr/local/share/aclocal-1.11/options.m4 0644 root root 1127 18471 1333437483 1 f none /usr/local/share/aclocal-1.11/protos.m4 0644 root root 969 6786 1333437483 1 f none /usr/local/share/aclocal-1.11/python.m4 0644 root root 8195 13947 1333437483 1 f none /usr/local/share/aclocal-1.11/regex.m4 0644 root root 2161 41211 1333437483 1 f none /usr/local/share/aclocal-1.11/runlog.m4 0644 root root 743 55280 1333437483 1 f none /usr/local/share/aclocal-1.11/sanity.m4 0644 root root 2060 37346 1333437483 1 f none /usr/local/share/aclocal-1.11/silent.m4 0644 root root 1871 17635 1333437483 1 f none /usr/local/share/aclocal-1.11/strip.m4 0644 root root 1417 52560 1333437483 1 f none /usr/local/share/aclocal-1.11/substnot.m4 0644 root root 694 51125 1333437483 1 f none /usr/local/share/aclocal-1.11/tar.m4 0644 root root 3205 59868 1333437483 1 f none /usr/local/share/aclocal-1.11/upc.m4 0644 root root 849 4295 1333437483 1 f none /usr/local/share/aclocal-1.11/vala.m4 0644 root root 1081 18833 1333437483 1 d none /usr/local/share/automake-1.11 0755 root root 1 d none /usr/local/share/automake-1.11/Automake 0755 root root 1 f none /usr/local/share/automake-1.11/Automake/ChannelDefs.pm 0644 root root 10387 55009 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Channels.pm 0644 root root 20693 10983 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Condition.pm 0644 root root 15623 16645 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Config.pm 0644 root root 1772 15224 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Configure_ac.pm 0644 root root 2920 40304 1333437483 1 f none /usr/local/share/automake-1.11/Automake/DisjConditions.pm 0644 root root 14806 25099 1333437483 1 f none /usr/local/share/automake-1.11/Automake/FileUtils.pm 0644 root root 10119 5328 1333437483 1 f none /usr/local/share/automake-1.11/Automake/General.pm 0644 root root 2195 46975 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Getopt.pm 0644 root root 2774 29712 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Item.pm 0644 root root 4604 46525 1333437483 1 f none /usr/local/share/automake-1.11/Automake/ItemDef.pm 0644 root root 2448 7930 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Location.pm 0644 root root 4884 4695 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Options.pm 0644 root root 9932 20412 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Rule.pm 0644 root root 23256 31102 1333437483 1 f none /usr/local/share/automake-1.11/Automake/RuleDef.pm 0644 root root 2278 56945 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Struct.pm 0644 root root 19605 59581 1333437483 1 f none /usr/local/share/automake-1.11/Automake/VarDef.pm 0644 root root 9009 8258 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Variable.pm 0644 root root 46321 12844 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Version.pm 0644 root root 4354 25273 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Wrap.pm 0644 root root 4199 11783 1333437483 1 f none /usr/local/share/automake-1.11/Automake/XFile.pm 0644 root root 7292 27969 1333437483 1 f none /usr/local/share/automake-1.11/COPYING 0644 root root 35147 30328 1333437483 1 f none /usr/local/share/automake-1.11/INSTALL 0644 root root 15744 10989 1333437483 1 f none /usr/local/share/automake-1.11/acinstall 0755 root root 1553 64484 1333437483 1 d none /usr/local/share/automake-1.11/am 0755 root root 1 f none /usr/local/share/automake-1.11/am/ansi2knr.am 0644 root root 2338 51631 1333437483 1 f none /usr/local/share/automake-1.11/am/check-html.am 0644 root root 2377 58024 1333437483 1 f none /usr/local/share/automake-1.11/am/check.am 0644 root root 14786 56170 1333437483 1 f none /usr/local/share/automake-1.11/am/check2.am 0644 root root 1273 39665 1333437483 1 f none /usr/local/share/automake-1.11/am/clean-hdr.am 0644 root root 846 4965 1333437483 1 f none /usr/local/share/automake-1.11/am/clean.am 0644 root root 2377 5088 1333437483 1 f none /usr/local/share/automake-1.11/am/compile.am 0644 root root 1050 21341 1333437483 1 f none /usr/local/share/automake-1.11/am/configure.am 0644 root root 6632 5589 1333437483 1 f none /usr/local/share/automake-1.11/am/data.am 0644 root root 3350 51293 1333437483 1 f none /usr/local/share/automake-1.11/am/dejagnu.am 0644 root root 4449 29011 1333437483 1 f none /usr/local/share/automake-1.11/am/depend.am 0644 root root 1085 24821 1333437483 1 f none /usr/local/share/automake-1.11/am/depend2.am 0644 root root 7495 36140 1333437483 1 f none /usr/local/share/automake-1.11/am/distdir.am 0644 root root 22424 17044 1333437483 1 f none /usr/local/share/automake-1.11/am/footer.am 0644 root root 894 9583 1333437483 1 f none /usr/local/share/automake-1.11/am/header-vars.am 0644 root root 3200 60116 1333437483 1 f none /usr/local/share/automake-1.11/am/header.am 0644 root root 817 2470 1333437483 1 f none /usr/local/share/automake-1.11/am/inst-vars.am 0644 root root 3480 24746 1333437483 1 f none /usr/local/share/automake-1.11/am/install.am 0644 root root 4041 1731 1333437483 1 f none /usr/local/share/automake-1.11/am/java.am 0644 root root 2860 10146 1333437483 1 f none /usr/local/share/automake-1.11/am/lang-compile.am 0644 root root 1198 28382 1333437483 1 f none /usr/local/share/automake-1.11/am/lex.am 0644 root root 1352 40386 1333437483 1 f none /usr/local/share/automake-1.11/am/library.am 0644 root root 1015 14197 1333437483 1 f none /usr/local/share/automake-1.11/am/libs.am 0644 root root 3828 23781 1333437483 1 f none /usr/local/share/automake-1.11/am/libtool.am 0644 root root 1083 25396 1333437483 1 f none /usr/local/share/automake-1.11/am/lisp.am 0644 root root 5166 65123 1333437483 1 f none /usr/local/share/automake-1.11/am/ltlib.am 0644 root root 4912 31032 1333437483 1 f none /usr/local/share/automake-1.11/am/ltlibrary.am 0644 root root 978 11844 1333437483 1 f none /usr/local/share/automake-1.11/am/mans-vars.am 0644 root root 876 7536 1333437483 1 f none /usr/local/share/automake-1.11/am/mans.am 0644 root root 6493 37864 1333437483 1 f none /usr/local/share/automake-1.11/am/multilib.am 0644 root root 2153 49368 1333437483 1 f none /usr/local/share/automake-1.11/am/program.am 0644 root root 1282 37943 1333437483 1 f none /usr/local/share/automake-1.11/am/progs.am 0644 root root 6302 12424 1333437483 1 f none /usr/local/share/automake-1.11/am/python.am 0644 root root 4533 11044 1333437483 1 f none /usr/local/share/automake-1.11/am/remake-hdr.am 0644 root root 3379 17431 1333437483 1 f none /usr/local/share/automake-1.11/am/scripts.am 0644 root root 4667 17839 1333437483 1 f none /usr/local/share/automake-1.11/am/subdirs.am 0644 root root 4154 6164 1333437483 1 f none /usr/local/share/automake-1.11/am/tags.am 0644 root root 4774 28143 1333437483 1 f none /usr/local/share/automake-1.11/am/texi-vers.am 0644 root root 2465 64949 1333437483 1 f none /usr/local/share/automake-1.11/am/texibuild.am 0644 root root 5462 25881 1333437483 1 f none /usr/local/share/automake-1.11/am/texinfos.am 0644 root root 14082 29790 1333437483 1 f none /usr/local/share/automake-1.11/am/vala.am 0644 root root 770 64795 1333437483 1 f none /usr/local/share/automake-1.11/am/yacc.am 0644 root root 2248 50813 1333437483 1 f none /usr/local/share/automake-1.11/ansi2knr.1 0644 root root 1529 6388 1333437483 1 f none /usr/local/share/automake-1.11/ansi2knr.c 0644 root root 20269 51869 1333437483 1 f none /usr/local/share/automake-1.11/ar-lib 0755 root root 5827 50840 1333437483 1 f none /usr/local/share/automake-1.11/compile 0755 root root 7274 31703 1333437483 1 f none /usr/local/share/automake-1.11/config-ml.in 0644 root root 25398 19198 1333437483 1 f none /usr/local/share/automake-1.11/config.guess 0755 root root 44826 53839 1333437483 1 f none /usr/local/share/automake-1.11/config.sub 0755 root root 35454 4232 1333437483 1 f none /usr/local/share/automake-1.11/depcomp 0755 root root 20899 54643 1333437483 1 f none /usr/local/share/automake-1.11/elisp-comp 0755 root root 2807 34263 1333437483 1 f none /usr/local/share/automake-1.11/install-sh 0755 root root 13998 27177 1333437483 1 f none /usr/local/share/automake-1.11/mdate-sh 0755 root root 6095 36006 1333437483 1 f none /usr/local/share/automake-1.11/missing 0755 root root 10346 16897 1333437483 1 f none /usr/local/share/automake-1.11/mkinstalldirs 0755 root root 3538 65479 1333437483 1 f none /usr/local/share/automake-1.11/py-compile 0755 root root 4352 21038 1333437483 1 f none /usr/local/share/automake-1.11/symlink-tree 0755 root root 2265 55289 1333437483 1 f none /usr/local/share/automake-1.11/texinfo.tex 0644 root root 320197 45256 1333437483 1 f none /usr/local/share/automake-1.11/ylwrap 0755 root root 6383 35975 1333437483 1 d none /usr/local/share/doc 0755 root root 1 d none /usr/local/share/doc/automake 0755 root root 1 f none /usr/local/share/doc/automake/amhello-1.0.tar.gz 0644 root root 74324 63970 1333437483 1 d none /usr/local/share/info 0755 root root 1 f none /usr/local/share/info/automake.info 0644 root root 7256 10379 1333437483 1 f none /usr/local/share/info/automake.info-1 0644 root root 300105 38625 1333437483 1 f none /usr/local/share/info/automake.info-2 0644 root root 249720 22439 1333437483 1 f none /usr/local/share/info/automake.info-3 0644 root root 65436 41120 1333437483 1 f none /usr/local/share/info/dir 0644 root root 7328 21533 1333437483 1 d none /usr/local/share/man 0755 root root 1 d none /usr/local/share/man/man1 0755 root root 1 f none /usr/local/share/man/man1/aclocal-1.11.1 0644 root root 2411 9479 1333437483 1 f none /usr/local/share/man/man1/aclocal.1 0644 root root 24 1778 1333437483 1 f none /usr/local/share/man/man1/automake-1.11.1 0644 root root 3652 41417 1333437483 1 f none /usr/local/share/man/man1/automake.1 0644 root root 25 1914 1333437483 1 i checkinstall 790 2505 1333437733 1 i pkginfo 270 20833 1333437596 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!070701000793f1000081a40000000000000000000000014f7aa49c0000010e000000b600010002ffffffffffffffff0000000800000000pkginfoPKG=automake NAME=GNU automake 1.11.4 i86pc Solaris 11 VERSION=1.11.4 PSTAMP=3rd April 2012 VENDOR=GNU EMAIL=http://www.gnu.org/software/automake/ DESC=GNU automake makefile generator ARCH=i386 CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 070701000793f0000081a40000000000000000000000014f7aa49c0000315e000000b600010002ffffffffffffffff0000000700000000pkgmap: 1 4740 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 l none /usr/local/bin/aclocal=/usr/local/bin/aclocal-1.11 1 f none /usr/local/bin/aclocal-1.11 0755 root root 31140 28573 1333437483 1 f none /usr/local/bin/automake 0755 root root 259991 50086 1333437483 1 l none /usr/local/bin/automake-1.11=/usr/local/bin/automake 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/aclocal-1.11 0755 root root 1 f none /usr/local/share/aclocal-1.11/amversion.m4 0644 root root 1662 63236 1333437483 1 f none /usr/local/share/aclocal-1.11/ar-lib.m4 0644 root root 2036 28266 1333437483 1 f none /usr/local/share/aclocal-1.11/as.m4 0644 root root 799 63460 1333437483 1 f none /usr/local/share/aclocal-1.11/auxdir.m4 0644 root root 2455 13598 1333437483 1 f none /usr/local/share/aclocal-1.11/ccstdc.m4 0644 root root 958 9049 1333437483 1 f none /usr/local/share/aclocal-1.11/cond-if.m4 0644 root root 1044 13643 1333437483 1 f none /usr/local/share/aclocal-1.11/cond.m4 0644 root root 1080 14231 1333437483 1 f none /usr/local/share/aclocal-1.11/depend.m4 0644 root root 7197 54255 1333437483 1 f none /usr/local/share/aclocal-1.11/depout.m4 0644 root root 3171 49526 1333437483 1 f none /usr/local/share/aclocal-1.11/dmalloc.m4 0644 root root 972 6015 1333437483 1 f none /usr/local/share/aclocal-1.11/gcj.m4 0644 root root 680 52422 1333437483 1 f none /usr/local/share/aclocal-1.11/header.m4 0644 root root 494 36690 1333437483 1 f none /usr/local/share/aclocal-1.11/init.m4 0644 root root 5396 38893 1333437483 1 f none /usr/local/share/aclocal-1.11/install-sh.m4 0644 root root 708 53475 1333437483 1 f none /usr/local/share/aclocal-1.11/lead-dot.m4 0644 root root 655 52793 1333437483 1 f none /usr/local/share/aclocal-1.11/lex.m4 0644 root root 732 57640 1333437483 1 f none /usr/local/share/aclocal-1.11/lispdir.m4 0644 root root 2244 45077 1333437483 1 f none /usr/local/share/aclocal-1.11/maintainer.m4 0644 root root 1750 11881 1333437483 1 f none /usr/local/share/aclocal-1.11/make.m4 0644 root root 1367 45818 1333437483 1 f none /usr/local/share/aclocal-1.11/minuso.m4 0644 root root 1328 39103 1333437483 1 f none /usr/local/share/aclocal-1.11/missing.m4 0644 root root 1207 28627 1333437483 1 f none /usr/local/share/aclocal-1.11/mkdirp.m4 0644 root root 1061 18589 1333437483 1 f none /usr/local/share/aclocal-1.11/multi.m4 0644 root root 2264 54990 1333437483 1 f none /usr/local/share/aclocal-1.11/obsol-gt.m4 0644 root root 421 34336 1333437483 1 f none /usr/local/share/aclocal-1.11/obsol-lt.m4 0644 root root 423 34439 1333437483 1 f none /usr/local/share/aclocal-1.11/obsolete.m4 0644 root root 1609 59707 1333437483 1 f none /usr/local/share/aclocal-1.11/options.m4 0644 root root 1127 18471 1333437483 1 f none /usr/local/share/aclocal-1.11/protos.m4 0644 root root 969 6786 1333437483 1 f none /usr/local/share/aclocal-1.11/python.m4 0644 root root 8195 13947 1333437483 1 f none /usr/local/share/aclocal-1.11/regex.m4 0644 root root 2161 41211 1333437483 1 f none /usr/local/share/aclocal-1.11/runlog.m4 0644 root root 743 55280 1333437483 1 f none /usr/local/share/aclocal-1.11/sanity.m4 0644 root root 2060 37346 1333437483 1 f none /usr/local/share/aclocal-1.11/silent.m4 0644 root root 1871 17635 1333437483 1 f none /usr/local/share/aclocal-1.11/strip.m4 0644 root root 1417 52560 1333437483 1 f none /usr/local/share/aclocal-1.11/substnot.m4 0644 root root 694 51125 1333437483 1 f none /usr/local/share/aclocal-1.11/tar.m4 0644 root root 3205 59868 1333437483 1 f none /usr/local/share/aclocal-1.11/upc.m4 0644 root root 849 4295 1333437483 1 f none /usr/local/share/aclocal-1.11/vala.m4 0644 root root 1081 18833 1333437483 1 d none /usr/local/share/automake-1.11 0755 root root 1 d none /usr/local/share/automake-1.11/Automake 0755 root root 1 f none /usr/local/share/automake-1.11/Automake/ChannelDefs.pm 0644 root root 10387 55009 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Channels.pm 0644 root root 20693 10983 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Condition.pm 0644 root root 15623 16645 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Config.pm 0644 root root 1772 15224 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Configure_ac.pm 0644 root root 2920 40304 1333437483 1 f none /usr/local/share/automake-1.11/Automake/DisjConditions.pm 0644 root root 14806 25099 1333437483 1 f none /usr/local/share/automake-1.11/Automake/FileUtils.pm 0644 root root 10119 5328 1333437483 1 f none /usr/local/share/automake-1.11/Automake/General.pm 0644 root root 2195 46975 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Getopt.pm 0644 root root 2774 29712 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Item.pm 0644 root root 4604 46525 1333437483 1 f none /usr/local/share/automake-1.11/Automake/ItemDef.pm 0644 root root 2448 7930 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Location.pm 0644 root root 4884 4695 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Options.pm 0644 root root 9932 20412 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Rule.pm 0644 root root 23256 31102 1333437483 1 f none /usr/local/share/automake-1.11/Automake/RuleDef.pm 0644 root root 2278 56945 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Struct.pm 0644 root root 19605 59581 1333437483 1 f none /usr/local/share/automake-1.11/Automake/VarDef.pm 0644 root root 9009 8258 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Variable.pm 0644 root root 46321 12844 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Version.pm 0644 root root 4354 25273 1333437483 1 f none /usr/local/share/automake-1.11/Automake/Wrap.pm 0644 root root 4199 11783 1333437483 1 f none /usr/local/share/automake-1.11/Automake/XFile.pm 0644 root root 7292 27969 1333437483 1 f none /usr/local/share/automake-1.11/COPYING 0644 root root 35147 30328 1333437483 1 f none /usr/local/share/automake-1.11/INSTALL 0644 root root 15744 10989 1333437483 1 f none /usr/local/share/automake-1.11/acinstall 0755 root root 1553 64484 1333437483 1 d none /usr/local/share/automake-1.11/am 0755 root root 1 f none /usr/local/share/automake-1.11/am/ansi2knr.am 0644 root root 2338 51631 1333437483 1 f none /usr/local/share/automake-1.11/am/check-html.am 0644 root root 2377 58024 1333437483 1 f none /usr/local/share/automake-1.11/am/check.am 0644 root root 14786 56170 1333437483 1 f none /usr/local/share/automake-1.11/am/check2.am 0644 root root 1273 39665 1333437483 1 f none /usr/local/share/automake-1.11/am/clean-hdr.am 0644 root root 846 4965 1333437483 1 f none /usr/local/share/automake-1.11/am/clean.am 0644 root root 2377 5088 1333437483 1 f none /usr/local/share/automake-1.11/am/compile.am 0644 root root 1050 21341 1333437483 1 f none /usr/local/share/automake-1.11/am/configure.am 0644 root root 6632 5589 1333437483 1 f none /usr/local/share/automake-1.11/am/data.am 0644 root root 3350 51293 1333437483 1 f none /usr/local/share/automake-1.11/am/dejagnu.am 0644 root root 4449 29011 1333437483 1 f none /usr/local/share/automake-1.11/am/depend.am 0644 root root 1085 24821 1333437483 1 f none /usr/local/share/automake-1.11/am/depend2.am 0644 root root 7495 36140 1333437483 1 f none /usr/local/share/automake-1.11/am/distdir.am 0644 root root 22424 17044 1333437483 1 f none /usr/local/share/automake-1.11/am/footer.am 0644 root root 894 9583 1333437483 1 f none /usr/local/share/automake-1.11/am/header-vars.am 0644 root root 3200 60116 1333437483 1 f none /usr/local/share/automake-1.11/am/header.am 0644 root root 817 2470 1333437483 1 f none /usr/local/share/automake-1.11/am/inst-vars.am 0644 root root 3480 24746 1333437483 1 f none /usr/local/share/automake-1.11/am/install.am 0644 root root 4041 1731 1333437483 1 f none /usr/local/share/automake-1.11/am/java.am 0644 root root 2860 10146 1333437483 1 f none /usr/local/share/automake-1.11/am/lang-compile.am 0644 root root 1198 28382 1333437483 1 f none /usr/local/share/automake-1.11/am/lex.am 0644 root root 1352 40386 1333437483 1 f none /usr/local/share/automake-1.11/am/library.am 0644 root root 1015 14197 1333437483 1 f none /usr/local/share/automake-1.11/am/libs.am 0644 root root 3828 23781 1333437483 1 f none /usr/local/share/automake-1.11/am/libtool.am 0644 root root 1083 25396 1333437483 1 f none /usr/local/share/automake-1.11/am/lisp.am 0644 root root 5166 65123 1333437483 1 f none /usr/local/share/automake-1.11/am/ltlib.am 0644 root root 4912 31032 1333437483 1 f none /usr/local/share/automake-1.11/am/ltlibrary.am 0644 root root 978 11844 1333437483 1 f none /usr/local/share/automake-1.11/am/mans-vars.am 0644 root root 876 7536 1333437483 1 f none /usr/local/share/automake-1.11/am/mans.am 0644 root root 6493 37864 1333437483 1 f none /usr/local/share/automake-1.11/am/multilib.am 0644 root root 2153 49368 1333437483 1 f none /usr/local/share/automake-1.11/am/program.am 0644 root root 1282 37943 1333437483 1 f none /usr/local/share/automake-1.11/am/progs.am 0644 root root 6302 12424 1333437483 1 f none /usr/local/share/automake-1.11/am/python.am 0644 root root 4533 11044 1333437483 1 f none /usr/local/share/automake-1.11/am/remake-hdr.am 0644 root root 3379 17431 1333437483 1 f none /usr/local/share/automake-1.11/am/scripts.am 0644 root root 4667 17839 1333437483 1 f none /usr/local/share/automake-1.11/am/subdirs.am 0644 root root 4154 6164 1333437483 1 f none /usr/local/share/automake-1.11/am/tags.am 0644 root root 4774 28143 1333437483 1 f none /usr/local/share/automake-1.11/am/texi-vers.am 0644 root root 2465 64949 1333437483 1 f none /usr/local/share/automake-1.11/am/texibuild.am 0644 root root 5462 25881 1333437483 1 f none /usr/local/share/automake-1.11/am/texinfos.am 0644 root root 14082 29790 1333437483 1 f none /usr/local/share/automake-1.11/am/vala.am 0644 root root 770 64795 1333437483 1 f none /usr/local/share/automake-1.11/am/yacc.am 0644 root root 2248 50813 1333437483 1 f none /usr/local/share/automake-1.11/ansi2knr.1 0644 root root 1529 6388 1333437483 1 f none /usr/local/share/automake-1.11/ansi2knr.c 0644 root root 20269 51869 1333437483 1 f none /usr/local/share/automake-1.11/ar-lib 0755 root root 5827 50840 1333437483 1 f none /usr/local/share/automake-1.11/compile 0755 root root 7274 31703 1333437483 1 f none /usr/local/share/automake-1.11/config-ml.in 0644 root root 25398 19198 1333437483 1 f none /usr/local/share/automake-1.11/config.guess 0755 root root 44826 53839 1333437483 1 f none /usr/local/share/automake-1.11/config.sub 0755 root root 35454 4232 1333437483 1 f none /usr/local/share/automake-1.11/depcomp 0755 root root 20899 54643 1333437483 1 f none /usr/local/share/automake-1.11/elisp-comp 0755 root root 2807 34263 1333437483 1 f none /usr/local/share/automake-1.11/install-sh 0755 root root 13998 27177 1333437483 1 f none /usr/local/share/automake-1.11/mdate-sh 0755 root root 6095 36006 1333437483 1 f none /usr/local/share/automake-1.11/missing 0755 root root 10346 16897 1333437483 1 f none /usr/local/share/automake-1.11/mkinstalldirs 0755 root root 3538 65479 1333437483 1 f none /usr/local/share/automake-1.11/py-compile 0755 root root 4352 21038 1333437483 1 f none /usr/local/share/automake-1.11/symlink-tree 0755 root root 2265 55289 1333437483 1 f none /usr/local/share/automake-1.11/texinfo.tex 0644 root root 320197 45256 1333437483 1 f none /usr/local/share/automake-1.11/ylwrap 0755 root root 6383 35975 1333437483 1 d none /usr/local/share/doc 0755 root root 1 d none /usr/local/share/doc/automake 0755 root root 1 f none /usr/local/share/doc/automake/amhello-1.0.tar.gz 0644 root root 74324 63970 1333437483 1 d none /usr/local/share/info 0755 root root 1 f none /usr/local/share/info/automake.info 0644 root root 7256 10379 1333437483 1 f none /usr/local/share/info/automake.info-1 0644 root root 300105 38625 1333437483 1 f none /usr/local/share/info/automake.info-2 0644 root root 249720 22439 1333437483 1 f none /usr/local/share/info/automake.info-3 0644 root root 65436 41120 1333437483 1 f none /usr/local/share/info/dir 0644 root root 7328 21533 1333437483 1 d none /usr/local/share/man 0755 root root 1 d none /usr/local/share/man/man1 0755 root root 1 f none /usr/local/share/man/man1/aclocal-1.11.1 0644 root root 2411 9479 1333437483 1 f none /usr/local/share/man/man1/aclocal.1 0644 root root 24 1778 1333437483 1 f none /usr/local/share/man/man1/automake-1.11.1 0644 root root 3652 41417 1333437483 1 f none /usr/local/share/man/man1/automake.1 0644 root root 25 1914 1333437483 1 i checkinstall 790 2505 1333437733 1 i pkginfo 270 20833 1333437596 07070100079485000041ed0000000000000000000000024f7aa49c00000000000000b600010002ffffffffffffffff0000000800000000install07070100079486000081ed0000000000000000000000014f7aa52500000316000000b600010002ffffffffffffffff0000001500000000install/checkinstall#!/bin/sh # expected_bits="64" expected_release="5.11" expected_platform="i386" # release=`uname -r` platform=`uname -p` bits=`isainfo -b` # if [ ${platform} != ${expected_platform} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n" echo "\tAborting installation.\n\n\n" exit 1 fi if [ ${release} != ${expected_release} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n" echo "\tAborting installation.\n\n\n" exit 1 fi #if [ ${bits} != ${expected_bits} ]; then # echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n" # echo "\tYour machine is running a ${bits} bit O.S. currently\n" # echo "\tAborting installation.\n\n\n" # exit 1 #fi exit 0 070701000793f2000041ed0000000000000000000000034f7aa49c00000000000000b600010002ffffffffffffffff0000000500000000root070701000793f3000041ed0000000000000000000000034f7aa49c00000000000000b600010002ffffffffffffffff0000000900000000root/usr070701000793f4000041ed0000000000000000000000044f7aa49c00000000000000b600010002ffffffffffffffff0000000f00000000root/usr/local070701000793f8000041ed0000000000000000000000074f7aa49c00000000000000b600010002ffffffffffffffff0000001500000000root/usr/local/share0707010007947f000041ed0000000000000000000000034f7aa49c00000000000000b600010002ffffffffffffffff0000001900000000root/usr/local/share/man07070100079480000041ed0000000000000000000000024f7aa49c00000000000000b600010002ffffffffffffffff0000001e00000000root/usr/local/share/man/man107070100079481000081a40000000000000000000000014f7aa42b0000096b000000b600010002ffffffffffffffff0000002d00000000root/usr/local/share/man/man1/aclocal-1.11.1.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4. .TH ACLOCAL "1" "April 2012" "aclocal 1.11.4" "User Commands" .SH NAME aclocal \- manual page for aclocal 1.11.4 .SH SYNOPSIS .B aclocal [\fIOPTIONS\fR] ... .SH DESCRIPTION Generate `aclocal.m4' by scanning `configure.ac' or `configure.in' .SH OPTIONS .TP \fB\-\-automake\-acdir\fR=\fIDIR\fR directory holding automake\-provided m4 files .TP \fB\-\-system\-acdir\fR=\fIDIR\fR directory holding third\-party system\-wide files .TP \fB\-\-diff\fR[=\fICOMMAND\fR] run COMMAND [diff \fB\-u]\fR on M4 files that would be changed (implies \fB\-\-install\fR and \fB\-\-dry\-run\fR) .TP \fB\-\-dry\-run\fR pretend to, but do not actually update any file .TP \fB\-\-force\fR always update output file .TP \fB\-\-help\fR print this help, then exit .TP \fB\-I\fR DIR add directory to search list for .m4 files .TP \fB\-\-install\fR copy third\-party files to the first \fB\-I\fR directory .TP \fB\-\-output\fR=\fIFILE\fR put output in FILE (default aclocal.m4) .TP \fB\-\-print\-ac\-dir\fR print name of directory holding system\-wide third\-party m4 files, then exit .TP \fB\-\-verbose\fR don't be silent .TP \fB\-\-version\fR print version number, then exit .TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY .SS "Warning categories include:" .TP `syntax' dubious syntactic constructs (default) .TP `unsupported' unknown macros (default) .TP `all' all the warnings (default) .TP `no\-CATEGORY' turn off warnings in CATEGORY .TP `none' turn off all the warnings .TP `error' treat warnings as errors .SH AUTHOR Written by Tom Tromey .IP and Alexandre Duret\-Lutz . .SH "REPORTING BUGS" Report bugs to . .br GNU Automake home page: . .br General help using GNU software: . .SH COPYRIGHT Copyright \(co 2011 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" The full documentation for .B aclocal is maintained as a Texinfo manual. If the .B info and .B aclocal programs are properly installed at your site, the command .IP .B info aclocal .PP should give you access to the complete manual. 07070100079482000081a40000000000000000000000014f7aa42b00000018000000b600010002ffffffffffffffff0000002800000000root/usr/local/share/man/man1/aclocal.1.so man1/aclocal-1.11.1 07070100079483000081a40000000000000000000000014f7aa42b00000e44000000b600010002ffffffffffffffff0000002e00000000root/usr/local/share/man/man1/automake-1.11.1.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4. .TH AUTOMAKE "1" "April 2012" "automake 1.11.4" "User Commands" .SH NAME automake \- manual page for automake 1.11.4 .SH SYNOPSIS .B automake [\fIOPTION\fR] ... [\fIMakefile\fR]... .SH DESCRIPTION Generate Makefile.in for configure from Makefile.am. .SS "Operation modes:" .TP \fB\-\-help\fR print this help, then exit .TP \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely list files processed .TP \fB\-\-no\-force\fR only update Makefile.in's that are out of date .TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY .SS "Dependency tracking:" .TP \fB\-i\fR, \fB\-\-ignore\-deps\fR disable dependency tracking code .TP \fB\-\-include\-deps\fR enable dependency tracking code .SS "Flavors:" .TP \fB\-\-cygnus\fR assume program is part of Cygnus\-style tree .TP \fB\-\-foreign\fR set strictness to foreign .TP \fB\-\-gnits\fR set strictness to gnits .TP \fB\-\-gnu\fR set strictness to gnu .SS "Library files:" .TP \fB\-a\fR, \fB\-\-add\-missing\fR add missing standard files to package .TP \fB\-\-libdir\fR=\fIDIR\fR directory storing library files .TP \fB\-c\fR, \fB\-\-copy\fR with \fB\-a\fR, copy missing files (default is symlink) .TP \fB\-f\fR, \fB\-\-force\-missing\fR force update of standard files .SS "Warning categories include:" .TP `gnu' GNU coding standards (default in gnu and gnits modes) .TP `obsolete' obsolete features or constructions .TP `override' user redefinitions of Automake rules or variables .TP `portability' portability issues (default in gnu and gnits modes) .TP `extra\-portability' extra portability issues related to obscure tools .TP `syntax' dubious syntactic constructs (default) .TP `unsupported' unsupported or incomplete features (default) .TP `all' all the warnings .TP `no\-CATEGORY' turn off warnings in CATEGORY .TP `none' turn off all the warnings .TP `error' treat warnings as errors .SS "Files automatically distributed if found (always):" .TP ABOUT\-GNU INSTALL config.guess ltcf\-gcj.sh .TP ABOUT\-NLS NEWS config.rpath ltconfig .TP AUTHORS README config.sub ltmain.sh .TP BACKLOG THANKS depcomp mdate\-sh .TP COPYING TODO elisp\-comp missing .TP COPYING.DOC ansi2knr.1 install\-sh mkinstalldirs .TP COPYING.LESSER ansi2knr.c libversion.in py\-compile .TP COPYING.LIB ar\-lib ltcf\-c.sh texinfo.tex .TP ChangeLog compile ltcf\-cxx.sh ylwrap .SS "Files automatically distributed if found (under certain conditions):" .TP acconfig.h config.h.bot configure configure.in .TP aclocal.m4 config.h.top configure.ac stamp\-vti .SH AUTHOR Written by Tom Tromey .IP and Alexandre Duret\-Lutz . .SH "REPORTING BUGS" Report bugs to . .br GNU Automake home page: . .br General help using GNU software: . .SH COPYRIGHT Copyright \(co 2011 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" The full documentation for .B automake is maintained as a Texinfo manual. If the .B info and .B automake programs are properly installed at your site, the command .IP .B info automake .PP should give you access to the complete manual. 07070100079484000081a40000000000000000000000014f7aa42b00000019000000b600010002ffffffffffffffff0000002900000000root/usr/local/share/man/man1/automake.1.so man1/automake-1.11.1 07070100079420000041ed0000000000000000000000044f7aa49c00000000000000b600010002ffffffffffffffff0000002300000000root/usr/local/share/automake-1.1107070100079470000081ed0000000000000000000000014f7aa42b0000286a000000b600010002ffffffffffffffff0000002b00000000root/usr/local/share/automake-1.11/missing#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: 0707010007946c000081ed0000000000000000000000014f7aa42b000051a3000000b600010002ffffffffffffffff0000002b00000000root/usr/local/share/automake-1.11/depcomp#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: 07070100079467000081ed0000000000000000000000014f7aa42b000016c3000000b600010002ffffffffffffffff0000002a00000000root/usr/local/share/automake-1.11/ar-lib#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010, 2012 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat <. package Automake::General; use 5.005; use strict; use Exporter; use File::Basename; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&uniq $me); # Variable we share with the main package. Be sure to have a single # copy of them: using `my' together with multiple inclusion of this # package would introduce several copies. use vars qw ($me); $me = basename ($0); # END # --- # Exit nonzero whenever closing STDOUT fails. sub END { # This is required if the code might send any output to stdout # E.g., even --version or --help. So it's best to do it unconditionally. if (! close STDOUT) { print STDERR "$me: closing standard output: $!\n"; $? = 74; # EX_IOERR return; } } # @RES # uniq (@LIST) # ------------ # Return LIST with no duplicates. sub uniq (@) { my @res = (); my %seen = (); foreach my $item (@_) { if (! exists $seen{$item}) { $seen{$item} = 1; push (@res, $item); } } return wantarray ? @res : "@res"; } 1; # for require ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079422000081a40000000000000000000000014f7aa42b00002893000000b600010002ffffffffffffffff0000003b00000000root/usr/local/share/automake-1.11/Automake/ChannelDefs.pm# Copyright (C) 2002, 2003, 2006, 2008, 2009, 2010 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::ChannelDefs; use Automake::Config; BEGIN { if ($perl_threads) { require threads; import threads; } } use Automake::Channels; =head1 NAME Automake::ChannelDefs - channel definitions for Automake and helper functions =head1 SYNOPSIS use Automake::ChannelDefs; Automake::ChannelDefs::usage (); prog_error ($MESSAGE, [%OPTIONS]); error ($WHERE, $MESSAGE, [%OPTIONS]); error ($MESSAGE); fatal ($WHERE, $MESSAGE, [%OPTIONS]); fatal ($MESSAGE); verb ($MESSAGE, [%OPTIONS]); switch_warning ($CATEGORY); parse_WARNINGS (); parse_warning ($OPTION, $ARGUMENT); Automake::ChannelDefs::set_strictness ($STRICTNESS_NAME); =head1 DESCRIPTION This packages defines channels that can be used in Automake to output diagnostics and other messages (via C). It also defines some helper function to enable or disable these channels, and some shorthand function to output on specific channels. =cut use 5.005; use strict; use Exporter; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&prog_error &error &fatal &verb &switch_warning &parse_WARNINGS &parse_warnings); =head2 CHANNELS The following channels can be used as the first argument of C. For some of them we list a shorthand function that makes the code more readable. =over 4 =item C Fatal errors. Use C<&fatal> to send messages over this channel. =item C Common errors. Use C<&error> to send messages over this channel. =item C Errors related to GNU Standards. =item C Errors related to GNU Standards that should be warnings in `foreign' mode. =item C Errors related to GNITS Standards (silent by default). =item C Internal errors. Use C<&prog_error> to send messages over this channel. =item C Warnings related to GNU Coding Standards. =item C Warnings about obsolete features (silent by default). =item C Warnings about user redefinitions of Automake rules or variables (silent by default). =item C Warnings about non-portable constructs. =item C Extra warnings about non-portable constructs covering obscure tools. =item C Warnings about weird syntax, unused variables, typos... =item C Warnings about unsupported (or mis-supported) features. =item C Messages output in C<--verbose> mode. Use C<&verb> to send such messages. =item C Informative messages. =back =cut # Initialize our list of error/warning channels. # Do not forget to update &usage and the manual # if you add or change a warning channel. register_channel 'fatal', type => 'fatal', uniq_part => UP_NONE, ordered => 0; register_channel 'error', type => 'error'; register_channel 'error-gnu', type => 'error'; register_channel 'error-gnu/warn', type => 'error'; register_channel 'error-gnits', type => 'error', silent => 1; register_channel 'automake', type => 'fatal', backtrace => 1, header => ("####################\n" . "## Internal Error ##\n" . "####################\n"), footer => "\nPlease contact <$PACKAGE_BUGREPORT>.", uniq_part => UP_NONE, ordered => 0; register_channel 'extra-portability', type => 'warning', silent => 1; register_channel 'gnu', type => 'warning'; register_channel 'obsolete', type => 'warning', silent => 1; register_channel 'override', type => 'warning', silent => 1; register_channel 'portability', type => 'warning', silent => 1; register_channel 'portability-recursive', type => 'warning', silent => 1; register_channel 'syntax', type => 'warning'; register_channel 'unsupported', type => 'warning'; register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE, ordered => 0; register_channel 'note', type => 'debug', silent => 0; =head2 FUNCTIONS =over 4 =item C Display warning categories. =cut sub usage () { print "Warning categories include: `gnu' GNU coding standards (default in gnu and gnits modes) `obsolete' obsolete features or constructions `override' user redefinitions of Automake rules or variables `portability' portability issues (default in gnu and gnits modes) `extra-portability' extra portability issues related to obscure tools `syntax' dubious syntactic constructs (default) `unsupported' unsupported or incomplete features (default) `all' all the warnings `no-CATEGORY' turn off warnings in CATEGORY `none' turn off all the warnings `error' treat warnings as errors "; } =item C Signal a programming error (on channel C), display C<$MESSAGE>, and exit 1. =cut sub prog_error ($;%) { my ($msg, %opts) = @_; msg 'automake', '', $msg, %opts; } =item C =item C Uncategorized errors. =cut sub error ($;$%) { my ($where, $msg, %opts) = @_; msg ('error', $where, $msg, %opts); } =item C =item C Fatal errors. =cut sub fatal ($;$%) { my ($where, $msg, %opts) = @_; msg ('fatal', $where, $msg, %opts); } =item C C<--verbose> messages. =cut sub verb ($;%) { my ($msg, %opts) = @_; $msg = "thread " . threads->tid . ": " . $msg if $perl_threads; msg 'verb', '', $msg, %opts; } =item C If C<$CATEGORY> is C, turn on channel C. If it's C, turn C off. Else handle C and C for completeness. =cut # HACK to have `-Wextra-portability' *not* implied by `-Wall'. # This will go away in automake 1.12. my $have_extra_portability = 0; sub switch_warning ($) { my ($cat) = @_; my $has_no = 0; if ($cat =~ /^no-(.*)$/) { $cat = $1; $has_no = 1; } if ($cat eq 'all') { setup_channel_type 'warning', silent => $has_no; setup_channel 'extra-portability', silent => 1 unless $have_extra_portability; } elsif ($cat eq 'none') { setup_channel_type 'warning', silent => ! $has_no; } elsif ($cat eq 'error') { $warnings_are_errors = ! $has_no; # Set exit code if Perl warns about something # (like uninitialized variables). $SIG{"__WARN__"} = $has_no ? 'DEFAULT' : sub { print STDERR @_; $exit_code = 1; }; } elsif (channel_type ($cat) eq 'warning') { setup_channel $cat, silent => $has_no; setup_channel 'portability-recursive', silent => $has_no if $cat eq 'portability'; if ($cat eq 'portability' && $has_no) { setup_channel 'extra-portability', silent => 1; $have_extra_portability = 0; } if ($cat eq 'extra-portability' && ! $has_no) { setup_channel 'portability', silent => 0; setup_channel 'portability-recursive', silent => 0; $have_extra_portability = 1; } } else { return 1; } return 0; } =item C Parse the WARNINGS environment variable. =cut sub parse_WARNINGS () { if (exists $ENV{'WARNINGS'}) { # Ignore unknown categories. This is required because WARNINGS # should be honored by many tools. switch_warning $_ foreach (split (',', $ENV{'WARNINGS'})); } } =item C Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>. C<$OPTIONS> is C<"--warning"> or C<"-W">, C<$ARGUMENT> is C. This is meant to be used as an argument to C. =cut sub parse_warnings ($$) { my ($opt, $categories) = @_; foreach my $cat (split (',', $categories)) { msg 'unsupported', "unknown warning category `$cat'" if switch_warning $cat; } } =item C Configure channels for strictness C<$STRICTNESS_NAME>. =cut sub set_strictness ($) { my ($name) = @_; if ($name eq 'gnu') { setup_channel 'error-gnu', silent => 0; setup_channel 'error-gnu/warn', silent => 0, type => 'error'; setup_channel 'error-gnits', silent => 1; setup_channel 'portability', silent => 0; setup_channel 'extra-portability', silent => 1; setup_channel 'gnu', silent => 0; } elsif ($name eq 'gnits') { setup_channel 'error-gnu', silent => 0; setup_channel 'error-gnu/warn', silent => 0, type => 'error'; setup_channel 'error-gnits', silent => 0; setup_channel 'portability', silent => 0; setup_channel 'extra-portability', silent => 1; setup_channel 'gnu', silent => 0; } elsif ($name eq 'foreign') { setup_channel 'error-gnu', silent => 1; setup_channel 'error-gnu/warn', silent => 0, type => 'warning'; setup_channel 'error-gnits', silent => 1; setup_channel 'portability', silent => 1; setup_channel 'extra-portability', silent => 1; setup_channel 'gnu', silent => 1; } else { prog_error "level `$name' not recognized\n"; } } 1; =back =head1 SEE ALSO L =head1 HISTORY Written by Alexandre Duret-Lutz EFE. =cut ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079431000081a40000000000000000000000014f7aa42b00004c95000000b600010002ffffffffffffffff0000003600000000root/usr/local/share/automake-1.11/Automake/Struct.pm# autoconf -- create `configure' using m4 macros # Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # This file is basically Perl 5.6's Class::Struct, but made compatible # with Perl 5.5. If someday this has to be updated, be sure to rename # all the occurrences of Class::Struct into Automake::Struct, otherwise # if we `use' a Perl module (e.g., File::stat) that uses Class::Struct, # we would have two packages defining the same symbols. Boom. ############################################################### # The main copy of this file is in Automake's git repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Automake::Struct; ## See POD after __END__ use 5.005_03; use strict; use vars qw(@ISA @EXPORT $VERSION); use Carp; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(struct); $VERSION = '0.58'; ## Tested on 5.002 and 5.003 without class membership tests: my $CHECK_CLASS_MEMBERSHIP = ($] >= 5.003_95); my $print = 0; sub printem { if (@_) { $print = shift } else { $print++ } } { package Automake::Struct::Tie_ISA; sub TIEARRAY { my $class = shift; return bless [], $class; } sub STORE { my ($self, $index, $value) = @_; Automake::Struct::_subclass_error(); } sub FETCH { my ($self, $index) = @_; $self->[$index]; } sub FETCHSIZE { my $self = shift; return scalar(@$self); } sub DESTROY { } } sub struct { # Determine parameter list structure, one of: # struct( class => [ element-list ]) # struct( class => { element-list }) # struct( element-list ) # Latter form assumes current package name as struct name. my ($class, @decls); my $base_type = ref $_[1]; if ( $base_type eq 'HASH' ) { $class = shift; @decls = %{shift()}; _usage_error() if @_; } elsif ( $base_type eq 'ARRAY' ) { $class = shift; @decls = @{shift()}; _usage_error() if @_; } else { $base_type = 'ARRAY'; $class = (caller())[0]; @decls = @_; } _usage_error() if @decls % 2 == 1; # Ensure we are not, and will not be, a subclass. my $isa = do { no strict 'refs'; \@{$class . '::ISA'}; }; _subclass_error() if @$isa; tie @$isa, 'Automake::Struct::Tie_ISA'; # Create constructor. croak "function 'new' already defined in package $class" if do { no strict 'refs'; defined &{$class . "::new"} }; my @methods = (); my %refs = (); my %arrays = (); my %hashes = (); my %classes = (); my $got_class = 0; my $out = ''; $out = "{\n package $class;\n use Carp;\n sub new {\n"; $out .= " my (\$class, \%init) = \@_;\n"; $out .= " \$class = __PACKAGE__ unless \@_;\n"; my $cnt = 0; my $idx = 0; my( $cmt, $name, $type, $elem ); if( $base_type eq 'HASH' ){ $out .= " my(\$r) = {};\n"; $cmt = ''; } elsif( $base_type eq 'ARRAY' ){ $out .= " my(\$r) = [];\n"; } while( $idx < @decls ){ $name = $decls[$idx]; $type = $decls[$idx+1]; push( @methods, $name ); if( $base_type eq 'HASH' ){ $elem = "{'${class}::$name'}"; } elsif( $base_type eq 'ARRAY' ){ $elem = "[$cnt]"; ++$cnt; $cmt = " # $name"; } if( $type =~ /^\*(.)/ ){ $refs{$name}++; $type = $1; } my $init = "defined(\$init{'$name'}) ? \$init{'$name'} :"; if( $type eq '@' ){ $out .= " croak 'Initializer for $name must be array reference'\n"; $out .= " if defined(\$init{'$name'}) && ref(\$init{'$name'}) ne 'ARRAY';\n"; $out .= " \$r->$elem = $init [];$cmt\n"; $arrays{$name}++; } elsif( $type eq '%' ){ $out .= " croak 'Initializer for $name must be hash reference'\n"; $out .= " if defined(\$init{'$name'}) && ref(\$init{'$name'}) ne 'HASH';\n"; $out .= " \$r->$elem = $init {};$cmt\n"; $hashes{$name}++; } elsif ( $type eq '$') { $out .= " \$r->$elem = $init undef;$cmt\n"; } elsif( $type =~ /^\w+(?:::\w+)*$/ ){ $init = "defined(\$init{'$name'}) ? \%{\$init{'$name'}} : ()"; $out .= " croak 'Initializer for $name must be hash reference'\n"; $out .= " if defined(\$init{'$name'}) && ref(\$init{'$name'}) ne 'HASH';\n"; $out .= " \$r->$elem = '${type}'->new($init);$cmt\n"; $classes{$name} = $type; $got_class = 1; } else{ croak "'$type' is not a valid struct element type"; } $idx += 2; } $out .= " bless \$r, \$class;\n }\n"; # Create accessor methods. my( $pre, $pst, $sel ); $cnt = 0; foreach $name (@methods){ if ( do { no strict 'refs'; defined &{$class . "::$name"} } ) { carp "function '$name' already defined, overrides struct accessor method"; } else { $pre = $pst = $cmt = $sel = ''; if( defined $refs{$name} ){ $pre = "\\("; $pst = ")"; $cmt = " # returns ref"; } $out .= " sub $name {$cmt\n my \$r = shift;\n"; if( $base_type eq 'ARRAY' ){ $elem = "[$cnt]"; ++$cnt; } elsif( $base_type eq 'HASH' ){ $elem = "{'${class}::$name'}"; } if( defined $arrays{$name} ){ $out .= " my \$i;\n"; $out .= " \@_ ? (\$i = shift) : return \$r->$elem;\n"; $sel = "->[\$i]"; } elsif( defined $hashes{$name} ){ $out .= " my \$i;\n"; $out .= " \@_ ? (\$i = shift) : return \$r->$elem;\n"; $sel = "->{\$i}"; } elsif( defined $classes{$name} ){ if ( $CHECK_CLASS_MEMBERSHIP ) { $out .= " croak '$name argument is wrong class' if \@_ && ! UNIVERSAL::isa(\$_[0], '$classes{$name}');\n"; } } $out .= " croak 'Too many args to $name' if \@_ > 1;\n"; $out .= " \@_ ? ($pre\$r->$elem$sel = shift$pst) : $pre\$r->$elem$sel$pst;\n"; $out .= " }\n"; } } $out .= "}\n1;\n"; print $out if $print; my $result = eval $out; carp $@ if $@; } sub _usage_error { confess "struct usage error"; } sub _subclass_error { croak 'struct class cannot be a subclass (@ISA not allowed)'; } 1; # for require __END__ =head1 NAME Automake::Struct - declare struct-like datatypes as Perl classes =head1 SYNOPSIS use Automake::Struct; # declare struct, based on array: struct( CLASS_NAME => [ ELEMENT_NAME => ELEMENT_TYPE, ... ]); # declare struct, based on hash: struct( CLASS_NAME => { ELEMENT_NAME => ELEMENT_TYPE, ... }); package CLASS_NAME; use Automake::Struct; # declare struct, based on array, implicit class name: struct( ELEMENT_NAME => ELEMENT_TYPE, ... ); package Myobj; use Automake::Struct; # declare struct with four types of elements: struct( s => '$', a => '@', h => '%', c => 'My_Other_Class' ); $obj = new Myobj; # constructor # scalar type accessor: $element_value = $obj->s; # element value $obj->s('new value'); # assign to element # array type accessor: $ary_ref = $obj->a; # reference to whole array $ary_element_value = $obj->a(2); # array element value $obj->a(2, 'new value'); # assign to array element # hash type accessor: $hash_ref = $obj->h; # reference to whole hash $hash_element_value = $obj->h('x'); # hash element value $obj->h('x', 'new value'); # assign to hash element # class type accessor: $element_value = $obj->c; # object reference $obj->c->method(...); # call method of object $obj->c(new My_Other_Class); # assign a new object =head1 DESCRIPTION C exports a single function, C. Given a list of element names and types, and optionally a class name, C creates a Perl 5 class that implements a "struct-like" data structure. The new class is given a constructor method, C, for creating struct objects. Each element in the struct data has an accessor method, which is used to assign to the element and to fetch its value. The default accessor can be overridden by declaring a C of the same name in the package. (See Example 2.) Each element's type can be scalar, array, hash, or class. =head2 The C function The C function has three forms of parameter-list. struct( CLASS_NAME => [ ELEMENT_LIST ]); struct( CLASS_NAME => { ELEMENT_LIST }); struct( ELEMENT_LIST ); The first and second forms explicitly identify the name of the class being created. The third form assumes the current package name as the class name. An object of a class created by the first and third forms is based on an array, whereas an object of a class created by the second form is based on a hash. The array-based forms will be somewhat faster and smaller; the hash-based forms are more flexible. The class created by C must not be a subclass of another class other than C. It can, however, be used as a superclass for other classes. To facilitate this, the generated constructor method uses a two-argument blessing. Furthermore, if the class is hash-based, the key of each element is prefixed with the class name (see I, Recipe 13.12). A function named C must not be explicitly defined in a class created by C. The I has the form NAME => TYPE, ... Each name-type pair declares one element of the struct. Each element name will be defined as an accessor method unless a method by that name is explicitly defined; in the latter case, a warning is issued if the warning flag (B<-w>) is set. =head2 Element Types and Accessor Methods The four element types -- scalar, array, hash, and class -- are represented by strings -- C<'$'>, C<'@'>, C<'%'>, and a class name -- optionally preceded by a C<'*'>. The accessor method provided by C for an element depends on the declared type of the element. =over =item Scalar (C<'$'> or C<'*$'>) The element is a scalar, and by default is initialized to C (but see L). The accessor's argument, if any, is assigned to the element. If the element type is C<'$'>, the value of the element (after assignment) is returned. If the element type is C<'*$'>, a reference to the element is returned. =item Array (C<'@'> or C<'*@'>) The element is an array, initialized by default to C<()>. With no argument, the accessor returns a reference to the element's whole array (whether or not the element was specified as C<'@'> or C<'*@'>). With one or two arguments, the first argument is an index specifying one element of the array; the second argument, if present, is assigned to the array element. If the element type is C<'@'>, the accessor returns the array element value. If the element type is C<'*@'>, a reference to the array element is returned. =item Hash (C<'%'> or C<'*%'>) The element is a hash, initialized by default to C<()>. With no argument, the accessor returns a reference to the element's whole hash (whether or not the element was specified as C<'%'> or C<'*%'>). With one or two arguments, the first argument is a key specifying one element of the hash; the second argument, if present, is assigned to the hash element. If the element type is C<'%'>, the accessor returns the hash element value. If the element type is C<'*%'>, a reference to the hash element is returned. =item Class (C<'Class_Name'> or C<'*Class_Name'>) The element's value must be a reference blessed to the named class or to one of its subclasses. The element is initialized to the result of calling the C constructor of the named class. The accessor's argument, if any, is assigned to the element. The accessor will C if this is not an appropriate object reference. If the element type does not start with a C<'*'>, the accessor returns the element value (after assignment). If the element type starts with a C<'*'>, a reference to the element itself is returned. =back =head2 Initializing with C C always creates a constructor called C. That constructor may take a list of initializers for the various elements of the new struct. Each initializer is a pair of values: IC< =E >I. The initializer value for a scalar element is just a scalar value. The initializer for an array element is an array reference. The initializer for a hash is a hash reference. The initializer for a class element is also a hash reference, and the contents of that hash are passed to the element's own constructor. See Example 3 below for an example of initialization. =head1 EXAMPLES =over =item Example 1 Giving a struct element a class type that is also a struct is how structs are nested. Here, C represents a time (seconds and microseconds), and C has two elements, each of which is of type C. use Automake::Struct; struct( rusage => { ru_utime => timeval, # seconds ru_stime => timeval, # microseconds }); struct( timeval => [ tv_secs => '$', tv_usecs => '$', ]); # create an object: my $t = new rusage; # $t->ru_utime and $t->ru_stime are objects of type timeval. # set $t->ru_utime to 100.0 sec and $t->ru_stime to 5.0 sec. $t->ru_utime->tv_secs(100); $t->ru_utime->tv_usecs(0); $t->ru_stime->tv_secs(5); $t->ru_stime->tv_usecs(0); =item Example 2 An accessor function can be redefined in order to provide additional checking of values, etc. Here, we want the C element always to be nonnegative, so we redefine the C accessor accordingly. package MyObj; use Automake::Struct; # declare the struct struct ( 'MyObj', { count => '$', stuff => '%' } ); # override the default accessor method for 'count' sub count { my $self = shift; if ( @_ ) { die 'count must be nonnegative' if $_[0] < 0; $self->{'count'} = shift; warn "Too many args to count" if @_; } return $self->{'count'}; } package main; $x = new MyObj; print "\$x->count(5) = ", $x->count(5), "\n"; # prints '$x->count(5) = 5' print "\$x->count = ", $x->count, "\n"; # prints '$x->count = 5' print "\$x->count(-5) = ", $x->count(-5), "\n"; # dies due to negative argument! =item Example 3 The constructor of a generated class can be passed a list of I=>I pairs, with which to initialize the struct. If no initializer is specified for a particular element, its default initialization is performed instead. Initializers for non-existent elements are silently ignored. Note that the initializer for a nested struct is specified as an anonymous hash of initializers, which is passed on to the nested struct's constructor. use Automake::Struct; struct Breed => { name => '$', cross => '$', }; struct Cat => [ name => '$', kittens => '@', markings => '%', breed => 'Breed', ]; my $cat = Cat->new( name => 'Socks', kittens => ['Monica', 'Kenneth'], markings => { socks=>1, blaze=>"white" }, breed => { name=>'short-hair', cross=>1 }, ); print "Once a cat called ", $cat->name, "\n"; print "(which was a ", $cat->breed->name, ")\n"; print "had two kittens: ", join(' and ', @{$cat->kittens}), "\n"; =back =head1 Author and Modification History Modified by Akim Demaille, 2001-08-03 Rename as Automake::Struct to avoid name clashes with Class::Struct. Make it compatible with Perl 5.5. Modified by Damian Conway, 1999-03-05, v0.58. Added handling of hash-like arg list to class ctor. Changed to two-argument blessing in ctor to support derivation from created classes. Added classname prefixes to keys in hash-based classes (refer to "Perl Cookbook", Recipe 13.12 for rationale). Corrected behavior of accessors for '*@' and '*%' struct elements. Package now implements documented behavior when returning a reference to an entire hash or array element. Previously these were returned as a reference to a reference to the element. Renamed to C and modified by Jim Miner, 1997-04-02. members() function removed. Documentation corrected and extended. Use of struct() in a subclass prohibited. User definition of accessor allowed. Treatment of '*' in element types corrected. Treatment of classes as element types corrected. Class name to struct() made optional. Diagnostic checks added. Originally C by Dean Roehrich. # Template.pm --- struct/member template builder # 12mar95 # Dean Roehrich # # changes/bugs fixed since 28nov94 version: # - podified # changes/bugs fixed since 21nov94 version: # - Fixed examples. # changes/bugs fixed since 02sep94 version: # - Moved to Class::Template. # changes/bugs fixed since 20feb94 version: # - Updated to be a more proper module. # - Added "use strict". # - Bug in build_methods, was using @var when @$var needed. # - Now using my() rather than local(). # # Uses perl5 classes to create nested data types. # This is offered as one implementation of Tom Christiansen's "structs.pl" # idea. =cut ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 0707010007942d000081a40000000000000000000000014f7aa42b00001314000000b600010002ffffffffffffffff0000003800000000root/usr/local/share/automake-1.11/Automake/Location.pm# Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Location; =head1 NAME Automake::Location - a class for location tracking, with a stack of contexts =head1 SYNOPSIS use Automake::Location; # Create a new Location object my $where = new Automake::Location "foo.c:13"; # Change the location $where->set ("foo.c:14"); # Get the location (without context). # Here this should print "foo.c:14" print $where->get, "\n"; # Push a context, and change the location $where->push_context ("included from here"); $where->set ("bar.h:1"); # Print the location and the stack of context (for debugging) print $where->dump; # This should display # bar.h:1: # foo.c:14: included from here # Get the contexts (list of [$location_string, $description]) for my $pair (reverse $where->contexts) { my ($loc, $descr) = @{$pair}; ... } # Pop a context, and reset the location from the previous context. $where->pop_context; # Clone a Location. Use this when storing the state of a location # that would otherwise be modified. my $where_copy = $where->clone; # Serialize a Location object (for passing through a thread queue, # for example) my @array = $where->serialize (); # De-serialize: recreate a Location object from a queue. my $where = new Automake::Location::deserialize ($queue); =head1 DESCRIPTION C objects are used to keep track of locations in Automake, and used to produce diagnostics. A C object is made of two parts: a location string, and a stack of contexts. For instance if C is defined at line 1 in F which was included at line 14 in F, then the location string should be C<"bar.h:10"> and the context should be the pair (C<"foo.c:14">, C<"included from here">). Section I shows how to setup such a C, and access the location string or the stack of contexts. You can pass a C to C. =cut sub new ($;$) { my ($class, $position) = @_; my $self = { position => $position, contexts => [], }; bless $self, $class; return $self; } sub set ($$) { my ($self, $position) = @_; $self->{'position'} = $position; } sub get ($) { my ($self) = @_; return $self->{'position'}; } sub push_context ($$) { my ($self, $context) = @_; push @{$self->{'contexts'}}, [$self->get, $context]; $self->set (undef); } sub pop_context ($) { my ($self) = @_; my $pair = pop @{$self->{'contexts'}}; $self->set ($pair->[0]); return @{$pair}; } sub get_contexts ($) { my ($self) = @_; return @{$self->{'contexts'}}; } sub clone ($) { my ($self) = @_; my $other = new Automake::Location ($self->get); my @contexts = $self->get_contexts; for my $pair (@contexts) { push @{$other->{'contexts'}}, [@{$pair}]; } return $other; } sub dump ($) { my ($self) = @_; my $res = ($self->get || 'INTERNAL') . ":\n"; for my $pair (reverse $self->get_contexts) { $res .= $pair->[0] || 'INTERNAL'; $res .= ": $pair->[1]\n"; } return $res; } sub serialize ($) { my ($self) = @_; my @serial = (); push @serial, $self->get; my @contexts = $self->get_contexts; for my $pair (@contexts) { push @serial, @{$pair}; } push @serial, undef; return @serial; } sub deserialize ($) { my ($queue) = @_; my $position = $queue->dequeue (); my $self = new Automake::Location $position; while (my $position = $queue->dequeue ()) { my $context = $queue->dequeue (); push @{$self->{'contexts'}}, [$position, $context]; } return $self; } =head1 SEE ALSO L =head1 HISTORY Written by Alexandre Duret-Lutz EFE. =cut 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079425000081a40000000000000000000000014f7aa42b000006ec000000b600010002ffffffffffffffff0000003600000000root/usr/local/share/automake-1.11/Automake/Config.pm# -*- Perl -*- # Copyright (C) 2003, 2004, 2008, 2010 Free Software Foundation, Inc. # Generated from Automake/Config.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Config; use strict; use 5.006; require Exporter; our @ISA = qw (Exporter); our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION $libdir $perl_threads); # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that e.g. version 0.30 will print correctly. our $APIVERSION = '1.11'; our $PACKAGE = 'automake'; our $PACKAGE_BUGREPORT = 'bug-automake@gnu.org'; our $VERSION = '1.11.4'; our $libdir = '/usr/local/share/automake-1.11'; our $perl_threads = 0; 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 0707010007942f000081a40000000000000000000000014f7aa42b00005ad8000000b600010002ffffffffffffffff0000003400000000root/usr/local/share/automake-1.11/Automake/Rule.pm# Copyright (C) 2003, 2004, 2006, 2007, 2010, 2011 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Rule; use strict; use Carp; use Automake::Item; use Automake::RuleDef; use Automake::ChannelDefs; use Automake::Channels; use Automake::Options; use Automake::Condition qw (TRUE FALSE); use Automake::DisjConditions; require Exporter; use vars '@ISA', '@EXPORT', '@EXPORT_OK'; @ISA = qw/Automake::Item Exporter/; @EXPORT = qw (reset register_suffix_rule suffix_rules_count suffixes rules $suffix_rules $KNOWN_EXTENSIONS_PATTERN depend %dependencies %actions register_action accept_extensions reject_rule msg_rule msg_cond_rule err_rule err_cond_rule rule rrule ruledef rruledef); =head1 NAME Automake::Rule - support for rules definitions =head1 SYNOPSIS use Automake::Rule; use Automake::RuleDef; =head1 DESCRIPTION This package provides support for Makefile rule definitions. An C is a rule name associated to possibly many conditional definitions. These definitions are instances of C. Therefore obtaining the value of a rule under a given condition involves two lookups. One to look up the rule, and one to look up the conditional definition: my $rule = rule $name; if ($rule) { my $def = $rule->def ($cond); if ($def) { return $def->location; } ... } ... when it is known that the rule and the definition being looked up exist, the above can be simplified to return rule ($name)->def ($cond)->location; # do not write this. but is better written return rrule ($name)->rdef ($cond)->location; or even return rruledef ($name, $cond)->location; The I variants of the C, C, and C methods add an extra test to ensure that the lookup succeeded, and will diagnose failures as internal errors (with a message which is much more informative than Perl's warning about calling a method on a non-object). =head2 Global variables =over 4 =cut my $_SUFFIX_RULE_PATTERN = '^(\.[a-zA-Z0-9_(){}$+@\-]+)(\.[a-zA-Z0-9_(){}$+@\-]+)' . "\$"; # Suffixes found during a run. use vars '@_suffixes'; # Same as $suffix_rules (declared below), but records only the # default rules supplied by the languages Automake supports. use vars '$_suffix_rules_default'; =item C<%dependencies> Holds the dependencies of targets which dependencies are factored. Typically, C<.PHONY> will appear in plenty of F<*.am> files, but must be output once. Arguably all pure dependencies could be subject to this factoring, but it is not unpleasant to have paragraphs in Makefile: keeping related stuff altogether. =cut use vars '%dependencies'; =item <%actions> Holds the factored actions. Tied to C<%dependencies>, i.e., filled only when keys exists in C<%dependencies>. =cut use vars '%actions'; =item <$suffix_rules> This maps the source extension for all suffix rules seen to a C whose keys are the possible output extensions. Note that this is transitively closed by construction: if we have exists $suffix_rules{$ext1}{$ext2} && exists $suffix_rules{$ext2}{$ext3} then we also have exists $suffix_rules{$ext1}{$ext3} So it's easy to check whether C<.foo> can be transformed to C<.$(OBJEXT)> by checking whether C<$suffix_rules{'.foo'}{'.$(OBJEXT)'}> exists. This will work even if transforming C<.foo> to C<.$(OBJEXT)> involves a chain of several suffix rules. The value of C<$suffix_rules{$ext1}{$ext2}> is a pair C<[ $next_sfx, $dist ]> where C<$next_sfx> is target suffix for the next rule to use to reach C<$ext2>, and C<$dist> the distance to C<$ext2'>. The content of this variable should be updated via the C function. =cut use vars '$suffix_rules'; =item C<$KNOWN_EXTENSIONS_PATTERN> Pattern that matches all know input extensions (i.e. extensions used by the languages supported by Automake). Using this pattern (instead of `\..*$') to match extensions allows Automake to support dot-less extensions. New extensions should be registered with C. =cut use vars qw ($KNOWN_EXTENSIONS_PATTERN @_known_extensions_list); $KNOWN_EXTENSIONS_PATTERN = ""; @_known_extensions_list = (); =back =head2 Error reporting functions In these functions, C<$rule> can be either a rule name, or an instance of C. =over 4 =item C Uncategorized errors about rules. =cut sub err_rule ($$;%) { msg_rule ('error', @_); } =item C Uncategorized errors about conditional rules. =cut sub err_cond_rule ($$$;%) { msg_cond_rule ('error', @_); } =item C Messages about conditional rules. =cut sub msg_cond_rule ($$$$;%) { my ($channel, $cond, $rule, $msg, %opts) = @_; my $r = ref ($rule) ? $rule : rrule ($rule); msg $channel, $r->rdef ($cond)->location, $msg, %opts; } =item C Messages about rules. =cut sub msg_rule ($$$;%) { my ($channel, $rule, $msg, %opts) = @_; my $r = ref ($rule) ? $rule : rrule ($rule); # Don't know which condition is concerned. Pick any. my $cond = $r->conditions->one_cond; msg_cond_rule ($channel, $cond, $r, $msg, %opts); } =item C<$bool = reject_rule ($rule, $error_msg)> Bail out with C<$error_msg> if a rule with name C<$rule> has been defined. Return true iff C<$rule> is defined. =cut sub reject_rule ($$) { my ($rule, $msg) = @_; if (rule ($rule)) { err_rule $rule, $msg; return 1; } return 0; } =back =head2 Administrative functions =over 4 =item C Update C<$KNOWN_EXTENSIONS_PATTERN> to recognize the extensions listed in C<@exts>. Extensions should contain a dot if needed. =cut sub accept_extensions (@) { push @_known_extensions_list, @_; $KNOWN_EXTENSIONS_PATTERN = '(?:' . join ('|', map (quotemeta, @_known_extensions_list)) . ')'; } =item C Return the list of all L instances. (I.e., all rules defined so far.) =cut use vars '%_rule_dict'; sub rules () { return values %_rule_dict; } =item C Append the C<$action> to C<$actions{$target}> taking care of special cases. =cut sub register_action ($$) { my ($target, $action) = @_; if ($actions{$target}) { $actions{$target} .= "\n$action" if $action; } else { $actions{$target} = $action; } } =item C The I function. Clears all known rules and resets some other internal data. =cut sub reset() { %_rule_dict = (); @_suffixes = (); # The first time we initialize the variables, # we save the value of $suffix_rules. if (defined $_suffix_rules_default) { $suffix_rules = $_suffix_rules_default; } else { $_suffix_rules_default = $suffix_rules; } %dependencies = ( # Texinfoing. 'dvi' => [], 'dvi-am' => [], 'pdf' => [], 'pdf-am' => [], 'ps' => [], 'ps-am' => [], 'info' => [], 'info-am' => [], 'html' => [], 'html-am' => [], # Installing/uninstalling. 'install-data-am' => [], 'install-exec-am' => [], 'uninstall-am' => [], 'install-man' => [], 'uninstall-man' => [], 'install-dvi' => [], 'install-dvi-am' => [], 'install-html' => [], 'install-html-am' => [], 'install-info' => [], 'install-info-am' => [], 'install-pdf' => [], 'install-pdf-am' => [], 'install-ps' => [], 'install-ps-am' => [], 'installcheck-am' => [], # Cleaning. 'clean-am' => [], 'mostlyclean-am' => [], 'maintainer-clean-am' => [], 'distclean-am' => [], 'clean' => [], 'mostlyclean' => [], 'maintainer-clean' => [], 'distclean' => [], # Tarballing. 'dist-all' => [], # Phonying. '.PHONY' => [], # Recursive install targets (so `make -n install' works for BSD Make). '.MAKE' => [], ); %actions = (); } =item C Register a suffix rule defined on C<$where> that transforms files ending in C<$src> into files ending in C<$dest>. This upgrades the C<$suffix_rules> variables. =cut sub register_suffix_rule ($$$) { my ($where, $src, $dest) = @_; verb "Sources ending in $src become $dest"; push @_suffixes, $src, $dest; # When transforming sources to objects, Automake uses the # %suffix_rules to move from each source extension to # `.$(OBJEXT)', not to `.o' or `.obj'. However some people # define suffix rules for `.o' or `.obj', so internally we will # consider these extensions equivalent to `.$(OBJEXT)'. We # CANNOT rewrite the target (i.e., automagically replace `.o' # and `.obj' by `.$(OBJEXT)' in the output), or warn the user # that (s)he'd better use `.$(OBJEXT)', because Automake itself # output suffix rules for `.o' or `.obj' ... $dest = '.$(OBJEXT)' if ($dest eq '.o' || $dest eq '.obj'); # Reading the comments near the declaration of $suffix_rules might # help to understand the update of $suffix_rules that follows ... # Register $dest as a possible destination from $src. # We might have the create the \hash. if (exists $suffix_rules->{$src}) { $suffix_rules->{$src}{$dest} = [ $dest, 1 ]; } else { $suffix_rules->{$src} = { $dest => [ $dest, 1 ] }; } # If we know how to transform $dest in something else, then # we know how to transform $src in that "something else". if (exists $suffix_rules->{$dest}) { for my $dest2 (keys %{$suffix_rules->{$dest}}) { my $dist = $suffix_rules->{$dest}{$dest2}[1] + 1; # Overwrite an existing $src->$dest2 path only if # the path via $dest which is shorter. if (! exists $suffix_rules->{$src}{$dest2} || $suffix_rules->{$src}{$dest2}[1] > $dist) { $suffix_rules->{$src}{$dest2} = [ $dest, $dist ]; } } } # Similarly, any extension that can be derived into $src # can be derived into the same extensions as $src can. my @dest2 = keys %{$suffix_rules->{$src}}; for my $src2 (keys %$suffix_rules) { if (exists $suffix_rules->{$src2}{$src}) { for my $dest2 (@dest2) { my $dist = $suffix_rules->{$src}{$dest2} + 1; # Overwrite an existing $src2->$dest2 path only if # the path via $src is shorter. if (! exists $suffix_rules->{$src2}{$dest2} || $suffix_rules->{$src2}{$dest2}[1] > $dist) { $suffix_rules->{$src2}{$dest2} = [ $src, $dist ]; } } } } } =item C<$count = suffix_rules_count> Return the number of suffix rules added while processing the current F (excluding predefined suffix rules). =cut sub suffix_rules_count () { return (scalar keys %$suffix_rules) - (scalar keys %$_suffix_rules_default); } =item C<@list = suffixes> Return the list of known suffixes. =cut sub suffixes () { return @_suffixes; } =item C Return the C object for the rule named C<$rulename> if defined. Return 0 otherwise. =cut sub rule ($) { my ($name) = @_; # Strip $(EXEEXT) from $name, so we can diagnose # a clash if `ctags$(EXEEXT):' is redefined after `ctags:'. $name =~ s,\$\(EXEEXT\)$,,; return $_rule_dict{$name} || 0; } =item C Return the C object for the rule named C<$rulename> if defined in condition C<$cond>. Return false if the condition or the rule does not exist. =cut sub ruledef ($$) { my ($name, $cond) = @_; my $rule = rule $name; return $rule && $rule->def ($cond); } =item C object for the variable named C<$rulename>. Abort with an internal error if the variable was not defined. The I in front of C stands for I. One should call C to assert the rule's existence. =cut sub rrule ($) { my ($name) = @_; my $r = rule $name; prog_error ("undefined rule $name\n" . &rules_dump) unless $r; return $r; } =item C Return the C object for the rule named C<$rulename> if defined in condition C<$cond>. Abort with an internal error if the condition or the rule does not exist. =cut sub rruledef ($$) { my ($name, $cond) = @_; return rrule ($name)->rdef ($cond); } # Create the variable if it does not exist. # This is used only by other functions in this package. sub _crule ($) { my ($name) = @_; my $r = rule $name; return $r if $r; return _new Automake::Rule $name; } sub _new ($$) { my ($class, $name) = @_; # Strip $(EXEEXT) from $name, so we can diagnose # a clash if `ctags$(EXEEXT):' is redefined after `ctags:'. (my $keyname = $name) =~ s,\$\(EXEEXT\)$,,; my $self = Automake::Item::new ($class, $name); $_rule_dict{$keyname} = $self; return $self; } =item C<@conds = define ($rulename, $source, $owner, $cond, $where)> Define a new rule. C<$rulename> is the list of targets. C<$source> is the filename the rule comes from. C<$owner> is the owner of the rule (C or C). C<$cond> is the C under which the rule is defined. C<$where> is the C where the rule is defined. Returns a (possibly empty) list of Cs where the rule's definition should be output. =cut sub define ($$$$$) { my ($target, $source, $owner, $cond, $where) = @_; prog_error "$where is not a reference" unless ref $where; prog_error "$cond is not a reference" unless ref $cond; # Don't even think about defining a rule in condition FALSE. return () if $cond == FALSE; # For now `foo:' will override `foo$(EXEEXT):'. This is temporary, # though, so we emit a warning. (my $noexe = $target) =~ s,\$\(EXEEXT\)$,,; my $noexerule = rule $noexe; my $tdef = $noexerule ? $noexerule->def ($cond) : undef; if ($noexe ne $target && $tdef && $noexerule->name ne $target) { # The no-exeext option enables this feature. if (! option 'no-exeext') { msg ('obsolete', $tdef->location, "deprecated feature: target `$noexe' overrides " . "`$noexe\$(EXEEXT)'\n" . "change your target to read `$noexe\$(EXEEXT)'"); msg ('obsolete', $where, "target `$target' was defined here"); } # Don't `return ()' now, as this might hide target clashes # detected below. } # A GNU make-style pattern rule has a single "%" in the target name. msg ('portability', $where, "`%'-style pattern rules are a GNU make extension") if $target =~ /^[^%]*%[^%]*$/; # Diagnose target redefinitions. if ($tdef) { my $oldowner = $tdef->owner; # Ok, it's the name target, but the name maybe different because # `foo$(EXEEXT)' and `foo' have the same key in our table. my $oldname = $tdef->name; # Don't mention true conditions in diagnostics. my $condmsg = $cond == TRUE ? '' : " in condition `" . $cond->human . "'"; if ($owner == RULE_USER) { if ($oldowner == RULE_USER) { # Ignore `%'-style pattern rules. We'd need the # dependencies to detect duplicates, and they are # already diagnosed as unportable by -Wportability. if ($target !~ /^[^%]*%[^%]*$/) { ## FIXME: Presently we can't diagnose duplicate user rules ## because we don't distinguish rules with commands ## from rules that only add dependencies. E.g., ## .PHONY: foo ## .PHONY: bar ## is legitimate. (This is phony.test.) # msg ('syntax', $where, # "redefinition of `$target'$condmsg...", partial => 1); # msg_cond_rule ('syntax', $cond, $target, # "... `$target' previously defined here"); } # Return so we don't redefine the rule in our tables, # don't check for ambiguous condition, etc. The rule # will be output anyway because &read_am_file ignore the # return code. return (); } else { # Since we parse the user Makefile.am before reading # the Automake fragments, this condition should never happen. prog_error ("user target `$target'$condmsg seen after Automake's" . " definition\nfrom " . $tdef->source); } } else # $owner == RULE_AUTOMAKE { if ($oldowner == RULE_USER) { # -am targets listed in %dependencies support a -local # variant. If the user tries to override TARGET or # TARGET-am for which there exists a -local variant, # just tell the user to use it. my $hint = 0; my $noam = $target; $noam =~ s/-am$//; if (exists $dependencies{"$noam-am"}) { $hint = "consider using $noam-local instead of $target"; } msg_cond_rule ('override', $cond, $target, "user target `$target' defined here" . "$condmsg...", partial => 1); msg ('override', $where, "... overrides Automake target `$oldname' defined here", partial => $hint); msg_cond_rule ('override', $cond, $target, $hint) if $hint; # Don't overwrite the user definition of TARGET. return (); } else # $oldowner == RULE_AUTOMAKE { # Automake should ignore redefinitions of its own # rules if they came from the same file. This makes # it easier to process a Makefile fragment several times. # However it's an error if the target is defined in many # files. E.g., the user might be using bin_PROGRAMS = ctags # which clashes with our `ctags' rule. # (It would be more accurate if we had a way to compare # the *content* of both rules. Then $targets_source would # be useless.) my $oldsource = $tdef->source; return () if $source eq $oldsource && $target eq $oldname; msg ('syntax', $where, "redefinition of `$target'$condmsg...", partial => 1); msg_cond_rule ('syntax', $cond, $target, "... `$oldname' previously defined here"); return (); } } # Never reached. prog_error ("Unreachable place reached."); } # Conditions for which the rule should be defined. my @conds = $cond; # Check ambiguous conditional definitions. my $rule = _crule $target; my ($message, $ambig_cond) = $rule->conditions->ambiguous_p ($target, $cond); if ($message) # We have an ambiguity. { if ($owner == RULE_USER) { # For user rules, just diagnose the ambiguity. msg 'syntax', $where, "$message ...", partial => 1; msg_cond_rule ('syntax', $ambig_cond, $target, "... `$target' previously defined here"); return (); } else { # FIXME: for Automake rules, we can't diagnose ambiguities yet. # The point is that Automake doesn't propagate conditions # everywhere. For instance &handle_PROGRAMS doesn't care if # bin_PROGRAMS was defined conditionally or not. # On the following input # if COND1 # foo: # ... # else # bin_PROGRAMS = foo # endif # &handle_PROGRAMS will attempt to define a `foo:' rule # in condition TRUE (which conflicts with COND1). Fixing # this in &handle_PROGRAMS and siblings seems hard: you'd # have to explain &file_contents what to do with a # condition. So for now we do our best *here*. If `foo:' # was already defined in condition COND1 and we want to define # it in condition TRUE, then define it only in condition !COND1. # (See cond14.test and cond15.test for some test cases.) @conds = $rule->not_always_defined_in_cond ($cond)->conds; # No conditions left to define the rule. # Warn, because our workaround is meaningless in this case. if (scalar @conds == 0) { msg 'syntax', $where, "$message ...", partial => 1; msg_cond_rule ('syntax', $ambig_cond, $target, "... `$target' previously defined here"); return (); } } } # Finally define this rule. for my $c (@conds) { my $def = new Automake::RuleDef ($target, '', $where->clone, $owner, $source); $rule->set ($c, $def); } # We honor inference rules with multiple targets because many # makes support this and people use it. However this is disallowed # by POSIX. We'll print a warning later. my $target_count = 0; my $inference_rule_count = 0; for my $t (split (' ', $target)) { ++$target_count; # Check if the rule is a suffix rule: either it's a rule for # two known extensions... if ($t =~ /^($KNOWN_EXTENSIONS_PATTERN)($KNOWN_EXTENSIONS_PATTERN)$/ # ...or it's a rule with unknown extensions (i.e., the rule # looks like `.foo.bar:' but `.foo' or `.bar' are not # declared in SUFFIXES and are not known language # extensions). Automake will complete SUFFIXES from # @suffixes automatically (see handle_footer). || ($t =~ /$_SUFFIX_RULE_PATTERN/o && accept_extensions($1))) { ++$inference_rule_count; register_suffix_rule ($where, $1, $2); } } # POSIX allows multiple targets before the colon, but disallows # definitions of multiple inference rules. It's also # disallowed to mix plain targets with inference rules. msg ('portability', $where, "Inference rules can have only one target before the colon (POSIX).") if $inference_rule_count > 0 && $target_count > 1; return @conds; } =item C Adds C<@deps> to the dependencies of target C<$target>. This should be used only with factored targets (those appearing in C<%dependees>). =cut sub depend ($@) { my ($category, @dependees) = @_; push (@{$dependencies{$category}}, @dependees); } =back =head1 SEE ALSO L, L, L, L. =cut 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 0707010007942a000081a40000000000000000000000014f7aa42b00000ad6000000b600010002ffffffffffffffff0000003600000000root/usr/local/share/automake-1.11/Automake/Getopt.pm# Copyright (C) 2012 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Getopt; =head1 NAME Automake::Getopt - GCS conforming parser for command line options =head1 SYNOPSIS use Automake::Getopt; =head1 DESCRIPTION Export a function C, performing parsing of command line options in conformance to the GNU Coding standards. =cut use 5.006; use strict; use warnings FATAL => 'all'; use Exporter (); use Getopt::Long (); use Automake::ChannelDefs qw/fatal/; use Carp qw/croak confess/; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT= qw/getopt/; =item C Wrapper around C, trying to conform to the GNU Coding Standards for error messages. =cut sub parse_options (%) { my %option = @_; Getopt::Long::Configure ("bundling", "pass_through"); # Unrecognized options are passed through, so GetOption can only fail # due to internal errors or misuse of options specification. Getopt::Long::GetOptions (%option) or confess "error in options specification (likely)"; if (@ARGV && $ARGV[0] =~ /^-./) { my %argopts; for my $k (keys %option) { if ($k =~ /(.*)=s$/) { map { $argopts{(length ($_) == 1) ? "-$_" : "--$_" } = 1; } (split (/\|/, $1)); } } if ($ARGV[0] eq '--') { shift @ARGV; } elsif (exists $argopts{$ARGV[0]}) { fatal ("option `$ARGV[0]' requires an argument\n" . "Try `$0 --help' for more information."); } else { fatal ("unrecognized option `$ARGV[0]'.\n" . "Try `$0 --help' for more information."); } } } =back =head1 SEE ALSO L =cut 1; # for require ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079426000081a40000000000000000000000014f7aa42b00000b68000000b600010002ffffffffffffffff0000003c00000000root/usr/local/share/automake-1.11/Automake/Configure_ac.pm# Copyright (C) 2003, 2005, 2006, 2010 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . ############################################################### # The main copy of this file is in Automake's git repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Automake::Configure_ac; use strict; use Exporter; use Automake::Channels; use Automake::ChannelDefs; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&find_configure_ac &require_configure_ac); =head1 NAME Automake::Configure_ac - Locate configure.ac or configure.in. =head1 SYNOPSIS use Automake::Configure_ac; # Try to locate configure.in or configure.ac in the current # directory. It may be absent. Complain if both files exist. my $file_name = find_configure_ac; # Likewise, but bomb out if the file does not exist. my $file_name = require_configure_ac; # Likewise, but in $dir. my $file_name = find_configure_ac ($dir); my $file_name = require_configure_ac ($dir); =cut sub find_configure_ac (;@) { my ($directory) = @_; $directory ||= '.'; my $configure_ac = File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac')); my $configure_in = File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in')); if (-f $configure_ac) { if (-f $configure_in) { msg ('unsupported', "`$configure_ac' and `$configure_in' both present.\n" . "proceeding with `$configure_ac'."); } return $configure_ac } elsif (-f $configure_in) { return $configure_in; } return $configure_ac; } sub require_configure_ac (;$) { my $res = find_configure_ac (@_); fatal "`configure.ac' or `configure.in' is required" unless -f $res; return $res } 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079436000081a40000000000000000000000014f7aa42b00001c7c000000b600010002ffffffffffffffff0000003500000000root/usr/local/share/automake-1.11/Automake/XFile.pm# Copyright (C) 2001, 2003, 2004, 2006, 2008, 2009, 2010 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Written by Akim Demaille . ############################################################### # The main copy of this file is in Automake's git repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Automake::XFile; =head1 NAME Automake::XFile - supply object methods for filehandles with error handling =head1 SYNOPSIS use Automake::XFile; $fh = new Automake::XFile; $fh->open ("< file"); # No need to check $FH: we died if open failed. print <$fh>; $fh->close; # No need to check the return value of close: we died if it failed. $fh = new Automake::XFile "> file"; # No need to check $FH: we died if new failed. print $fh "bar\n"; $fh->close; $fh = new Automake::XFile "file", "r"; # No need to check $FH: we died if new failed. defined $fh print <$fh>; undef $fh; # automatically closes the file and checks for errors. $fh = new Automake::XFile "file", O_WRONLY | O_APPEND; # No need to check $FH: we died if new failed. print $fh "corge\n"; $pos = $fh->getpos; $fh->setpos ($pos); undef $fh; # automatically closes the file and checks for errors. autoflush STDOUT 1; =head1 DESCRIPTION C inherits from C. It provides the method C returning the file name. It provides dying versions of the methods C, C (corresponding to C), C, C, C, and C. It also overrides the C and C methods to translate C<\r\n> to C<\n>. =head1 SEE ALSO L, L, L L L =head1 HISTORY Derived from IO::File.pm by Akim Demaille EFE. =cut require 5.000; use strict; use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA); use Carp; use Errno; use IO::File; use File::Basename; use Automake::ChannelDefs; use Automake::Channels qw(msg); use Automake::FileUtils; require Exporter; require DynaLoader; @ISA = qw(IO::File Exporter DynaLoader); $VERSION = "1.2"; @EXPORT = @IO::File::EXPORT; eval { # Make all Fcntl O_XXX and LOCK_XXX constants available for importing require Fcntl; my @O = grep /^(LOCK|O)_/, @Fcntl::EXPORT, @Fcntl::EXPORT_OK; Fcntl->import (@O); # first we import what we want to export push (@EXPORT, @O); }; # Used in croak error messages. my $me = basename ($0); ################################################ ## Constructor ## sub new { my $type = shift; my $class = ref $type || $type || "Automake::XFile"; my $fh = $class->SUPER::new (); if (@_) { $fh->open (@_); } $fh; } ################################################ ## Open ## sub open { my $fh = shift; my ($file) = @_; # WARNING: Gross hack: $FH is a typeglob: use its hash slot to store # the `name' of the file we are opening. See the example with # io_socket_timeout in IO::Socket for more, and read Graham's # comment in IO::Handle. ${*$fh}{'autom4te_xfile_file'} = "$file"; if (!$fh->SUPER::open (@_)) { fatal "cannot open $file: $!"; } # In case we're running under MSWindows, don't write with CRLF. # (This circumvents a bug in at least Cygwin bash where the shell # parsing fails on lines ending with the continuation character '\' # and CRLF). binmode $fh if $file =~ /^\s*>/; } ################################################ ## Close ## sub close { my $fh = shift; if (!$fh->SUPER::close (@_)) { my $file = $fh->name; Automake::FileUtils::handle_exec_errors $file unless $!; fatal "cannot close $file: $!"; } } ################################################ ## Getline ## # Some Win32/perl installations fail to translate \r\n to \n on input # so we do that here. sub getline { local $_ = $_[0]->SUPER::getline; # Perform a _global_ replacement: $_ may can contains many lines # in slurp mode ($/ = undef). s/\015\012/\n/gs if defined $_; return $_; } ################################################ ## Getlines ## sub getlines { my @res = (); my $line; push @res, $line while $line = $_[0]->getline; return @res; } ################################################ ## Name ## sub name { my $fh = shift; return ${*$fh}{'autom4te_xfile_file'}; } ################################################ ## Lock ## sub lock { my ($fh, $mode) = @_; # Cannot use @_ here. # Unless explicitly configured otherwise, Perl implements its `flock' with the # first of flock(2), fcntl(2), or lockf(3) that works. These can fail on # NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we # usually ignore these errors. If $ENV{MAKEFLAGS} suggests that a parallel # invocation of `make' has invoked the tool we serve, report all locking # failures and abort. # # On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when `lockd' is # not running. NetBSD NFS clients silently grant all locks. We do not # attempt to defend against these dangers. # # -j is for parallel BSD make, -P is for parallel HP-UX make. if (!flock ($fh, $mode)) { my $make_j = (exists $ENV{'MAKEFLAGS'} && " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*[jP]|--[jP]|---?jobs)/); my $note = "\nforgo `make -j' or use a file system that supports locks"; my $file = $fh->name; msg ($make_j ? 'fatal' : 'unsupported', "cannot lock $file with mode $mode: $!" . ($make_j ? $note : "")) if $make_j || !($!{ENOLCK} || $!{EOPNOTSUPP}); } } ################################################ ## Seek ## sub seek { my $fh = shift; # Cannot use @_ here. if (!seek ($fh, $_[0], $_[1])) { my $file = $fh->name; fatal "$me: cannot rewind $file with @_: $!"; } } ################################################ ## Truncate ## sub truncate { my ($fh, $len) = @_; if (!truncate ($fh, $len)) { my $file = $fh->name; fatal "cannot truncate $file at $len: $!"; } } 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079435000081a40000000000000000000000014f7aa42b00001067000000b600010002ffffffffffffffff0000003400000000root/usr/local/share/automake-1.11/Automake/Wrap.pm# Copyright (C) 2003, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Wrap; use strict; require Exporter; use vars '@ISA', '@EXPORT_OK'; @ISA = qw/Exporter/; @EXPORT_OK = qw/wrap makefile_wrap/; =head1 NAME Automake::Wrap - a paragraph formatter =head1 SYNOPSIS use Automake::Wrap 'wrap', 'makefile_wrap'; print wrap ($first_ident, $next_ident, $end_of_line, $max_length, @values); print makefile_wrap ("VARIABLE = ", " ", @values); =head1 DESCRIPTION This modules provide facility to format list of strings. It is comparable to Perl's L, however we can't use L because some versions will abort when some word to print exceeds the maximum length allowed. (Ticket #17141, fixed in Perl 5.8.0.) =head2 Functions =over 4 =cut # tab_length ($TXT) # ----------------- # Compute the length of TXT, counting tab characters as 8 characters. sub tab_length($) { my ($txt) = @_; my $len = length ($txt); $len += 7 * ($txt =~ tr/\t/\t/); return $len; } =item C Format C<@values> as a block of text that starts with C<$head>, followed by the strings in C<@values> separated by spaces or by C<"$eol\n$fill"> so that the length of each line never exceeds C<$max_len>. The C<$max_len> constraint is ignored for C<@values> items which are too big to fit alone one a line. The constructed paragraph is C<"\n">-terminated. =cut sub wrap($$$$@) { my ($head, $fill, $eol, $max_len, @values) = @_; my $result = $head; my $column = tab_length ($head); my $fill_len = tab_length ($fill); my $eol_len = tab_length ($eol); my $not_first_word = 0; foreach (@values) { my $len = tab_length ($_); # See if the new variable fits on this line. # (The + 1 is for the space we add in front of the value.). if ($column + $len + $eol_len + 1 > $max_len # Do not break before the first word if it does not fit on # the next line anyway. && ($not_first_word || $fill_len + $len + $eol_len + 1 <= $max_len)) { # Start a new line. $result .= "$eol\n" . $fill; $column = $fill_len; } elsif ($not_first_word) { # Add a space only if result does not already end # with a space. $_ = " $_" if $result =~ /\S\z/; ++$len; } $result .= $_; $column += $len; $not_first_word = 1; } $result .= "\n"; return $result; } =item C Format C<@values> in a way which is suitable for Fs. This is comparable to C, except C<$eol> is known to be C<" \\">, and the maximum length has been hardcoded to C<72>. A space is appended to C<$head> when this is not already the case. This can be used to format variable definitions or dependency lines. makefile_wrap ('VARIABLE =', "\t", @values); makefile_wrap ('rule:', "\t", @dependencies); =cut sub makefile_wrap ($$@) { my ($head, $fill, @values) = @_; if (@values) { $head .= ' ' if $head =~ /\S\z/; return wrap $head, $fill, " \\", 72, @values; } return "$head\n"; } 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 0707010007942b000081a40000000000000000000000014f7aa42b000011fc000000b600010002ffffffffffffffff0000003400000000root/usr/local/share/automake-1.11/Automake/Item.pm# Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Item; use strict; use Carp; use Automake::ChannelDefs; use Automake::DisjConditions; =head1 NAME Automake::Item - base class for Automake::Variable and Automake::Rule =head1 DESCRIPTION =head2 Methods =over 4 =item C Create and return an empty Item called C<$name>. =cut sub new ($$) { my ($class, $name) = @_; my $self = { name => $name, defs => {}, conds => {}, }; bless $self, $class; return $self; } =item C<$item-Ename> Return the name of C<$item>. =cut sub name ($) { my ($self) = @_; return $self->{'name'}; } =item C<$item-Edef ($cond)> Return the definition for this item in condition C<$cond>, if it exists. Return 0 otherwise. =cut sub def ($$) { # This method is called very often, so keep it small and fast. We # don't mind the extra undefined items introduced by lookup failure; # avoiding this with `exists' means doing two hash lookup on # success, and proved worse on benchmark. my $def = $_[0]->{'defs'}{$_[1]}; return defined $def && $def; } =item C<$item-Erdef ($cond)> Return the definition for this item in condition C<$cond>. Abort with an internal error if the item was not defined under this condition. The I in front of C stands for I. One should call C to assert the conditional definition's existence. =cut sub rdef ($$) { my ($self, $cond) = @_; my $d = $self->def ($cond); prog_error ("undefined condition `" . $cond->human . "' for `" . $self->name . "'\n" . $self->dump) unless $d; return $d; } =item C<$item-Eset ($cond, $def)> Add a new definition to an existing item. =cut sub set ($$$) { my ($self, $cond, $def) = @_; $self->{'defs'}{$cond} = $def; $self->{'conds'}{$cond} = $cond; } =item C<$var-Econditions> Return an L describing the conditions that that an item is defined in. These are all the conditions for which is would be safe to call C. =cut sub conditions ($) { my ($self) = @_; prog_error ("self is not a reference") unless ref $self; return new Automake::DisjConditions (values %{$self->{'conds'}}); } =item C<@missing_conds = $var-Enot_always_defined_in_cond ($cond)> Check whether C<$var> is always defined for condition C<$cond>. Return a list of conditions where the definition is missing. For instance, given if COND1 if COND2 A = foo D = d1 else A = bar D = d2 endif else D = d3 endif if COND3 A = baz B = mumble endif C = mumble we should have (we display result as conditional strings in this illustration, but we really return DisjConditions objects): var ('A')->not_always_defined_in_cond ('COND1_TRUE COND2_TRUE') => () var ('A')->not_always_defined_in_cond ('COND1_TRUE') => () var ('A')->not_always_defined_in_cond ('TRUE') => ("COND1_FALSE COND3_FALSE") var ('B')->not_always_defined_in_cond ('COND1_TRUE') => ("COND1_TRUE COND3_FALSE") var ('C')->not_always_defined_in_cond ('COND1_TRUE') => () var ('D')->not_always_defined_in_cond ('TRUE') => () var ('Z')->not_always_defined_in_cond ('TRUE') => ("TRUE") =cut sub not_always_defined_in_cond ($$) { my ($self, $cond) = @_; # Compute the subconditions where $var isn't defined. return $self->conditions ->sub_conditions ($cond) ->invert ->multiply ($cond); } 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 0707010007942c000081a40000000000000000000000014f7aa42b00000990000000b600010002ffffffffffffffff0000003700000000root/usr/local/share/automake-1.11/Automake/ItemDef.pm# Copyright (C) 2003, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::ItemDef; use strict; use Carp; =head1 NAME Automake::ItemDef - base class for Automake::VarDef and Automake::RuleDef =head1 DESCRIPTION =head2 Methods =over 4 =item C Create a new Makefile-item definition. C<$comment> is any comment preceding the definition. (Because Automake reorders items in the output, it also tries to carry comments around.) C<$location> is the place where the definition occurred, it should be an instance of L. C<$owner> specifies who owns the rule. =cut sub new ($$$$) { my ($class, $comment, $location, $owner) = @_; my $self = { comment => $comment, location => $location, owner => $owner, }; bless $self, $class; return $self; } =item C<$def-Ecomment> =item C<$def-Elocation> =item C<$def-Eowner> Accessors to the various constituents of an C. See the documentation of C's arguments for a description of these. =cut sub comment ($) { my ($self) = @_; return $self->{'comment'}; } sub location ($) { my ($self) = @_; return $self->{'location'}; } sub owner ($) { my ($self) = @_; return $self->{'owner'}; } =head1 SEE ALSO L, and L. =cut 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079434000081a40000000000000000000000014f7aa42b00001102000000b600010002ffffffffffffffff0000003700000000root/usr/local/share/automake-1.11/Automake/Version.pm# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Version; use strict; use Automake::ChannelDefs; =head1 NAME Automake::Version - version comparison =head1 SYNOPSIS use Automake::Version; print "Version $version is older than required version $required\n" if Automake::Version::check ($version, $required); =head1 DESCRIPTION This module provides support for comparing versions string as they are used in Automake. A version is a string that looks like C where C, C, and C are digits, C is a character, and C any alphanumeric word. Usually, C is used to label alpha releases or intermediate snapshots, C is used for git branches or patched releases, and C is used for bug fixes releases on the C branch. For the purpose of ordering, C<1.4> is the same as C<1.4.0>, but C<1.4g> is the same as C<1.4.99g>. The C identifier is ignored in the ordering, except when it looks like C<-pMINOR[ALPHA]>: some versions were labeled like C<1.4-p3a>, this is the same as an alpha release labeled C<1.4.3a>. Yes, it's horrible, but Automake did not support two-dot versions in the past. =head2 FUNCTIONS =over 4 =item C Split the string C<$version> into the corresponding C<(MAJOR, MINOR, MICRO, ALPHA, FORK)> tuple. For instance C<'1.4g'> would be split into C<(1, 4, 99, 'g', '')>. Return C<()> on error. =cut sub split ($) { my ($ver) = @_; # Special case for versions like 1.4-p2a. if ($ver =~ /^(\d+)\.(\d+)(?:-p(\d+)([a-z]+)?)$/) { return ($1, $2, $3, $4 || '', ''); } # Common case. elsif ($ver =~ /^(\d+)\.(\d+)(?:\.(\d+))?([a-z])?(?:-([A-Za-z0-9]+))?$/) { return ($1, $2, $3 || (defined $4 ? 99 : 0), $4 || '', $5 || ''); } return (); } =item C Compare two version tuples, as returned by C. Return 1, 0, or -1, if C is found to be respectively greater than, equal to, or less than C. =cut sub compare (\@\@) { my @l = @{$_[0]}; my @r = @{$_[1]}; for my $i (0, 1, 2) { return 1 if ($l[$i] > $r[$i]); return -1 if ($l[$i] < $r[$i]); } for my $i (3, 4) { return 1 if ($l[$i] gt $r[$i]); return -1 if ($l[$i] lt $r[$i]); } return 0; } =item C Handles the logic of requiring a version number in Automake. C<$VERSION> should be Automake's version, while C<$REQUIRED> is the version required by the user input. Return 0 if the required version is satisfied, 1 otherwise. =cut sub check ($$) { my ($version, $required) = @_; my @version = Automake::Version::split ($version); my @required = Automake::Version::split ($required); prog_error "version is incorrect: $version" if $#version == -1; # This should not happen, because process_option_list and split_version # use similar regexes. prog_error "required version is incorrect: $required" if $#required == -1; # If we require 3.4n-foo then we require something # >= 3.4n, with the `foo' fork identifier. return 1 if ($required[4] ne '' && $required[4] ne $version[4]); return 0 > compare (@version, @required); } 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079428000081a40000000000000000000000014f7aa42b00002787000000b600010002ffffffffffffffff0000003900000000root/usr/local/share/automake-1.11/Automake/FileUtils.pm# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . ############################################################### # The main copy of this file is in Automake's git repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Automake::FileUtils; =head1 NAME Automake::FileUtils - handling files =head1 SYNOPSIS use Automake::FileUtils =head1 DESCRIPTION This perl module provides various general purpose file handling functions. =cut use strict; use Exporter; use File::stat; use IO::File; use Automake::Channels; use Automake::ChannelDefs; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&open_quote &contents &find_file &mtime &update_file &up_to_date_p &xsystem &xsystem_hint &xqx &dir_has_case_matching_file &reset_dir_cache &set_dir_cache_file); =item C Quote C<$file_name> for open. =cut # $FILE_NAME # open_quote ($FILE_NAME) # ----------------------- # If the string $S is a well-behaved file name, simply return it. # If it starts with white space, prepend `./', if it ends with # white space, add `\0'. Return the new string. sub open_quote($) { my ($s) = @_; if ($s =~ m/^\s/) { $s = "./$s"; } if ($s =~ m/\s$/) { $s = "$s\0"; } return $s; } =item C Return the first path for a C<$file_name> in the Cs. We match exactly the behavior of GNU M4: first look in the current directory (which includes the case of absolute file names), and then, if the file name is not absolute, look in C<@include>. If the file is flagged as optional (ends with C), then return undef if absent, otherwise exit with error. =cut # $FILE_NAME # find_file ($FILE_NAME, @INCLUDE) # -------------------------------- sub find_file ($@) { use File::Spec; my ($file_name, @include) = @_; my $optional = 0; $optional = 1 if $file_name =~ s/\?$//; return File::Spec->canonpath ($file_name) if -e $file_name; if (!File::Spec->file_name_is_absolute ($file_name)) { foreach my $path (@include) { return File::Spec->canonpath (File::Spec->catfile ($path, $file_name)) if -e File::Spec->catfile ($path, $file_name) } } fatal "$file_name: no such file or directory" unless $optional; return undef; } =item C Return the mtime of C<$file>. Missing files, or C<-> standing for C or C are ``obsolete'', i.e., as old as possible. =cut # $MTIME # MTIME ($FILE) # ------------- sub mtime ($) { my ($file) = @_; return 0 if $file eq '-' || ! -f $file; my $stat = stat ($file) or fatal "cannot stat $file: $!"; return $stat->mtime; } =item C Rename C<$from> as C<$to>, preserving C<$to> timestamp if it has not changed, unless C<$force> is true (defaults to false). Recognize C<$to> = C<-> standing for C. C<$from> is always removed/renamed. =cut # &update_file ($FROM, $TO; $FORCE) # --------------------------------- sub update_file ($$;$) { my ($from, $to, $force) = @_; $force = 0 unless defined $force; my $SIMPLE_BACKUP_SUFFIX = $ENV{'SIMPLE_BACKUP_SUFFIX'} || '~'; use File::Compare; use File::Copy; if ($to eq '-') { my $in = new IO::File ("< " . open_quote ($from)); my $out = new IO::File (">-"); while ($_ = $in->getline) { print $out $_; } $in->close; unlink ($from) || fatal "cannot remove $from: $!"; return; } if (!$force && -f "$to" && compare ("$from", "$to") == 0) { # File didn't change, so don't update its mod time. msg 'note', "`$to' is unchanged"; unlink ($from) or fatal "cannot remove $from: $!"; return } if (-f "$to") { # Back up and install the new one. move ("$to", "$to$SIMPLE_BACKUP_SUFFIX") or fatal "cannot backup $to: $!"; move ("$from", "$to") or fatal "cannot rename $from as $to: $!"; msg 'note', "`$to' is updated"; } else { move ("$from", "$to") or fatal "cannot rename $from as $to: $!"; msg 'note', "`$to' is created"; } } =item C Is C<$file> more recent than C<@dep>? =cut # $BOOLEAN # &up_to_date_p ($FILE, @DEP) # --------------------------- sub up_to_date_p ($@) { my ($file, @dep) = @_; my $mtime = mtime ($file); foreach my $dep (@dep) { if ($mtime < mtime ($dep)) { verb "up_to_date ($file): outdated: $dep"; return 0; } } verb "up_to_date ($file): up to date"; return 1; } =item C Display an error message for C<$command>, based on the content of C<$?> and C<$!>. Be quiet if the command exited normally with C<$expected_exit_code>. If C<$hint> is given, display that as well if the command failed to run at all. =cut sub handle_exec_errors ($;$$) { my ($command, $expected, $hint) = @_; $expected = 0 unless defined $expected; if (defined $hint) { $hint = "\n" . $hint; } else { $hint = ''; } $command = (split (' ', $command))[0]; if ($!) { fatal "failed to run $command: $!" . $hint; } else { use POSIX qw (WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG); if (WIFEXITED ($?)) { my $status = WEXITSTATUS ($?); # Propagate exit codes. fatal ('', "$command failed with exit status: $status", exit_code => $status) unless $status == $expected; } elsif (WIFSIGNALED ($?)) { my $signal = WTERMSIG ($?); fatal "$command terminated by signal: $signal"; } else { fatal "$command exited abnormally"; } } } =item C Same as C (but in scalar context), but fails on errors. =cut # xqx ($COMMAND) # -------------- sub xqx ($) { my ($command) = @_; verb "running: $command"; $! = 0; my $res = `$command`; handle_exec_errors $command if $?; return $res; } =item C Same as C, but fails on errors, and reports the C<@argv> in verbose mode. =cut sub xsystem (@) { my (@command) = @_; verb "running: @command"; $! = 0; handle_exec_errors "@command" if system @command; } =item C Same as C, but allows to pass a hint that will be displayed in case the command failed to run at all. =cut sub xsystem_hint (@) { my ($hint, @command) = @_; verb "running: @command"; $! = 0; handle_exec_errors "@command", 0, $hint if system @command; } =item C Return the contents of C<$file_name>. =cut # contents ($FILE_NAME) # --------------------- sub contents ($) { my ($file) = @_; verb "reading $file"; local $/; # Turn on slurp-mode. my $f = new Automake::XFile "< " . open_quote ($file); my $contents = $f->getline; $f->close; return $contents; } =item C Return true iff $DIR contains a file name that matches $FILE_NAME case insensitively. We need to be cautious on case-insensitive case-preserving file systems (e.g. Mac OS X's HFS+). On such systems C<-f 'Foo'> and C<-f 'foO'> answer the same thing. Hence if a package distributes its own F file, but has no F file, automake would still try to distribute F (because it thinks it exists) in addition to F, although it is impossible for these two files to be in the same directory (the two file names designate the same file). =cut use vars '%_directory_cache'; sub dir_has_case_matching_file ($$) { # Note that print File::Spec->case_tolerant returns 0 even on MacOS # X (with Perl v5.8.1-RC3 at least), so do not try to shortcut this # function using that. my ($dirname, $file_name) = @_; return 0 unless -f "$dirname/$file_name"; # The file appears to exist, however it might be a mirage if the # system is case insensitive. Let's browse the directory and check # whether the file is really in. We maintain a cache of directories # so Automake doesn't spend all its time reading the same directory # again and again. if (!exists $_directory_cache{$dirname}) { error "failed to open directory `$dirname'" unless opendir (DIR, $dirname); $_directory_cache{$dirname} = { map { $_ => 1 } readdir (DIR) }; closedir (DIR); } return exists $_directory_cache{$dirname}{$file_name}; } =item C Clear C's cache for C<$dirname>. =cut sub reset_dir_cache ($) { delete $_directory_cache{$_[0]}; } =item C State that C<$dirname> contains C<$file_name> now. =cut sub set_dir_cache_file ($$) { my ($dirname, $file_name) = @_; $_directory_cache{$dirname}{$file_name} = 1 if exists $_directory_cache{$dirname}; } 1; # for require ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079427000081a40000000000000000000000014f7aa42b000039d6000000b600010002ffffffffffffffff0000003e00000000root/usr/local/share/automake-1.11/Automake/DisjConditions.pm# Copyright (C) 1997, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::DisjConditions; use Carp; use strict; use Automake::Condition qw/TRUE FALSE/; =head1 NAME Automake::DisjConditions - record a disjunction of Conditions =head1 SYNOPSIS use Automake::Condition; use Automake::DisjConditions; # Create a Condition to represent "COND1 and not COND2". my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE"; # Create a Condition to represent "not COND3". my $other = new Automake::Condition "COND3_FALSE"; # Create a DisjConditions to represent # "(COND1 and not COND2) or (not COND3)" my $set = new Automake::DisjConditions $cond, $other; # Return the list of Conditions involved in $set. my @conds = $set->conds; # Return one of the Condition involved in $set. my $cond = $set->one_cond; # Return true iff $set is always true (i.e. its subconditions # cover all cases). if ($set->true) { ... } # Return false iff $set is always false (i.e. is empty, or contains # only false conditions). if ($set->false) { ... } # Return a string representing the DisjConditions. # "COND1_TRUE COND2_FALSE | COND3_FALSE" my $str = $set->string; # Return a human readable string representing the DisjConditions. # "(COND1 and !COND2) or (!COND3)" my $str = $set->human; # Merge (OR) several DisjConditions. my $all = $set->merge($set2, $set3, ...) # Invert a DisjConditions, i.e., create a new DisjConditions # that complements $set. my $inv = $set->invert; # Multiply two DisjConditions. my $prod = $set1->multiply ($set2); # Return the subconditions of a DisjConditions with respect to # a Condition. See the description for a real example. my $subconds = $set->sub_conditions ($cond); # Check whether a new definition in condition $cond would be # ambiguous w.r.t. existing definitions in $set. ($msg, $ambig_cond) = $set->ambiguous_p ($what, $cond); =head1 DESCRIPTION A C is a disjunction of Cs. In Automake they are used to represent the conditions into which Makefile variables and Makefile rules are defined. If the variable C is defined as if COND1 if COND2 VAR = value1 endif endif if !COND3 if COND4 VAR = value2 endif endif then it will be associated a C created with the following statement. new Automake::DisjConditions (new Automake::Condition ("COND1_TRUE", "COND2_TRUE"), new Automake::Condition ("COND3_FALSE", "COND4_TRUE")); As you can see, a C is made from a list of Cs. Since C is a disjunction, and C is a conjunction, the above can be read as follows. (COND1 and COND2) or ((not COND3) and COND4) That's indeed the condition in which C has a value. Like C objects, a C object is unique with respect to its conditions. Two C objects created for the same set of conditions will have the same address. This makes it easy to compare Cs: just compare the references. =head2 Methods =over 4 =item C<$set = new Automake::DisjConditions [@conds]> Create a C object from the list of C objects passed in arguments. If the C<@conds> list is empty, the C is assumed to be false. As explained previously, the reference (object) returned is unique with respect to C<@conds>. For this purpose, duplicate elements are ignored. =cut # Keys in this hash are DisjConditions strings. Values are the # associated object DisjConditions. This is used by `new' to reuse # DisjConditions objects with identical conditions. use vars '%_disjcondition_singletons'; sub new ($;@) { my ($class, @conds) = @_; my @filtered_conds = (); for my $cond (@conds) { confess "`$cond' isn't a reference" unless ref $cond; confess "`$cond' isn't an Automake::Condition" unless $cond->isa ("Automake::Condition"); # This is a disjunction of conditions, so we drop # false conditions. We'll always treat an "empty" # DisjConditions as false for this reason. next if $cond->false; push @filtered_conds, $cond; } my $string; if (@filtered_conds) { @filtered_conds = sort { $a->string cmp $b->string } @filtered_conds; $string = join (' | ', map { $_->string } @filtered_conds); } else { $string = 'FALSE'; } # Return any existing identical DisjConditions. my $me = $_disjcondition_singletons{$string}; return $me if $me; # Else, create a new DisjConditions. # Store conditions as keys AND as values, because blessed # objects are converted to strings when used as keys (so # at least we still have the value when we need to call # a method). my %h = map {$_ => $_} @filtered_conds; my $self = { hash => \%h, string => $string, conds => \@filtered_conds, }; bless $self, $class; $_disjcondition_singletons{$string} = $self; return $self; } =item C Internal special subroutine to fix up the self hashes in C<%_disjcondition_singletons> upon thread creation. C is invoked automatically with ithreads from Perl 5.7.2 or later, so if you use this module with earlier versions of Perl, it is not thread-safe. =cut sub CLONE { foreach my $self (values %_disjcondition_singletons) { my %h = map { $_ => $_ } @{$self->{'conds'}}; $self->{'hash'} = \%h; } } =item C<@conds = $set-Econds> Return the list of C objects involved in C<$set>. =cut sub conds ($ ) { my ($self) = @_; return @{$self->{'conds'}}; } =item C<$cond = $set-Eone_cond> Return one C object involved in C<$set>. =cut sub one_cond ($) { my ($self) = @_; return (%{$self->{'hash'}},)[1]; } =item C<$et = $set-Efalse> Return 1 iff the C object is always false (i.e., if it is empty, or if it contains only false Cs). Return 0 otherwise. =cut sub false ($ ) { my ($self) = @_; return 0 == keys %{$self->{'hash'}}; } =item C<$et = $set-Etrue> Return 1 iff the C object is always true (i.e. covers all conditions). Return 0 otherwise. =cut sub true ($ ) { my ($self) = @_; return $self->invert->false; } =item C<$str = $set-Estring> Build a string which denotes the C. =cut sub string ($ ) { my ($self) = @_; return $self->{'string'}; } =item C<$cond-Ehuman> Build a human readable string which denotes the C. =cut sub human ($ ) { my ($self) = @_; return $self->{'human'} if defined $self->{'human'}; my $res = ''; if ($self->false) { $res = 'FALSE'; } else { my @c = $self->conds; if (1 == @c) { $res = $c[0]->human; } else { $res = '(' . join (') or (', map { $_->human } $self->conds) . ')'; } } $self->{'human'} = $res; return $res; } =item C<$newcond = $cond-Emerge (@otherconds)> Return a new C which is the disjunction of C<$cond> and C<@otherconds>. Items in C<@otherconds> can be @Cs or C. =cut sub merge ($@) { my ($self, @otherconds) = @_; new Automake::DisjConditions ( map { $_->isa ("Automake::DisjConditions") ? $_->conds : $_ } ($self, @otherconds)); } =item C<$prod = $set1-Emultiply ($set2)> Multiply two conditional sets. my $set1 = new Automake::DisjConditions (new Automake::Condition ("A_TRUE"), new Automake::Condition ("B_TRUE")); my $set2 = new Automake::DisjConditions (new Automake::Condition ("C_FALSE"), new Automake::Condition ("D_FALSE")); C<$set1-Emultiply ($set2)> will return new Automake::DisjConditions (new Automake::Condition ("A_TRUE", "C_FALSE"), new Automake::Condition ("B_TRUE", "C_FALSE"),; new Automake::Condition ("A_TRUE", "D_FALSE"), new Automake::Condition ("B_TRUE", "D_FALSE")); The argument can also be a C. =cut # Same as multiply() but take a list of Conditionals as second argument. # We use this in invert(). sub _multiply ($@) { my ($self, @set) = @_; my @res = map { $_->multiply (@set) } $self->conds; return new Automake::DisjConditions (Automake::Condition::reduce_or @res); } sub multiply ($$) { my ($self, $set) = @_; return $self->_multiply ($set) if $set->isa('Automake::Condition'); return $self->_multiply ($set->conds); } =item C<$inv = $set-Einvert> Invert a C. Return a C which is true when C<$set> is false, and vice-versa. my $set = new Automake::DisjConditions (new Automake::Condition ("A_TRUE", "B_TRUE"), new Automake::Condition ("A_FALSE", "B_FALSE")); Calling C<$set-Einvert> will return the following C. new Automake::DisjConditions (new Automake::Condition ("A_TRUE", "B_FALSE"), new Automake::Condition ("A_FALSE", "B_TRUE")); We implement the inversion by a product-of-sums to sum-of-products conversion using repeated multiplications. Because of the way we implement multiplication, the result of inversion is in canonical prime implicant form. =cut sub invert($ ) { my ($self) = @_; return $self->{'invert'} if defined $self->{'invert'}; # The invert of an empty DisjConditions is TRUE. my $res = new Automake::DisjConditions TRUE; # !((a.b)+(c.d)+(e.f)) # = (!a+!b).(!c+!d).(!e+!f) # We develop this into a sum of product iteratively, starting from TRUE: # 1) TRUE # 2) TRUE.!a + TRUE.!b # 3) TRUE.!a.!c + TRUE.!b.!c + TRUE.!a.!d + TRUE.!b.!d # 4) TRUE.!a.!c.!e + TRUE.!b.!c.!e + TRUE.!a.!d.!e + TRUE.!b.!d.!e # + TRUE.!a.!c.!f + TRUE.!b.!c.!f + TRUE.!a.!d.!f + TRUE.!b.!d.!f foreach my $cond ($self->conds) { $res = $res->_multiply ($cond->not); } # Cache result. $self->{'invert'} = $res; # It's tempting to also set $res->{'invert'} to $self, but that # is a bad idea as $self hasn't been normalized in any way. # (Different inputs can produce the same inverted set.) return $res; } =item C<$self-Esimplify> Return a C which is a simplified canonical form of C<$self>. This canonical form contains only prime implicants, but it can contain non-essential prime implicants. =cut sub simplify ($) { my ($self) = @_; return $self->invert->invert; } =item C<$self-Esub_conditions ($cond)> Return the subconditions of C<$self> that contains C<$cond>, with C<$cond> stripped. More formally, return C<$res> such that C<$res-Emultiply ($cond) == $self-Emultiply ($cond)> and C<$res> does not mention any of the variables in C<$cond>. For instance, consider: my $a = new Automake::DisjConditions (new Automake::Condition ("A_TRUE", "B_TRUE"), new Automake::Condition ("A_TRUE", "C_FALSE"), new Automake::Condition ("A_TRUE", "B_FALSE", "C_TRUE"), new Automake::Condition ("A_FALSE")); my $b = new Automake::DisjConditions (new Automake::Condition ("A_TRUE", "B_FALSE")); Calling C<$a-Esub_conditions ($b)> will return the following C. new Automake::DisjConditions (new Automake::Condition ("C_FALSE"), # From A_TRUE C_FALSE new Automake::Condition ("C_TRUE")); # From A_TRUE B_FALSE C_TRUE" =cut sub sub_conditions ($$) { my ($self, $subcond) = @_; # Make $subcond blindingly apparent in the DisjConditions. # For instance `$b->multiply($a->conds)' (from the POD example) is: # (new Automake::Condition ("FALSE"), # new Automake::Condition ("A_TRUE", "B_FALSE", "C_FALSE"), # new Automake::Condition ("A_TRUE", "B_FALSE", "C_TRUE"), # new Automake::Condition ("FALSE")) my @prodconds = $subcond->multiply ($self->conds); # Now, strip $subcond from the remaining (i.e., non-false) Conditions. my @res = map { $_->false ? () : $_->strip ($subcond) } @prodconds; return new Automake::DisjConditions @res; } =item C<($string, $ambig_cond) = $condset-Eambiguous_p ($what, $cond)> Check for an ambiguous condition. Return an error message and the other condition involved if we have an ambiguity. Return an empty string and FALSE otherwise. C<$what> is the name of the thing being defined, to use in the error message. C<$cond> is the C under which it is being defined. C<$condset> is the C under which it had already been defined. =cut sub ambiguous_p ($$$) { my ($self, $var, $cond) = @_; # Note that these rules don't consider the following # example as ambiguous. # # if COND1 # FOO = foo # endif # if COND2 # FOO = bar # endif # # It's up to the user to not define COND1 and COND2 # simultaneously. return ("$var multiply defined in condition " . $cond->human, $cond) if exists $self->{'hash'}{$cond}; foreach my $vcond ($self->conds) { return ("$var was already defined in condition " . $vcond->human . ", which includes condition ". $cond->human, $vcond) if $vcond->true_when ($cond); return ("$var was already defined in condition " . $vcond->human . ", which is included in condition " . $cond->human, $vcond) if $cond->true_when ($vcond); } return ('', FALSE); } =head1 SEE ALSO L. =head1 HISTORY Cs and supporting code were added to Automake 1.1o by Ian Lance Taylor in 1997. Since then it has been improved by Tom Tromey , Richard Boulton , Raja R Harinath , Akim Demaille , Pavel Roskin , and Alexandre Duret-Lutz . =cut 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079433000081a40000000000000000000000014f7aa42b0000b4f1000000b600010002ffffffffffffffff0000003800000000root/usr/local/share/automake-1.11/Automake/Variable.pm# Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . package Automake::Variable; use strict; use Carp; use Automake::Channels; use Automake::ChannelDefs; use Automake::Configure_ac; use Automake::Item; use Automake::VarDef; use Automake::Condition qw (TRUE FALSE); use Automake::DisjConditions; use Automake::General 'uniq'; use Automake::Wrap 'makefile_wrap'; require Exporter; use vars '@ISA', '@EXPORT', '@EXPORT_OK'; @ISA = qw/Automake::Item Exporter/; @EXPORT = qw (err_var msg_var msg_cond_var reject_var var rvar vardef rvardef variables scan_variable_expansions check_variable_expansions variable_delete variables_dump set_seen require_variables variable_value output_variables transform_variable_recursively); =head1 NAME Automake::Variable - support for variable definitions =head1 SYNOPSIS use Automake::Variable; use Automake::VarDef; # Defining a variable. Automake::Variable::define($varname, $owner, $type, $cond, $value, $comment, $where, $pretty) # Looking up a variable. my $var = var $varname; if ($var) { ... } # Looking up a variable that is assumed to exist. my $var = rvar $varname; # The list of conditions where $var has been defined. # ($var->conditions is an Automake::DisjConditions, # $var->conditions->conds is a list of Automake::Condition.) my @conds = $var->conditions->conds # Access to the definition in Condition $cond. # $def is an Automake::VarDef. my $def = $var->def ($cond); if ($def) { ... } # When the conditional definition is assumed to exist, use my $def = $var->rdef ($cond); =head1 DESCRIPTION This package provides support for Makefile variable definitions. An C is a variable name associated to possibly many conditional definitions. These definitions are instances of C. Therefore obtaining the value of a variable under a given condition involves two lookups. One to look up the variable, and one to look up the conditional definition: my $var = var $name; if ($var) { my $def = $var->def ($cond); if ($def) { return $def->value; } ... } ... When it is known that the variable and the definition being looked up exist, the above can be simplified to return var ($name)->def ($cond)->value; # Do not write this. but is better written return rvar ($name)->rdef ($cond)->value; or even return rvardef ($name, $cond)->value; The I variants of the C, C, and C methods add an extra test to ensure that the lookup succeeded, and will diagnose failures as internal errors (with a message which is much more informative than Perl's warning about calling a method on a non-object). =cut my $_VARIABLE_CHARACTERS = '[.A-Za-z0-9_@]+'; my $_VARIABLE_PATTERN = '^' . $_VARIABLE_CHARACTERS . "\$"; my $_VARIABLE_RECURSIVE_PATTERN = '^([.A-Za-z0-9_@]|\$[({]' . $_VARIABLE_CHARACTERS . '[})]?)+' . "\$"; # The order in which variables should be output. (May contain # duplicates -- only the first occurrence matters.) my @_var_order; # This keeps track of all variables defined by &_gen_varname. # $_gen_varname{$base} is a hash for all variables defined with # prefix `$base'. Values stored in this hash are the variable names. # Keys have the form "(COND1)VAL1(COND2)VAL2..." where VAL1 and VAL2 # are the values of the variable for condition COND1 and COND2. my %_gen_varname = (); # $_gen_varname_n{$base} is the number of variables generated by # _gen_varname() for $base. This is not the same as keys # %{$_gen_varname{$base}} because %_gen_varname may also contain # variables not generated by _gen_varname. my %_gen_varname_n = (); # Declare the macros that define known variables, so we can # hint the user if she try to use one of these variables. # Macros accessible via aclocal. my %_am_macro_for_var = ( ANSI2KNR => 'AM_C_PROTOTYPES', CCAS => 'AM_PROG_AS', CCASFLAGS => 'AM_PROG_AS', EMACS => 'AM_PATH_LISPDIR', GCJ => 'AM_PROG_GCJ', LEX => 'AM_PROG_LEX', LIBTOOL => 'LT_INIT', lispdir => 'AM_PATH_LISPDIR', pkgpyexecdir => 'AM_PATH_PYTHON', pkgpythondir => 'AM_PATH_PYTHON', pyexecdir => 'AM_PATH_PYTHON', PYTHON => 'AM_PATH_PYTHON', pythondir => 'AM_PATH_PYTHON', U => 'AM_C_PROTOTYPES', ); # Macros shipped with Autoconf. my %_ac_macro_for_var = ( ALLOCA => 'AC_FUNC_ALLOCA', CC => 'AC_PROG_CC', CFLAGS => 'AC_PROG_CC', CXX => 'AC_PROG_CXX', CXXFLAGS => 'AC_PROG_CXX', F77 => 'AC_PROG_F77', FFLAGS => 'AC_PROG_F77', FC => 'AC_PROG_FC', FCFLAGS => 'AC_PROG_FC', OBJC => 'AC_PROG_OBJC', OBJCFLAGS => 'AC_PROG_OBJC', RANLIB => 'AC_PROG_RANLIB', UPC => 'AM_PROG_UPC', UPCFLAGS => 'AM_PROG_UPC', YACC => 'AC_PROG_YACC', ); # The name of the configure.ac file. my $configure_ac; # Variables that can be overridden without complaint from -Woverride my %_silent_variable_override = (AM_MAKEINFOHTMLFLAGS => 1, AR => 1, ARFLAGS => 1, DEJATOOL => 1, JAVAC => 1, JAVAROOT => 1); # Count of helper variables used to implement conditional '+='. my $_appendvar; # Each call to C gets an # unique label. This is used to detect recursively defined variables. my $_traversal = 0; =head2 Error reporting functions In these functions, C<$var> can be either a variable name, or an instance of C. =over 4 =item C Uncategorized errors about variables. =cut sub err_var ($$;%) { msg_var ('error', @_); } =item C Messages about conditional variable. =cut sub msg_cond_var ($$$$;%) { my ($channel, $cond, $var, $msg, %opts) = @_; my $v = ref ($var) ? $var : rvar ($var); msg $channel, $v->rdef ($cond)->location, $msg, %opts; } =item C Messages about variables. =cut sub msg_var ($$$;%) { my ($channel, $var, $msg, %opts) = @_; my $v = ref ($var) ? $var : rvar ($var); # Don't know which condition is concerned. Pick any. my $cond = $v->conditions->one_cond; msg_cond_var $channel, $cond, $v, $msg, %opts; } =item C<$bool = reject_var ($varname, $error_msg)> Bail out with C<$error_msg> if a variable with name C<$varname> has been defined. Return true iff C<$varname> is defined. =cut sub reject_var ($$) { my ($var, $msg) = @_; my $v = var ($var); if ($v) { err_var $v, $msg; return 1; } return 0; } =back =head2 Administrative functions =over 4 =item C Declare a function to be called whenever a variable named C<$varname> is defined or redefined. C<$fun> should take two arguments: C<$type> and C<$value>. When type is C<''> or <':'>, C<$value> is the value being assigned to C<$varname>. When C<$type> is C<'+'>, C<$value> is the value being appended to C<$varname>. =cut use vars '%_hooks'; sub hook ($$) { my ($var, $fun) = @_; $_hooks{$var} = $fun; } =item C Returns the list of all L instances. (I.e., all variables defined so far.) If C<$suffix> is supplied, return only the L instances that ends with C<_$suffix>. =cut use vars '%_variable_dict', '%_primary_dict'; sub variables (;$) { my ($suffix) = @_; if ($suffix) { if (exists $_primary_dict{$suffix}) { return values %{$_primary_dict{$suffix}}; } else { return (); } } else { return values %_variable_dict; } } =item C The I function. Clears all know variables and reset some other internal data. =cut sub reset () { %_variable_dict = (); %_primary_dict = (); $_appendvar = 0; @_var_order = (); %_gen_varname = (); %_gen_varname_n = (); $_traversal = 0; } =item C Return the C object for the variable named C<$varname> if defined. Return 0 otherwise. =cut sub var ($) { my ($name) = @_; return $_variable_dict{$name} if exists $_variable_dict{$name}; return 0; } =item C Return the C object for the variable named C<$varname> if defined in condition C<$cond>. Return false if the condition or the variable does not exist. =cut sub vardef ($$) { my ($name, $cond) = @_; my $var = var $name; return $var && $var->def ($cond); } # Create the variable if it does not exist. # This is used only by other functions in this package. sub _cvar ($) { my ($name) = @_; my $v = var $name; return $v if $v; return _new Automake::Variable $name; } =item C Return the C object for the variable named C<$varname>. Abort with an internal error if the variable was not defined. The I in front of C stands for I. One should call C to assert the variable's existence. =cut sub rvar ($) { my ($name) = @_; my $v = var $name; prog_error ("undefined variable $name\n" . &variables_dump) unless $v; return $v; } =item C Return the C object for the variable named C<$varname> if defined in condition C<$cond>. Abort with an internal error if the condition or the variable does not exist. =cut sub rvardef ($$) { my ($name, $cond) = @_; return rvar ($name)->rdef ($cond); } =back =head2 Methods C is a subclass of C. See that package for inherited methods. Here are the methods specific to the C instances. Use the C function, described latter, to create such objects. =over 4 =cut # Create Automake::Variable objects. This is used # only in this file. Other users should use # the "define" function. sub _new ($$) { my ($class, $name) = @_; my $self = Automake::Item::new ($class, $name); $self->{'scanned'} = 0; $self->{'last-append'} = []; # helper variable for last conditional append. $_variable_dict{$name} = $self; if ($name =~ /_([[:alnum:]]+)$/) { $_primary_dict{$1}{$name} = $self; } return $self; } # _check_ambiguous_condition ($SELF, $COND, $WHERE) # ------------------------------------------------- # Check for an ambiguous conditional. This is called when a variable # is being defined conditionally. If we already know about a # definition that is true under the same conditions, then we have an # ambiguity. sub _check_ambiguous_condition ($$$) { my ($self, $cond, $where) = @_; my $var = $self->name; my ($message, $ambig_cond) = $self->conditions->ambiguous_p ($var, $cond); # We allow silent variables to be overridden silently, # by either silent or non-silent variables. my $def = $self->def ($ambig_cond); if ($message && !($def && $def->pretty == VAR_SILENT)) { msg 'syntax', $where, "$message ...", partial => 1; msg_var ('syntax', $var, "... `$var' previously defined here"); verb ($self->dump); } } =item C<$bool = $var-Echeck_defined_unconditionally ([$parent, $parent_cond])> Warn if the variable is conditionally defined. C<$parent> is the name of the parent variable, and C<$parent_cond> the condition of the parent definition. These two variables are used to display diagnostics. =cut sub check_defined_unconditionally ($;$$) { my ($self, $parent, $parent_cond) = @_; if (!$self->conditions->true) { if ($parent) { msg_cond_var ('unsupported', $parent_cond, $parent, "automake does not support conditional definition of " . $self->name . " in $parent"); } else { msg_var ('unsupported', $self, "automake does not support " . $self->name . " being defined conditionally"); } } } =item C<$str = $var-Eoutput ([@conds])> Format all the definitions of C<$var> if C<@cond> is not specified, else only that corresponding to C<@cond>. =cut sub output ($@) { my ($self, @conds) = @_; @conds = $self->conditions->conds unless @conds; my $res = ''; my $name = $self->name; foreach my $cond (@conds) { my $def = $self->def ($cond); prog_error ("unknown condition `" . $cond->human . "' for `" . $self->name . "'") unless $def; next if $def->pretty == VAR_SILENT; $res .= $def->comment; my $val = $def->raw_value; my $equals = $def->type eq ':' ? ':=' : '='; my $str = $cond->subst_string; if ($def->pretty == VAR_ASIS) { my $output_var = "$name $equals $val"; $output_var =~ s/^/$str/meg; $res .= "$output_var\n"; } elsif ($def->pretty == VAR_PRETTY) { # Suppress escaped new lines. &makefile_wrap will # add them back, maybe at other places. $val =~ s/\\$//mg; my $wrap = makefile_wrap ("$str$name $equals", "$str\t", split (' ', $val)); # If the last line of the definition is made only of # @substitutions@, append an empty variable to make sure it # cannot be substituted as a blank line (that would confuse # HP-UX Make). $wrap = makefile_wrap ("$str$name $equals", "$str\t", split (' ', $val), '$(am__empty)') if $wrap =~ /\n(\s*@\w+@)+\s*$/; $res .= $wrap; } else # ($def->pretty == VAR_SORTED) { # Suppress escaped new lines. &makefile_wrap will # add them back, maybe at other places. $val =~ s/\\$//mg; $res .= makefile_wrap ("$str$name $equals", "$str\t", sort (split (' ' , $val))); } } return $res; } =item C<@values = $var-Evalue_as_list ($cond, [$parent, $parent_cond])> Get the value of C<$var> as a list, given a specified condition, without recursing through any subvariables. C<$cond> is the condition of interest. C<$var> does not need to be defined for condition C<$cond> exactly, but it needs to be defined for at most one condition implied by C<$cond>. C<$parent> and C<$parent_cond> designate the name and the condition of the parent variable, i.e., the variable in which C<$var> is being expanded. These are used in diagnostics. For example, if C is defined as "C" in condition C, calling Cvalue_as_list (TRUE)> will return C<("foo", "$(B)", "bar")>. =cut sub value_as_list ($$;$$) { my ($self, $cond, $parent, $parent_cond) = @_; my @result; # Get value for given condition my $onceflag; foreach my $vcond ($self->conditions->conds) { if ($vcond->true_when ($cond)) { # If there is more than one definitions of $var matching # $cond then we are in trouble: tell the user we need a # paddle. Continue by merging results from all conditions, # although it doesn't make much sense. $self->check_defined_unconditionally ($parent, $parent_cond) if $onceflag; $onceflag = 1; my $val = $self->rdef ($vcond)->value; push @result, split (' ', $val); } } return @result; } =item C<@values = $var-Evalue_as_list_recursive ([%options])> Return the contents of C<$var> as a list, split on whitespace. This will recursively follow C<$(...)> and C<${...}> inclusions. It preserves C<@...@> substitutions. C<%options> is a list of option for C (see this method). The most useful is C: $var->value_as_list_recursive (cond_filter => $cond) will return the contents of C<$var> and any subvariable in all conditions implied by C<$cond>. C<%options> can also carry options specific to C. Presently, the only such option is C 1> which instructs C to return a list of C<[$location, @values]> pairs. =cut sub value_as_list_recursive ($;%) { my ($var, %options) = @_; return $var->traverse_recursively (# Construct [$location, $value] pairs if requested. sub { my ($var, $val, $cond, $full_cond) = @_; return [$var->rdef ($cond)->location, $val] if $options{'location'}; return $val; }, # Collect results. sub { my ($var, $parent_cond, @allresults) = @_; return map { my ($cond, @vals) = @$_; @vals } @allresults; }, %options); } =item C<$bool = $var-Ehas_conditional_contents> Return 1 if C<$var> or one of its subvariable was conditionally defined. Return 0 otherwise. =cut sub has_conditional_contents ($) { my ($self) = @_; # Traverse the variable recursively until we # find a variable defined conditionally. # Use `die' to abort the traversal, and pass it `$full_cond' # to we can find easily whether the `eval' block aborted # because we found a condition, or for some other error. eval { $self->traverse_recursively (sub { my ($subvar, $val, $cond, $full_cond) = @_; die $full_cond if ! $full_cond->true; return (); }, sub { return (); }); }; if ($@) { return 1 if ref ($@) && $@->isa ("Automake::Condition"); # Propagate other errors. die; } return 0; } =item C<$string = $var-Edump> Return a string describing all we know about C<$var>. For debugging. =cut sub dump ($) { my ($self) = @_; my $text = $self->name . ": \n {\n"; foreach my $vcond ($self->conditions->conds) { $text .= " " . $vcond->human . " => " . $self->rdef ($vcond)->dump; } $text .= " }\n"; return $text; } =back =head2 Utility functions =over 4 =item C<@list = scan_variable_expansions ($text)> Return the list of variable names expanded in C<$text>. Note that unlike some other functions, C<$text> is not split on spaces before we check for subvariables. =cut sub scan_variable_expansions ($) { my ($text) = @_; my @result = (); # Strip comments. $text =~ s/#.*$//; # Record each use of ${stuff} or $(stuff) that does not follow a $. while ($text =~ /(? Check variable expansions in C<$text> and warn about any name that does not conform to POSIX. C<$where> is the location of C<$text> for the error message. =cut sub check_variable_expansions ($$) { my ($text, $where) = @_; # Catch expansion of variables whose name does not conform to POSIX. foreach my $var (scan_variable_expansions ($text)) { if ($var !~ /$_VARIABLE_PATTERN/o) { # If the variable name contains a space, it's likely # to be a GNU make extension (such as $(addsuffix ...)). # Mention this in the diagnostic. my $gnuext = ""; $gnuext = "\n(probably a GNU make extension)" if $var =~ / /; # Accept recursive variable expansions if so desired # (we hope they are rather portable in practice). if ($var =~ /$_VARIABLE_RECURSIVE_PATTERN/o) { msg ('portability-recursive', $where, "$var: non-POSIX recursive variable expansion$gnuext"); } else { msg ('portability', $where, "$var: non-POSIX variable name$gnuext"); } } } } =item C Define or append to a new variable. C<$varname>: the name of the variable being defined. C<$owner>: owner of the variable (one of C, C, or C, defined by L). Variables can be overridden, provided the new owner is not weaker (C < C < C). C<$type>: the type of the assignment (C<''> for C, C<':'> for C, and C<'+'> for C<'FOO += bar'>). C<$cond>: the C in which C<$var> is being defined. C<$value>: the value assigned to C<$var> in condition C<$cond>. C<$comment>: any comment (C<'# bla.'>) associated with the assignment. Comments from C<+=> assignments stack with comments from the last C<=> assignment. C<$where>: the C of the assignment. C<$pretty>: whether C<$value> should be pretty printed (one of C, C, C, or C, defined by by L). C<$pretty> applies only to real assignments. I.e., it does not apply to a C<+=> assignment (except when part of it is being done as a conditional C<=> assignment). This function will all run any hook registered with the C function. =cut sub define ($$$$$$$$) { my ($var, $owner, $type, $cond, $value, $comment, $where, $pretty) = @_; prog_error "$cond is not a reference" unless ref $cond; prog_error "$where is not a reference" unless ref $where; prog_error "pretty argument missing" unless defined $pretty && ($pretty == VAR_ASIS || $pretty == VAR_PRETTY || $pretty == VAR_SILENT || $pretty == VAR_SORTED); error $where, "bad characters in variable name `$var'" if $var !~ /$_VARIABLE_PATTERN/o; # `:='-style assignments are not acknowledged by POSIX. Moreover it # has multiple meanings. In GNU make or BSD make it means "assign # with immediate expansion", while in OSF make it is used for # conditional assignments. msg ('portability', $where, "`:='-style assignments are not portable") if $type eq ':'; check_variable_expansions ($value, $where); # If there's a comment, make sure it is \n-terminated. if ($comment) { chomp $comment; $comment .= "\n"; } else { $comment = ''; } my $self = _cvar $var; my $def = $self->def ($cond); my $new_var = $def ? 0 : 1; # Additional checks for Automake definitions. if ($owner == VAR_AUTOMAKE && ! $new_var) { # An Automake variable must be consistently defined with the same # sign by Automake. if ($def->type ne $type && $def->owner == VAR_AUTOMAKE) { error ($def->location, "Automake variable `$var' was set with `" . $def->type . "=' here...", partial => 1); error ($where, "... and is now set with `$type=' here."); prog_error ("Automake variable assignments should be consistently\n" . "defined with the same sign."); } # If Automake tries to override a value specified by the user, # just don't let it do. if ($def->owner != VAR_AUTOMAKE) { if (! exists $_silent_variable_override{$var}) { my $condmsg = ($cond == TRUE ? '' : (" in condition `" . $cond->human . "'")); msg_cond_var ('override', $cond, $var, "user variable `$var' defined here$condmsg...", partial => 1); msg ('override', $where, "... overrides Automake variable `$var' defined here"); } verb ("refusing to override the user definition of:\n" . $self->dump ."with `" . $cond->human . "' => `$value'"); return; } } # Differentiate assignment types. # 1. append (+=) to a variable defined for current condition if ($type eq '+' && ! $new_var) { $def->append ($value, $comment); $self->{'last-append'} = []; # Only increase owners. A VAR_CONFIGURE variable augmented in a # Makefile.am becomes a VAR_MAKEFILE variable. $def->set_owner ($owner, $where->clone) if $owner > $def->owner; } # 2. append (+=) to a variable defined for *another* condition elsif ($type eq '+' && ! $self->conditions->false) { # * Generally, $cond is not TRUE. For instance: # FOO = foo # if COND # FOO += bar # endif # In this case, we declare an helper variable conditionally, # and append it to FOO: # FOO = foo $(am__append_1) # @COND_TRUE@am__append_1 = bar # Of course if FOO is defined under several conditions, we add # $(am__append_1) to each definitions. # # * If $cond is TRUE, we don't need the helper variable. E.g., in # if COND1 # FOO = foo1 # else # FOO = foo2 # endif # FOO += bar # we can add bar directly to all definition of FOO, and output # @COND_TRUE@FOO = foo1 bar # @COND_FALSE@FOO = foo2 bar my $lastappend = []; # Do we need an helper variable? if ($cond != TRUE) { # Can we reuse the helper variable created for the previous # append? (We cannot reuse older helper variables because # we must preserve the order of items appended to the # variable.) my $condstr = $cond->string; my $key = "$var:$condstr"; my ($appendvar, $appendvarcond) = @{$self->{'last-append'}}; if ($appendvar && $condstr eq $appendvarcond) { # Yes, let's simply append to it. $var = $appendvar; $owner = VAR_AUTOMAKE; $self = var ($var); $def = $self->rdef ($cond); $new_var = 0; } else { # No, create it. my $num = ++$_appendvar; my $hvar = "am__append_$num"; $lastappend = [$hvar, $condstr]; &define ($hvar, VAR_AUTOMAKE, '+', $cond, $value, $comment, $where, $pretty); # Now HVAR is to be added to VAR. $comment = ''; $value = "\$($hvar)"; } } # Add VALUE to all definitions of SELF. foreach my $vcond ($self->conditions->conds) { # We have a bit of error detection to do here. # This: # if COND1 # X = Y # endif # X += Z # should be rejected because X is not defined for all conditions # where `+=' applies. my $undef_cond = $self->not_always_defined_in_cond ($cond); if (! $undef_cond->false) { error ($where, "Cannot apply `+=' because `$var' is not defined " . "in\nthe following conditions:\n " . join ("\n ", map { $_->human } $undef_cond->conds) . "\nEither define `$var' in these conditions," . " or use\n`+=' in the same conditions as" . " the definitions."); } else { &define ($var, $owner, '+', $vcond, $value, $comment, $where, $pretty); } } $self->{'last-append'} = $lastappend; } # 3. first assignment (=, :=, or +=) else { # There must be no previous value unless the user is redefining # an Automake variable or an AC_SUBST variable for an existing # condition. _check_ambiguous_condition ($self, $cond, $where) unless (!$new_var && (($def->owner == VAR_AUTOMAKE && $owner != VAR_AUTOMAKE) || $def->owner == VAR_CONFIGURE)); # Never decrease an owner. $owner = $def->owner if ! $new_var && $owner < $def->owner; # Assignments to a macro set its location. We don't adjust # locations for `+='. Ideally I suppose we would associate # line numbers with random bits of text. $def = new Automake::VarDef ($var, $value, $comment, $where->clone, $type, $owner, $pretty); $self->set ($cond, $def); push @_var_order, $var; } # Call any defined hook. This helps to update some internal state # *while* parsing the file. For instance the handling of SUFFIXES # requires this (see var_SUFFIXES_trigger). &{$_hooks{$var}}($type, $value) if exists $_hooks{$var}; } =item C Forget about C<$varname> under the conditions C<@conds>, or completely if C<@conds> is empty. =cut sub variable_delete ($@) { my ($var, @conds) = @_; if (!@conds) { delete $_variable_dict{$var}; } else { for my $cond (@conds) { delete $_variable_dict{$var}{'defs'}{$cond}; } } if ($var =~ /_([[:alnum:]]+)$/) { delete $_primary_dict{$1}{$var}; } } =item C<$str = variables_dump> Return a string describing all we know about all variables. For debugging. =cut sub variables_dump () { my $text = "All variables:\n{\n"; foreach my $var (sort { $a->name cmp $b->name } variables) { $text .= $var->dump; } $text .= "}\n"; return $text; } =item C<$var = set_seen ($varname)> =item C<$var = $var-Eset_seen> Mark all definitions of this variable as examined, if the variable exists. See L. Return the C object if the variable exists, or 0 otherwise (i.e., as the C function). =cut sub set_seen ($) { my ($self) = @_; $self = ref $self ? $self : var $self; return 0 unless $self; for my $c ($self->conditions->conds) { $self->rdef ($c)->set_seen; } return $self; } =item C<$count = require_variables ($where, $reason, $cond, @variables)> Make sure that each supplied variable is defined in C<$cond>. Otherwise, issue a warning showing C<$reason> (C<$reason> should be the reason why these variables are required, for instance C<'option foo used'>). If we know which macro can define this variable, hint the user. Return the number of undefined variables. =cut sub require_variables ($$$@) { my ($where, $reason, $cond, @vars) = @_; my $res = 0; $reason .= ' but ' unless $reason eq ''; $configure_ac = find_configure_ac unless defined $configure_ac; VARIABLE: foreach my $var (@vars) { # Nothing to do if the variable exists. next VARIABLE if vardef ($var, $cond); my $text = "$reason`$var' is undefined\n"; my $v = var $var; if ($v) { my $undef_cond = $v->not_always_defined_in_cond ($cond); next VARIABLE if $undef_cond->false; $text .= ("in the following conditions:\n " . join ("\n ", map { $_->human } $undef_cond->conds) . "\n"); } ++$res; if (exists $_am_macro_for_var{$var}) { my $mac = $_am_macro_for_var{$var}; $text .= " The usual way to define `$var' is to add " . "`$mac'\n to `$configure_ac' and run `aclocal' and " . "`autoconf' again."; # aclocal will not warn about undefined macros unless it # starts with AM_. $text .= "\n If `$mac' is in `$configure_ac', make sure\n" . " its definition is in aclocal's search path." unless $mac =~ /^AM_/; } elsif (exists $_ac_macro_for_var{$var}) { $text .= " The usual way to define `$var' is to add " . "`$_ac_macro_for_var{$var}'\n to `$configure_ac' and " . "run `autoconf' again."; } error $where, $text, uniq_scope => US_GLOBAL; } return $res; } =item C<$count = $var->requires_variables ($reason, @variables)> Same as C, but a method of Automake::Variable. C<@variables> should be defined in the same conditions as C<$var> is defined. =cut sub requires_variables ($$@) { my ($var, $reason, @args) = @_; my $res = 0; for my $cond ($var->conditions->conds) { $res += require_variables ($var->rdef ($cond)->location, $reason, $cond, @args); } return $res; } =item C Get the C value of a variable, warn if the variable is conditionally defined. C<$var> can be either a variable name or a C instance (this allows calls such as C<$var-Evariable_value>). =cut sub variable_value ($) { my ($var) = @_; my $v = ref ($var) ? $var : var ($var); return () unless $v; $v->check_defined_unconditionally; my $d = $v->def (TRUE); return $d ? $d->value : ""; } =item C<$str = output_variables> Format definitions for all variables. =cut sub output_variables () { my $res = ''; # We output variables it in the same order in which they were # defined (skipping duplicates). my @vars = uniq @_var_order; # Output all the Automake variables. If the user changed one, # then it is now marked as VAR_CONFIGURE or VAR_MAKEFILE. foreach my $var (@vars) { my $v = rvar $var; foreach my $cond ($v->conditions->conds) { $res .= $v->output ($cond) if $v->rdef ($cond)->owner == VAR_AUTOMAKE; } } # Now dump the user variables that were defined. foreach my $var (@vars) { my $v = rvar $var; foreach my $cond ($v->conditions->conds) { $res .= $v->output ($cond) if $v->rdef ($cond)->owner != VAR_AUTOMAKE; } } return $res; } =item C<$var-Etraverse_recursively (&fun_item, &fun_collect, [cond_filter =E $cond_filter], [inner_expand =E 1], [skip_ac_subst =E 1])> Split the value of the Automake::Variable C<$var> on space, and traverse its components recursively. If C<$cond_filter> is an C, process any conditions which are true when C<$cond_filter> is true. Otherwise, process all conditions. We distinguish two kinds of items in the content of C<$var>. Terms that look like C<$(foo)> or C<${foo}> are subvariables and cause recursion. Other terms are assumed to be filenames. Each time a filename is encountered, C<&fun_item> is called with the following arguments: ($var, -- the Automake::Variable we are currently traversing $val, -- the item (i.e., filename) to process $cond, -- the Condition for the $var definition we are examining (ignoring the recursion context) $full_cond) -- the full Condition, taking into account conditions inherited from parent variables during recursion If C is set, variable references occurring in filename (as in C<$(BASE).ext>) are expanded before the filename is passed to C<&fun_item>. If C is set, Autoconf @substitutions@ will be skipped, i.e., C<&fun_item> will never be called for them. C<&fun_item> may return a list of items, they will be passed to C<&fun_store> later on. Define C<&fun_item> or @<&fun_store> as C when they serve no purpose. Once all items of a variable have been processed, the result (of the calls to C<&fun_items>, or of recursive traversals of subvariables) are passed to C<&fun_collect>. C<&fun_collect> receives three arguments: ($var, -- the variable being traversed $parent_cond, -- the Condition inherited from parent variables during recursion @condlist) -- a list of [$cond, @results] pairs where each $cond appear only once, and @result are all the results for this condition. Typically you should do C<$cond->merge ($parent_cond)> to recompute the C<$full_cond> associated to C<@result>. C<&fun_collect> may return a list of items, that will be used as the result of C (the top-level, or its recursive calls). =cut # Contains a stack of `from' and `to' parts of variable # substitutions currently in force. my @_substfroms; my @_substtos; sub traverse_recursively ($&&;%) { ++$_traversal; @_substfroms = (); @_substtos = (); my ($var, $fun_item, $fun_collect, %options) = @_; my $cond_filter = $options{'cond_filter'}; my $inner_expand = $options{'inner_expand'}; my $skip_ac_subst = $options{'skip_ac_subst'}; return $var->_do_recursive_traversal ($var, $fun_item, $fun_collect, $cond_filter, TRUE, $inner_expand, $skip_ac_subst) } # The guts of Automake::Variable::traverse_recursively. sub _do_recursive_traversal ($$&&$$$$) { my ($var, $parent, $fun_item, $fun_collect, $cond_filter, $parent_cond, $inner_expand, $skip_ac_subst) = @_; $var->set_seen; if ($var->{'scanned'} == $_traversal) { err_var $var, "variable `" . $var->name() . "' recursively defined"; return (); } $var->{'scanned'} = $_traversal; my @allresults = (); my $cond_once = 0; foreach my $cond ($var->conditions->conds) { if (ref $cond_filter) { # Ignore conditions that don't match $cond_filter. next if ! $cond->true_when ($cond_filter); # If we found out several definitions of $var # match $cond_filter then we are in trouble. # Tell the user we don't support this. $var->check_defined_unconditionally ($parent, $parent_cond) if $cond_once; $cond_once = 1; } my @result = (); my $full_cond = $cond->merge ($parent_cond); my @to_process = $var->value_as_list ($cond, $parent, $parent_cond); while (@to_process) { my $val = shift @to_process; # If $val is a variable (i.e. ${foo} or $(bar), not a filename), # handle the sub variable recursively. # (Backslashes before `}' and `)' within brackets are here to # please Emacs's indentation.) if ($val =~ /^\$\{([^\}]*)\}$/ || $val =~ /^\$\(([^\)]*)\)$/) { my $subvarname = $1; # If the user uses a losing variable name, just ignore it. # This isn't ideal, but people have requested it. next if ($subvarname =~ /\@.*\@/); # See if the variable is actually a substitution reference my ($from, $to); # This handles substitution references like ${foo:.a=.b}. if ($subvarname =~ /^([^:]*):([^=]*)=(.*)$/o) { $subvarname = $1; $to = $3; $from = quotemeta $2; } my $subvar = var ($subvarname); # Don't recurse into undefined variables. next unless $subvar; push @_substfroms, $from; push @_substtos, $to; my @res = $subvar->_do_recursive_traversal ($parent, $fun_item, $fun_collect, $cond_filter, $full_cond, $inner_expand, $skip_ac_subst); push (@result, @res); pop @_substfroms; pop @_substtos; next; } # Try to expand variable references inside filenames such as # `$(NAME).txt'. We do not handle `:.foo=.bar' # substitutions, but it would make little sense to use this # here anyway. elsif ($inner_expand && ($val =~ /\$\{([^\}]*)\}/ || $val =~ /\$\(([^\)]*)\)/)) { my $subvarname = $1; my $subvar = var $subvarname; if ($subvar) { # Replace the reference by its value, and reschedule # for expansion. foreach my $c ($subvar->conditions->conds) { if (ref $cond_filter) { # Ignore conditions that don't match $cond_filter. next if ! $c->true_when ($cond_filter); # If we found out several definitions of $var # match $cond_filter then we are in trouble. # Tell the user we don't support this. $subvar->check_defined_unconditionally ($var, $full_cond) if $cond_once; $cond_once = 1; } my $subval = $subvar->rdef ($c)->value; $val =~ s/\$\{$subvarname\}/$subval/g; $val =~ s/\$\($subvarname\)/$subval/g; unshift @to_process, split (' ', $val); } next; } # We do not know any variable with this name. Fall through # to filename processing. } elsif ($skip_ac_subst && $val =~ /^\@.+\@$/) { next; } if ($fun_item) # $var is a filename we must process { my $substnum=$#_substfroms; while ($substnum >= 0) { $val =~ s/$_substfroms[$substnum]$/$_substtos[$substnum]/ if defined $_substfroms[$substnum]; $substnum -= 1; } # Make sure you update the doc of # Automake::Variable::traverse_recursively # if you change the prototype of &fun_item. my @transformed = &$fun_item ($var, $val, $cond, $full_cond); push (@result, @transformed); } } push (@allresults, [$cond, @result]) if @result; } # We only care about _recursive_ variable definitions. The user # is free to use the same variable several times in the same definition. $var->{'scanned'} = -1; return () unless $fun_collect; # Make sure you update the doc of Automake::Variable::traverse_recursively # if you change the prototype of &fun_collect. return &$fun_collect ($var, $parent_cond, @allresults); } # _hash_varname ($VAR) # -------------------- # Compute the key associated $VAR in %_gen_varname. # See _gen_varname() below. sub _hash_varname ($) { my ($var) = @_; my $key = ''; foreach my $cond ($var->conditions->conds) { my @values = $var->value_as_list ($cond); $key .= "($cond)@values"; } return $key; } # _hash_values (@VALUES) # ---------------------- # Hash @VALUES for %_gen_varname. @VALUES should be a list # of pairs: ([$cond, @values], [$cond, @values], ...). # See _gen_varname() below. sub _hash_values (@) { my $key = ''; foreach my $pair (@_) { my ($cond, @values) = @$pair; $key .= "($cond)@values"; } return $key; } # ($VARNAME, $GENERATED) # _gen_varname ($BASE, @DEFINITIONS) # ---------------------------------- # Return a variable name starting with $BASE, that will be # used to store definitions @DEFINITIONS. # @DEFINITIONS is a list of pair [$COND, @OBJECTS]. # # If we already have a $BASE-variable containing @DEFINITIONS, reuse # it and set $GENERATED to 0. Otherwise construct a new name and set # $GENERATED to 1. # # This way, we avoid combinatorial explosion of the generated # variables. Especially, in a Makefile such as: # # | if FOO1 # | A1=1 # | endif # | # | if FOO2 # | A2=2 # | endif # | # | ... # | # | if FOON # | AN=N # | endif # | # | B=$(A1) $(A2) ... $(AN) # | # | c_SOURCES=$(B) # | d_SOURCES=$(B) # # The generated c_OBJECTS and d_OBJECTS will share the same variable # definitions. # # This setup can be the case of a testsuite containing lots (>100) of # small C programs, all testing the same set of source files. sub _gen_varname ($@) { my $base = shift; my $key = _hash_values @_; return ($_gen_varname{$base}{$key}, 0) if exists $_gen_varname{$base}{$key}; my $num = 1 + ($_gen_varname_n{$base} || 0); $_gen_varname_n{$base} = $num; my $name = "${base}_${num}"; $_gen_varname{$base}{$key} = $name; return ($name, 1); } =item C<$resvar = transform_variable_recursively ($var, $resvar, $base, $nodefine, $where, &fun_item, [%options])> =item C<$resvar = $var-Etransform_variable_recursively ($resvar, $base, $nodefine, $where, &fun_item, [%options])> Traverse C<$var> recursively, and create a C<$resvar> variable in which each filename in C<$var> have been transformed using C<&fun_item>. (C<$var> may be a variable name in the first syntax. It must be an C otherwise.) Helper variables (corresponding to sub-variables of C<$var>) are created as needed, using C<$base> as prefix. Arguments are: $var source variable to traverse $resvar resulting variable to define $base prefix to use when naming subvariables of $resvar $nodefine if true, traverse $var but do not define any variable (this assumes &fun_item has some useful side-effect) $where context into which variable definitions are done &fun_item a transformation function -- see the documentation of &fun_item in Automake::Variable::traverse_recursively. This returns the string C<"\$($RESVAR)">. C<%options> is a list of options to pass to C (see this method). =cut sub transform_variable_recursively ($$$$$&;%) { my ($var, $resvar, $base, $nodefine, $where, $fun_item, %options) = @_; $var = ref $var ? $var : rvar $var; my $res = $var->traverse_recursively ($fun_item, # The code that defines the variable holding the result # of the recursive transformation of a subvariable. sub { my ($subvar, $parent_cond, @allresults) = @_; # If no definition is required, return anything: the result is # not expected to be used, only the side effect of $fun_item # should matter. return 'report-me' if $nodefine; # Cache $subvar, so that we reuse it if @allresults is the same. my $key = _hash_varname $subvar; $_gen_varname{$base}{$key} = $subvar->name; # Find a name for the variable, unless this is the top-variable # for which we want to use $resvar. my ($varname, $generated) = ($var != $subvar) ? _gen_varname ($base, @allresults) : ($resvar, 1); # Define the variable if we are not reusing a previously # defined variable. At the top-level, we can also avoid redefining # the variable if it already contains the same values. if ($generated && !($varname eq $var->name && $key eq _hash_values @allresults)) { # If the new variable is the source variable, we assume # we are trying to override a user variable. Delete # the old variable first. variable_delete ($varname) if $varname eq $var->name; # Define an empty variable in condition TRUE if there is no # result. @allresults = ([TRUE, '']) unless @allresults; # Define the rewritten variable in all conditions not # already covered by user definitions. foreach my $pair (@allresults) { my ($cond, @result) = @$pair; my $var = var $varname; my @conds = ($var ? $var->not_always_defined_in_cond ($cond)->conds : $cond); foreach (@conds) { define ($varname, VAR_AUTOMAKE, '', $_, "@result", '', $where, VAR_PRETTY); } } } set_seen $varname; return "\$($varname)"; }, %options); return $res; } =back =head1 SEE ALSO L, L, L, L. =cut 1; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: 07070100079423000081a40000000000000000000000014f7aa42b000050d5000000b600010002ffffffffffffffff0000003800000000root/usr/local/share/automake-1.11/Automake/Channels.pm# Copyright (C) 2002, 2004, 2006, 2008, 2010 Free Software Foundation, # Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . ############################################################### # The main copy of this file is in Automake's git repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Automake::Channels; =head1 NAME Automake::Channels - support functions for error and warning management =head1 SYNOPSIS use Automake::Channels; # Register a channel to output warnings about unused variables. register_channel 'unused', type => 'warning'; # Register a channel for system errors. register_channel 'system', type => 'error', exit_code => 4; # Output a message on channel 'unused'. msg 'unused', "$file:$line", "unused variable `$var'"; # Make the 'unused' channel silent. setup_channel 'unused', silent => 1; # Turn on all channels of type 'warning'. setup_channel_type 'warning', silent => 0; # Redirect all channels to push messages on a Thread::Queue using # the specified serialization key. setup_channel_queue $queue, $key; # Output a message pending in a Thread::Queue. pop_channel_queue $queue; # Treat all warnings as errors. $warnings_are_errors = 1; # Exit with the greatest exit code encountered so far. exit $exit_code; =head1 DESCRIPTION This perl module provides support functions for handling diagnostic channels in programs. Channels can be registered to convey fatal, error, warning, or debug messages. Each channel has various options (e.g. is the channel silent, should duplicate messages be removed, etc.) that can also be overridden on a per-message basis. =cut use 5.005; use strict; use Exporter; use Carp; use File::Basename; use vars qw (@ISA @EXPORT %channels $me); @ISA = qw (Exporter); @EXPORT = qw ($exit_code $warnings_are_errors &reset_local_duplicates &reset_global_duplicates ®ister_channel &msg &exists_channel &channel_type &setup_channel &setup_channel_type &dup_channel_setup &drop_channel_setup &buffer_messages &flush_messages &setup_channel_queue &pop_channel_queue US_GLOBAL US_LOCAL UP_NONE UP_TEXT UP_LOC_TEXT); $me = basename $0; =head2 Global Variables =over 4 =item C<$exit_code> The greatest exit code seen so far. C<$exit_code> is updated from the C options of C and C channels. =cut use vars qw ($exit_code); $exit_code = 0; =item C<$warnings_are_errors> Set this variable to 1 if warning messages should be treated as errors (i.e. if they should update C<$exit_code>). =cut use vars qw ($warnings_are_errors); $warnings_are_errors = 0; =back =head2 Constants =over 4 =item C, C, C Possible values for the C options. This selects the part of the message that should be considered when filtering out duplicates. If C is used, the location and the explanation message are used for filtering. If C is used, only the explanation message is used (so the same message will be filtered out if it appears at different locations). C means that duplicate messages should be output. =cut use constant UP_NONE => 0; use constant UP_TEXT => 1; use constant UP_LOC_TEXT => 2; =item C, C Possible values for the C options. Use C for error messages that should be printed only once during the execution of the program, C for message that should be printed only once per file. (Actually, C does not do this now when files are changed, it relies on you calling C when this happens.) =cut # possible values for uniq_scope use constant US_LOCAL => 0; use constant US_GLOBAL => 1; =back =head2 Options Channels accept the options described below. These options can be passed as a hash to the C, C, and C functions. The possible keys, with their default value are: =over =item C 'warning'> The type of the channel. One of C<'debug'>, C<'warning'>, C<'error'>, or C<'fatal'>. Fatal messages abort the program when they are output. Error messages update the exit status. Debug and warning messages are harmless, except that warnings can be treated as errors of C<$warnings_are_errors> is set. =item C 1> The value to update C<$exit_code> with when a fatal or error message is emitted. C<$exit_code> is also updated for warnings output when C<$warnings_are_errors> is set. =item C \*STDERR> The file where the error should be output. =item C 0> Whether the channel should be silent. Use this do disable a category of warning, for instance. =item C 1> Whether, with multi-threaded execution, the message should be queued for ordered output. =item C UP_LOC_TEXT> The part of the message subject to duplicate filtering. See the documentation for the C, C, and C constants above. C can also be set to an arbitrary string that will be used instead of the message when considering duplicates. =item C US_LOCAL> The scope of duplicate filtering. See the documentation for the C, and C constants above. =item C
''> A string to prepend to each message emitted through this channel. =item C