updated third party tool: bison-2.1

removed unused dirs to be lighter


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14430 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2005-10-19 15:07:54 +00:00
parent 94752292dd
commit 6ded062819
299 changed files with 15635 additions and 108574 deletions
+248 -391
View File
@@ -1,8 +1,8 @@
Notes on the Free Translation Project Notes on the Free Translation Project
************************************* *************************************
Free software is going international! The Free Translation Project is Free software is going international! The Free Translation Project
a way to get maintainers of free software, translators, and users all is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages. together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages. A few packages already provide translations for their messages.
@@ -25,7 +25,7 @@ related to internationalization, you should tell about the version of
Quick configuration advice Quick configuration advice
========================== ==========================
If you want to exploit the full power of internationalization, you If you want to exploit the full power of internationalization, you
should configure it using should configure it using
./configure --with-included-gettext ./configure --with-included-gettext
@@ -48,10 +48,10 @@ included `libintl'.
INSTALL Matters INSTALL Matters
=============== ===============
Some packages are "localizable" when properly installed; the programs Some packages are "localizable" when properly installed; the
they contain can be made to speak your own native language. Most such programs they contain can be made to speak your own native language.
packages use GNU `gettext'. Other packages have their own ways to Most such packages use GNU `gettext'. Other packages have their own
internationalization, predating GNU `gettext'. ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already messages. It will automatically detect whether the system already
@@ -98,7 +98,7 @@ codes, stating which languages are allowed.
Using This Package Using This Package
================== ==================
As a user, if your language has been installed for this package, you As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's and `CC' is an ISO 3166 two-letter country code. For example, let's
@@ -131,13 +131,6 @@ system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
Special advice for Norwegian users: The language code for Norwegian
bokma*l changed from `no' to `nb' recently (in 2003). During the
transition period, while some message catalogs for this language are
installed under `nb' and some older ones under `no', it's recommended
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
older translations are used.
In the `LANGUAGE' environment variable, but not in the `LANG' In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL' environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent to denote the language's main dialect. For example, `de' is equivalent
@@ -147,7 +140,7 @@ to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
Translating Teams Translating Teams
================= =================
For the Free Translation Project to be a success, we need interested For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language. able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of Each translation team has its own mailing list. The up-to-date list of
@@ -177,97 +170,74 @@ programming skill, here.
Available Packages Available Packages
================== ==================
Languages are not equally supported in all packages. The following Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of January matrix shows the current state of internationalization, as of May 2003.
2004. The matrix shows, in regard of each package, for which languages The matrix shows, in regard of each package, for which languages PO
PO files have been submitted to translation coordination, with a files have been submitted to translation coordination, with a
translation percentage of at least 50%. translation percentage of at least 50%.
Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es Ready PO files am az be bg ca cs da de el en en_GB eo es
+----------------------------------------------------+ +-------------------------------------------+
a2ps | [] [] [] [] | a2ps | [] [] [] [] |
aegis | () | aegis | () |
ant-phone | () |
anubis | | anubis | |
ap-utils | | ap-utils | |
aspell | [] | bash | [] [] [] |
bash | [] [] [] [] |
batchelor | | batchelor | |
bfd | [] [] | bfd | [] [] |
binutils | [] [] | binutils | [] [] |
bison | [] [] [] | bison | [] [] [] |
bluez-pin | [] [] [] | bluez-pin | [] [] |
clisp | | clisp | |
clisp | [] [] [] | clisp | [] [] [] |
console-tools | [] [] |
coreutils | [] [] [] [] | coreutils | [] [] [] [] |
cpio | [] [] [] | cpio | [] [] [] |
darkstat | [] () [] | darkstat | () [] |
diffutils | [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] |
e2fsprogs | [] [] [] | e2fsprogs | [] [] |
enscript | [] [] [] [] | enscript | [] [] [] [] |
error | [] [] [] [] [] | error | [] [] [] [] [] |
fetchmail | [] () [] [] [] [] | fetchmail | [] () [] [] [] [] |
fileutils | [] [] [] | fileutils | [] [] [] |
findutils | [] [] [] [] [] [] [] | findutils | [] [] [] [] [] [] |
flex | [] [] [] [] | flex | [] [] [] [] |
fslint | |
gas | [] | gas | [] |
gawk | [] [] [] [] | gawk | [] [] [] [] |
gbiff | [] |
gcal | [] | gcal | [] |
gcc | [] [] | gcc | [] [] |
gettext | [] [] [] [] [] | gettext | [] [] [] [] [] |
gettext-examples | [] [] [] [] |
gettext-runtime | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] |
gettext-tools | [] [] [] | gettext-tools | [] [] |
gimp-print | [] [] [] [] [] | gimp-print | [] [] [] [] [] |
gliv | | gliv | |
glunarclock | [] [] | glunarclock | [] [] [] |
gnubiff | [] | gnucash | () [] |
gnucash | [] () [] [] |
gnucash-glossary | [] () [] | gnucash-glossary | [] () [] |
gnupg | [] () [] [] [] [] | gnupg | [] () [] [] [] [] |
gpe-aerial | [] | gpe-calendar | [] |
gpe-beam | [] [] | gpe-conf | [] |
gpe-calendar | [] [] | gpe-contacts | [] |
gpe-clock | [] [] | gpe-edit | |
gpe-conf | [] [] | gpe-login | [] |
gpe-contacts | [] [] | gpe-ownerinfo | [] |
gpe-edit | [] | gpe-sketchbook | [] |
gpe-go | [] | gpe-timesheet | |
gpe-login | [] [] | gpe-today | [] |
gpe-ownerinfo | [] [] | gpe-todo | [] |
gpe-sketchbook | [] [] |
gpe-su | [] [] |
gpe-taskmanager | [] [] |
gpe-timesheet | [] |
gpe-today | [] [] |
gpe-todo | [] [] |
gphoto2 | [] [] [] [] | gphoto2 | [] [] [] [] |
gprof | [] [] [] | gprof | [] [] |
gpsdrive | () () () | gpsdrive | () () () |
gramadoir | [] | grep | [] [] [] [] [] |
grep | [] [] [] [] [] [] |
gretl | [] | gretl | [] |
gtick | [] () |
hello | [] [] [] [] [] [] | hello | [] [] [] [] [] [] |
id-utils | [] [] | id-utils | [] [] |
indent | [] [] [] [] | indent | [] [] [] [] |
iso_3166 | [] [] [] [] [] [] [] [] [] [] | jpilot | [] [] [] [] |
iso_3166_1 | [] [] [] [] [] [] |
iso_3166_2 | |
iso_3166_3 | [] |
iso_4217 | [] [] [] [] |
iso_639 | |
jpilot | [] [] [] |
jtag | |
jwhois | [] | jwhois | [] |
kbd | [] [] [] [] [] | kbd | [] [] [] [] [] |
latrine | () |
ld | [] [] | ld | [] [] |
libc | [] [] [] [] [] [] | libc | [] [] [] [] [] [] |
libgpewidget | [] [] | libgpewidget | [] |
libiconv | [] [] [] [] [] | libiconv | [] [] [] [] [] |
lifelines | [] () | lifelines | [] () |
lilypond | [] | lilypond | [] |
@@ -278,66 +248,52 @@ translation percentage of at least 50%.
mailutils | [] [] | mailutils | [] [] |
make | [] [] [] | make | [] [] [] |
man-db | [] () [] [] () | man-db | [] () [] [] () |
minicom | [] [] [] |
mysecretdiary | [] [] [] | mysecretdiary | [] [] [] |
nano | [] () [] [] [] | nano | [] () [] [] [] |
nano_1_0 | [] () [] [] [] | nano_1_0 | [] () [] [] [] |
opcodes | [] | opcodes | [] [] |
parted | [] [] [] [] [] | parted | [] [] [] [] [] |
ptx | [] [] [] [] [] | ptx | [] [] [] [] [] |
python | | python | |
radius | [] | radius | |
recode | [] [] [] [] [] [] [] | recode | [] [] [] [] [] [] |
rpm | [] [] |
screem | | screem | |
scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] |
sed | [] [] [] [] [] [] |
sh-utils | [] [] [] | sh-utils | [] [] [] |
shared-mime-info | |
sharutils | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] |
silky | () |
skencil | [] () [] |
sketch | [] () [] | sketch | [] () [] |
soundtracker | [] [] [] | soundtracker | [] [] [] |
sp | [] | sp | [] |
tar | [] [] [] [] | tar | [] [] [] [] |
texinfo | [] [] [] | texinfo | [] [] [] [] |
textutils | [] [] [] [] | textutils | [] [] [] [] |
tin | () () | tin | () () |
tp-robot | |
tuxpaint | [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] [] [] [] | util-linux | [] [] [] [] [] |
vorbis-tools | [] [] [] [] | vorbis-tools | [] [] [] |
wastesedge | () | wastesedge | () |
wdiff | [] [] [] [] | wdiff | [] [] [] [] |
wget | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] |
xchat | [] [] [] [] | xchat | [] [] [] |
xfree86_xkb_xml | [] [] | xpad | |
xpad | [] | +-------------------------------------------+
+----------------------------------------------------+ am az be bg ca cs da de el en en_GB eo es
af am ar az be bg bs ca cs da de el en en_GB eo es 0 1 4 2 31 17 54 60 14 1 4 12 56
4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
et eu fa fi fr ga gl he hr hu id is it ja ko lg et fa fi fr ga gl he hr hu id it ja ko
+-------------------------------------------------+ +----------------------------------------+
a2ps | [] [] [] () () | a2ps | [] [] [] () () |
aegis | | aegis | |
ant-phone | [] |
anubis | [] | anubis | [] |
ap-utils | [] | ap-utils | [] |
aspell | [] [] |
bash | [] [] | bash | [] [] |
batchelor | [] [] | batchelor | [] |
bfd | [] | bfd | [] [] |
binutils | [] [] | binutils | [] [] |
bison | [] [] [] [] | bison | [] [] [] [] |
bluez-pin | [] [] [] [] [] | bluez-pin | [] [] [] [] |
clisp | | clisp | |
clisp | [] | clisp | [] |
console-tools | | coreutils | [] [] [] [] |
coreutils | [] [] [] [] [] [] |
cpio | [] [] [] [] | cpio | [] [] [] [] |
darkstat | () [] [] [] | darkstat | () [] [] [] |
diffutils | [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] |
@@ -345,67 +301,47 @@ translation percentage of at least 50%.
enscript | [] [] | enscript | [] [] |
error | [] [] [] [] | error | [] [] [] [] |
fetchmail | [] | fetchmail | [] |
fileutils | [] [] [] [] [] [] | fileutils | [] [] [] [] [] |
findutils | [] [] [] [] [] [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] [] [] [] |
flex | [] [] [] | flex | [] [] |
fslint | [] |
gas | [] | gas | [] |
gawk | [] [] [] | gawk | [] [] |
gbiff | [] |
gcal | [] | gcal | [] |
gcc | [] | gcc | [] |
gettext | [] [] [] | gettext | [] [] [] |
gettext-examples | [] [] | gettext-runtime | [] [] [] [] |
gettext-runtime | [] [] [] [] [] | gettext-tools | [] |
gettext-tools | [] [] [] |
gimp-print | [] [] | gimp-print | [] [] |
gliv | () | gliv | () |
glunarclock | [] [] [] [] | glunarclock | [] [] [] [] |
gnubiff | [] | gnucash | [] |
gnucash | () [] |
gnucash-glossary | [] | gnucash-glossary | [] |
gnupg | [] [] [] [] [] [] [] | gnupg | [] [] [] [] [] [] [] |
gpe-aerial | [] | gpe-calendar | [] |
gpe-beam | [] | gpe-conf | |
gpe-calendar | [] [] [] | gpe-contacts | [] |
gpe-clock | [] |
gpe-conf | [] |
gpe-contacts | [] [] |
gpe-edit | [] [] | gpe-edit | [] [] |
gpe-go | [] | gpe-login | [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] [] | gpe-ownerinfo | [] [] [] |
gpe-sketchbook | [] | gpe-sketchbook | [] |
gpe-su | [] |
gpe-taskmanager | [] |
gpe-timesheet | [] [] [] | gpe-timesheet | [] [] [] |
gpe-today | [] [] | gpe-today | [] [] |
gpe-todo | [] [] | gpe-todo | [] [] |
gphoto2 | [] [] [] | gphoto2 | [] [] [] |
gprof | [] [] | gprof | [] [] |
gpsdrive | () () () | gpsdrive | () [] () () |
gramadoir | [] [] |
grep | [] [] [] [] [] [] [] [] [] [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] |
gretl | [] [] | gretl | [] |
gtick | [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] [] | id-utils | [] [] [] |
indent | [] [] [] [] [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] |
iso_3166 | [] [] [] [] [] [] [] |
iso_3166_1 | [] [] [] [] [] |
iso_3166_2 | |
iso_3166_3 | |
iso_4217 | [] [] [] [] [] [] |
iso_639 | |
jpilot | [] () | jpilot | [] () |
jtag | [] |
jwhois | [] [] [] [] | jwhois | [] [] [] [] |
kbd | [] | kbd | [] |
latrine | [] |
ld | [] | ld | [] |
libc | [] [] [] [] [] [] | libc | [] [] [] [] [] [] |
libgpewidget | [] [] [] [] | libgpewidget | [] [] [] |
libiconv | [] [] [] [] [] [] [] [] [] | libiconv | [] [] [] [] [] [] [] [] |
lifelines | () | lifelines | () |
lilypond | [] | lilypond | [] |
lingoteach | [] [] | lingoteach | [] [] |
@@ -414,322 +350,243 @@ translation percentage of at least 50%.
m4 | [] [] [] [] | m4 | [] [] [] [] |
mailutils | | mailutils | |
make | [] [] [] [] [] [] | make | [] [] [] [] [] [] |
man-db | () () | man-db | [] () () |
minicom | [] [] [] [] |
mysecretdiary | [] [] | mysecretdiary | [] [] |
nano | [] [] [] [] | nano | [] [] [] [] |
nano_1_0 | [] [] [] [] | nano_1_0 | [] [] [] [] |
opcodes | [] | opcodes | [] [] |
parted | [] [] [] | parted | [] [] [] |
ptx | [] [] [] [] [] [] [] | ptx | [] [] [] [] [] [] [] |
python | | python | |
radius | [] | radius | |
recode | [] [] [] [] [] [] | recode | [] [] [] [] [] [] |
rpm | [] [] |
screem | | screem | |
scrollkeeper | [] | sed | [] [] [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] |
shared-mime-info | [] [] [] |
sharutils | [] [] [] [] [] | sharutils | [] [] [] [] [] |
silky | () [] () () |
skencil | [] |
sketch | [] | sketch | [] |
soundtracker | [] [] | soundtracker | [] [] [] |
sp | [] () | sp | [] () |
tar | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] [] [] [] [] |
texinfo | [] [] [] [] | texinfo | [] [] [] [] |
textutils | [] [] [] [] [] [] | textutils | [] [] [] [] [] |
tin | [] () | tin | [] () |
tp-robot | [] |
tuxpaint | [] [] [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | [] [] |
util-linux | [] [] [] [] () [] | util-linux | [] [] [] [] () [] |
vorbis-tools | [] | vorbis-tools | [] |
wastesedge | () | wastesedge | () |
wdiff | [] [] [] [] [] [] | wdiff | [] [] [] [] [] |
wget | [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] |
xchat | [] [] [] | xchat | [] [] [] |
xfree86_xkb_xml | [] [] | xpad | |
xpad | [] [] | +----------------------------------------+
+-------------------------------------------------+ et fa fi fr ga gl he hr hu id it ja ko
et eu fa fi fr ga gl he hr hu id is it ja ko lg 20 1 15 73 14 24 8 10 30 31 19 31 9
22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru lg lt lv ms nb nl nn no pl pt pt_BR ro
+-----------------------------------------------------+ +----------------------------------------+
a2ps | [] [] () () [] [] [] | a2ps | [] [] () () () [] [] |
aegis | () () () | aegis | () |
ant-phone | [] [] | anubis | [] [] |
anubis | [] [] [] [] [] [] | ap-utils | () |
ap-utils | [] () [] | bash | [] |
aspell | [] | batchelor | |
bash | [] [] [] | bfd | |
batchelor | [] | binutils | |
bfd | [] | bison | [] [] [] [] |
binutils | [] | bluez-pin | [] |
bison | [] [] [] [] [] |
bluez-pin | [] [] [] |
clisp | | clisp | |
clisp | [] | clisp | [] |
console-tools | [] | coreutils | [] |
coreutils | [] [] | cpio | [] [] [] |
cpio | [] [] [] [] [] |
darkstat | [] [] [] [] | darkstat | [] [] [] [] |
diffutils | [] [] [] [] [] [] | diffutils | [] [] [] |
e2fsprogs | [] | e2fsprogs | |
enscript | [] [] [] [] | enscript | [] [] |
error | [] [] [] | error | [] [] |
fetchmail | [] [] () [] | fetchmail | () () |
fileutils | [] [] [] | fileutils | [] |
findutils | [] [] [] [] [] | findutils | [] [] [] [] |
flex | [] [] [] [] | flex | [] |
fslint | [] [] |
gas | | gas | |
gawk | [] [] [] | gawk | [] |
gbiff | [] [] |
gcal | | gcal | |
gcc | | gcc | |
gettext | [] [] [] | gettext | [] |
gettext-examples | [] [] [] | gettext-runtime | [] |
gettext-runtime | [] [] [] [] | gettext-tools | |
gettext-tools | [] [] |
gimp-print | [] | gimp-print | [] |
gliv | [] [] [] | gliv | [] |
glunarclock | [] [] [] [] | glunarclock | [] |
gnubiff | [] | gnucash | |
gnucash | [] [] () [] |
gnucash-glossary | [] [] | gnucash-glossary | [] [] |
gnupg | [] | gnupg | |
gpe-aerial | [] [] [] [] | gpe-calendar | [] [] |
gpe-beam | [] [] [] [] | gpe-conf | [] [] |
gpe-calendar | [] [] [] [] | gpe-contacts | [] |
gpe-clock | [] [] [] [] | gpe-edit | [] [] |
gpe-conf | [] [] [] [] | gpe-login | [] [] |
gpe-contacts | [] [] [] [] | gpe-ownerinfo | [] [] |
gpe-edit | [] [] [] [] | gpe-sketchbook | [] [] |
gpe-go | [] [] [] | gpe-timesheet | [] [] |
gpe-login | [] [] [] [] | gpe-today | [] [] |
gpe-ownerinfo | [] [] [] [] | gpe-todo | [] [] |
gpe-sketchbook | [] [] [] [] | gphoto2 | |
gpe-su | [] [] [] [] | gprof | [] |
gpe-taskmanager | [] [] [] [] | gpsdrive | () () () |
gpe-timesheet | [] [] [] [] | grep | [] [] [] [] |
gpe-today | [] [] [] [] |
gpe-todo | [] [] [] [] |
gphoto2 | [] |
gprof | [] [] |
gpsdrive | () () [] |
gramadoir | () [] |
grep | [] [] [] [] [] |
gretl | | gretl | |
gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] |
id-utils | [] [] [] [] | indent | [] [] [] |
indent | [] [] [] [] |
iso_3166 | [] [] [] |
iso_3166_1 | [] [] |
iso_3166_2 | |
iso_3166_3 | [] |
iso_4217 | [] [] [] [] [] [] [] [] |
iso_639 | [] |
jpilot | () () | jpilot | () () |
jtag | | jwhois | [] [] [] |
jwhois | [] [] [] [] () | kbd | |
kbd | [] [] [] |
latrine | [] |
ld | | ld | |
libc | [] [] [] [] | libc | [] [] [] [] |
libgpewidget | [] [] [] | libgpewidget | [] [] |
libiconv | [] [] [] [] [] | libiconv | [] [] |
lifelines | | lifelines | |
lilypond | | lilypond | [] |
lingoteach | | lingoteach | |
lingoteach_lessons | | lingoteach_lessons | |
lynx | [] [] [] | lynx | [] [] |
m4 | [] [] [] [] [] | m4 | [] [] [] [] |
mailutils | [] [] [] | mailutils | |
make | [] [] [] [] | make | [] [] |
man-db | [] | man-db | [] |
minicom | [] [] [] [] | mysecretdiary | [] |
mysecretdiary | [] [] [] | nano | [] [] [] [] |
nano | [] [] [] [] [] | nano_1_0 | [] [] [] [] |
nano_1_0 | [] [] [] [] [] [] | opcodes | [] [] [] |
opcodes | [] [] | parted | [] [] [] |
parted | [] [] [] [] | ptx | [] [] [] [] [] [] [] |
ptx | [] [] [] [] [] [] [] [] |
python | | python | |
radius | [] [] | radius | |
recode | [] [] [] [] | recode | [] [] [] |
rpm | [] [] [] |
screem | | screem | |
scrollkeeper | [] [] [] [] [] | sed | [] [] |
sed | [] [] [] | sh-utils | [] |
sh-utils | [] [] | sharutils | [] |
shared-mime-info | [] [] | sketch | [] |
sharutils | [] [] |
silky | () |
skencil | [] [] |
sketch | [] [] |
soundtracker | | soundtracker | |
sp | | sp | |
tar | [] [] [] [] [] [] | tar | [] [] [] [] [] [] |
texinfo | [] [] [] [] | texinfo | [] |
textutils | [] [] | textutils | [] |
tin | | tin | |
tp-robot | [] | util-linux | [] [] |
tuxpaint | [] [] [] [] [] [] [] [] | vorbis-tools | [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] [] |
vorbis-tools | [] [] [] |
wastesedge | | wastesedge | |
wdiff | [] [] [] [] [] | wdiff | [] [] [] [] |
wget | [] [] [] | wget | [] [] [] |
xchat | [] [] [] | xchat | [] [] |
xfree86_xkb_xml | [] [] | xpad | [] |
xpad | [] [] | +----------------------------------------+
+-----------------------------------------------------+ lg lt lv ms nb nl nn no pl pt pt_BR ro
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru 0 0 2 11 7 26 3 4 18 15 34 34
1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
+-----------------------------------------------------+ +-------------------------------------------+
a2ps | [] [] [] [] | 16 a2ps | [] [] [] [] [] | 16
aegis | | 0 aegis | () | 0
ant-phone | | 3 anubis | [] [] | 5
anubis | [] [] | 9 ap-utils | () | 1
ap-utils | () | 3 bash | [] | 7
aspell | | 4 batchelor | | 1
bash | | 9 bfd | [] [] [] | 7
batchelor | | 3 binutils | [] [] [] | 7
bfd | [] [] | 6 bison | [] [] | 13
binutils | [] [] [] | 8 bluez-pin | | 7
bison | [] [] | 14
bluez-pin | [] [] [] | 14
clisp | | 0 clisp | | 0
clisp | | 5 clisp | | 5
console-tools | | 3 coreutils | [] [] [] [] [] | 14
coreutils | [] [] [] [] | 16 cpio | [] [] [] | 13
cpio | [] [] | 14 darkstat | [] () () | 9
darkstat | [] [] [] () () | 12 diffutils | [] [] [] [] | 21
diffutils | [] [] [] | 23 e2fsprogs | [] | 3
e2fsprogs | [] [] | 6 enscript | [] [] [] | 11
enscript | [] [] | 12 error | [] [] [] | 14
error | [] [] [] | 15 fetchmail | [] | 7
fetchmail | [] [] | 11 fileutils | [] [] [] [] [] [] | 15
fileutils | [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] | 27
findutils | [] [] [] [] [] [] | 29 flex | [] [] [] | 10
flex | [] [] | 13
fslint | | 3
gas | [] | 3 gas | [] | 3
gawk | [] [] | 12 gawk | [] [] | 9
gbiff | | 4
gcal | [] [] | 4 gcal | [] [] | 4
gcc | [] | 4 gcc | [] | 4
gettext | [] [] [] [] [] | 16 gettext | [] [] [] [] [] [] | 15
gettext-examples | [] [] [] [] [] | 14 gettext-runtime | [] [] [] [] [] [] | 16
gettext-runtime | [] [] [] [] [] [] [] [] | 22 gettext-tools | [] [] | 5
gettext-tools | [] [] [] [] [] [] | 14
gimp-print | [] [] | 10 gimp-print | [] [] | 10
gliv | | 3 gliv | | 1
glunarclock | [] [] [] | 13 glunarclock | [] [] [] | 11
gnubiff | | 3 gnucash | [] [] | 4
gnucash | [] [] | 9
gnucash-glossary | [] [] [] | 8 gnucash-glossary | [] [] [] | 8
gnupg | [] [] [] [] | 17 gnupg | [] [] [] [] | 16
gpe-aerial | [] | 7 gpe-calendar | [] | 5
gpe-beam | [] | 8 gpe-conf | | 3
gpe-calendar | [] [] [] [] | 13 gpe-contacts | [] | 4
gpe-clock | [] [] [] | 10 gpe-edit | [] | 5
gpe-conf | [] [] | 9 gpe-login | [] | 5
gpe-contacts | [] [] [] | 11 gpe-ownerinfo | [] | 7
gpe-edit | [] [] [] [] [] | 12 gpe-sketchbook | [] | 5
gpe-go | | 5 gpe-timesheet | [] | 6
gpe-login | [] [] [] [] [] | 13 gpe-today | [] | 6
gpe-ownerinfo | [] [] [] [] | 13 gpe-todo | [] | 6
gpe-sketchbook | [] [] | 9 gphoto2 | [] [] | 9
gpe-su | [] [] [] | 10 gprof | [] [] | 7
gpe-taskmanager | [] [] [] | 10
gpe-timesheet | [] [] [] [] | 12
gpe-today | [] [] [] [] [] | 13
gpe-todo | [] [] [] [] | 12
gphoto2 | [] [] [] | 11
gprof | [] [] | 9
gpsdrive | [] [] | 3 gpsdrive | [] [] | 3
gramadoir | [] | 5 grep | [] [] [] [] | 24
grep | [] [] [] [] | 26 gretl | | 2
gretl | | 3 hello | [] [] [] [] [] | 33
gtick | | 7 id-utils | [] [] [] | 11
hello | [] [] [] [] [] | 34 indent | [] [] [] [] | 19
id-utils | [] [] | 12 jpilot | [] [] [] [] [] | 10
indent | [] [] [] [] | 21 jwhois | () () [] [] | 10
iso_3166 | [] [] [] [] [] [] [] | 27 kbd | [] [] | 8
iso_3166_1 | [] [] [] | 16
iso_3166_2 | | 0
iso_3166_3 | | 2
iso_4217 | [] [] [] [] [] [] | 24
iso_639 | | 1
jpilot | [] [] [] [] [] | 9
jtag | [] | 2
jwhois | () [] [] | 11
kbd | [] [] | 11
latrine | | 2
ld | [] [] | 5 ld | [] [] | 5
libc | [] [] [] [] | 20 libc | [] [] [] [] | 20
libgpewidget | [] [] [] [] | 13 libgpewidget | | 6
libiconv | [] [] [] [] [] [] [] [] | 27 libiconv | [] [] [] [] [] [] | 21
lifelines | [] | 2 lifelines | [] | 2
lilypond | [] | 3 lilypond | [] | 4
lingoteach | | 2 lingoteach | | 2
lingoteach_lessons | () | 0 lingoteach_lessons | () | 0
lynx | [] [] [] | 14 lynx | [] [] [] [] | 14
m4 | [] [] | 15 m4 | [] [] [] | 15
mailutils | | 5 mailutils | | 2
make | [] [] [] | 16 make | [] [] [] [] | 15
man-db | [] | 5 man-db | [] | 6
minicom | | 11 mysecretdiary | [] [] | 8
mysecretdiary | [] [] | 10 nano | [] [] [] | 15
nano | [] [] [] [] | 17 nano_1_0 | [] [] [] | 15
nano_1_0 | [] [] [] | 17 opcodes | [] [] | 9
opcodes | [] [] | 6 parted | [] [] | 13
parted | [] [] [] | 15 ptx | [] [] [] | 22
ptx | [] [] | 22
python | | 0 python | | 0
radius | | 4 radius | | 0
recode | [] [] [] | 20 recode | [] [] [] [] | 19
rpm | [] [] | 9 screem | [] | 1
screem | [] [] | 2 sed | [] [] [] [] [] | 20
scrollkeeper | [] [] [] | 15 sh-utils | [] [] [] | 13
sed | [] [] [] [] [] [] | 24 sharutils | [] [] [] [] | 16
sh-utils | [] [] | 14 sketch | [] | 5
shared-mime-info | [] [] | 7 soundtracker | [] | 7
sharutils | [] [] [] [] | 17
silky | () | 3
skencil | [] | 6
sketch | [] | 6
soundtracker | [] [] | 7
sp | [] | 3 sp | [] | 3
tar | [] [] [] [] [] | 24 tar | [] [] [] [] [] | 24
texinfo | [] [] [] | 14 texinfo | [] [] [] [] | 13
textutils | [] [] [] [] | 16 textutils | [] [] [] [] [] | 15
tin | | 1 tin | | 1
tp-robot | | 2 util-linux | [] [] | 14
tuxpaint | [] [] [] [] [] | 29 vorbis-tools | [] | 7
unicode-han-tra... | | 0
unicode-transla... | | 2
util-linux | [] [] | 15
vorbis-tools | | 8
wastesedge | | 0 wastesedge | | 0
wdiff | [] [] [] | 18 wdiff | [] [] [] [] | 17
wget | [] [] [] [] [] [] [] [] | 24 wget | [] [] [] [] [] [] [] | 25
xchat | [] [] [] [] [] | 15 xchat | [] [] [] | 11
xfree86_xkb_xml | [] [] [] [] [] | 11 xpad | | 1
xpad | | 5 +-------------------------------------------+
+-----------------------------------------------------+ 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913
131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
Some counters in the preceding matrix are higher than the number of Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are visible blocks let us expect. This is because a few extra PO files are
@@ -742,7 +599,7 @@ distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a lag between the mere existence a PO file and its wide availability in a
distribution. distribution.
If January 2004 seems to be old, you may fetch a more recent copy of If May 2003 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
@@ -750,7 +607,7 @@ matrix with full percentage details can be found at
Using `gettext' in new packages Using `gettext' in new packages
=============================== ===============================
If you are writing a freely available program and want to If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means License which covers the use of the GNU `gettext' library. This means
+2 -2
View File
@@ -2,7 +2,7 @@
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
+2177 -67
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -18,7 +18,7 @@
# #
# You should have received a copy of the GNU General Public License along # You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc., # with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Systems where /bin/sh is not the default shell need this. The $(shell) # Systems where /bin/sh is not the default shell need this. The $(shell)
# command below won't work with e.g. stock DOS/Windows shells. # command below won't work with e.g. stock DOS/Windows shells.
+38 -31
View File
@@ -1,13 +1,16 @@
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Installation Instructions
Foundation, Inc. *************************
This file is free documentation; the Free Software Foundation gives Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it. unlimited permission to copy, distribute and modify it.
Basic Installation Basic Installation
================== ==================
These are generic installation instructions. These are generic installation instructions.
The `configure' shell script attempts to guess correct values for The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses various system-dependent variables used during compilation. It uses
@@ -67,9 +70,9 @@ The simplest way to compile this package is:
Compilers and Options Compilers and Options
===================== =====================
Some systems require unusual options for compilation or linking that Some systems require unusual options for compilation or linking that the
the `configure' script does not know about. Run `./configure --help' `configure' script does not know about. Run `./configure --help' for
for details on some of the pertinent environment variables. details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here by setting variables in the command line or in the environment. Here
@@ -82,7 +85,7 @@ is an example:
Compiling For Multiple Architectures Compiling For Multiple Architectures
==================================== ====================================
You can compile the package for more than one kind of computer at the You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the supports the `VPATH' variable, such as GNU `make'. `cd' to the
@@ -99,19 +102,19 @@ for another architecture.
Installation Names Installation Names
================== ==================
By default, `make install' will install the package's files in By default, `make install' installs the package's commands under
`/usr/local/bin', `/usr/local/man', etc. You can specify an `/usr/local/bin', include files under `/usr/local/include', etc. You
installation prefix other than `/usr/local' by giving `configure' the can specify an installation prefix other than `/usr/local' by giving
option `--prefix=PATH'. `configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PATH as the prefix for installing programs and libraries. PREFIX as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix. Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. you can set and what kinds of files go in them.
@@ -122,7 +125,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features Optional Features
================= =================
Some packages pay attention to `--enable-FEATURE' options to Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package. `configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The is something like `gnu-as' or `x' (for the X Window System). The
@@ -137,11 +140,11 @@ you can use the `configure' options `--x-includes=DIR' and
Specifying the System Type Specifying the System Type
========================== ==========================
There may be some features `configure' cannot figure out There may be some features `configure' cannot figure out automatically,
automatically, but needs to determine by the type of machine the package but needs to determine by the type of machine the package will run on.
will run on. Usually, assuming the package is built to be run on the Usually, assuming the package is built to be run on the _same_
_same_ architectures, `configure' can figure that out, but if it prints architectures, `configure' can figure that out, but if it prints a
a message saying it cannot guess the machine type, give it the message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system `--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form: type, such as `sun4', or a canonical name which has the form:
@@ -156,7 +159,7 @@ where SYSTEM can have one of these forms:
need to know the machine type. need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will use the option `--target=TYPE' to select the type of system they will
produce code for. produce code for.
If you want to _use_ a cross compiler, that generates code for a If you want to _use_ a cross compiler, that generates code for a
@@ -167,9 +170,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults Sharing Defaults
================ ================
If you want to set default values for `configure' scripts to share, If you want to set default values for `configure' scripts to share, you
you can create a site shell script called `config.site' that gives can create a site shell script called `config.site' that gives default
default values for variables like `CC', `cache_file', and `prefix'. values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then `configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the `PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script. `CONFIG_SITE' environment variable to the location of the site script.
@@ -178,7 +181,7 @@ A warning: not all `configure' scripts look for a site script.
Defining Variables Defining Variables
================== ==================
Variables not defined in a site shell script can be set in the Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set variables may be lost. In order to avoid this problem, you should set
@@ -186,14 +189,18 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc ./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation `configure' Invocation
====================== ======================
`configure' recognizes the following options to control how it `configure' recognizes the following options to control how it operates.
operates.
`--help' `--help'
`-h' `-h'
+10 -5
View File
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*- ## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ## Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify ## 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 ## it under the terms of the GNU General Public License as published by
@@ -13,14 +13,19 @@
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02111-1307 USA ## 02110-1301 USA
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = config po lib data src doc tests SUBDIRS = config po runtime-po lib data src doc examples tests
EXTRA_DIST = REFERENCES OChangeLog Makefile.maint GNUmakefile Makefile.cfg # Files installed for use by Automake.
aclocaldir = @aclocaldir@
aclocal_DATA = m4/bison-i18n.m4
EXTRA_DIST = GNUmakefile Makefile.cfg Makefile.maint \
OChangeLog PACKAGING
.PHONY: maintainer-check .PHONY: maintainer-check
maintainer-check: maintainer-check:
+2 -3
View File
@@ -13,11 +13,10 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02111-1307, USA. # 02110-1301, USA.
prev_version_file = $(srcdir)/config/prev-version.txt prev_version_file = $(srcdir)/config/prev-version.txt
move_if_change = $(srcdir)/config/move-if-change
announce_gen = $(srcdir)/config/announce-gen announce_gen = $(srcdir)/config/announce-gen
release_archive_dir = releases release_archive_dir = releases
+110 -44
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am. # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -13,6 +13,7 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
@@ -33,38 +34,47 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.hin \ $(srcdir)/Makefile.in $(srcdir)/config.hin \
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
INSTALL NEWS README-alpha THANKS TODO INSTALL NEWS THANKS TODO build-aux/config.guess \
build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
build-aux/install-sh build-aux/mdate-sh build-aux/missing \
build-aux/mkinstalldirs build-aux/texinfo.tex build-aux/ylwrap
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/bison-i18n.m4 $(top_srcdir)/m4/cxx.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext_gl.m4 \
$(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \ $(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/inttypes_h_gl.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/lib-ld_gl.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix_gl.m4 $(top_srcdir)/m4/m4.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \ $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/po_gl.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stpcpy.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h_gl.m4 \
$(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/subpipe.m4 $(top_srcdir)/m4/timevar.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/warning.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/subpipe.m4 \
$(top_srcdir)/m4/timevar.m4 $(top_srcdir)/m4/uintmax_t_gl.m4 \
$(top_srcdir)/m4/ulonglong_gl.m4 \
$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/warning.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
SOURCES = SOURCES =
@@ -75,6 +85,15 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-recursive installcheck-recursive installdirs-recursive \ install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(aclocaldir)"
aclocalDATA_INSTALL = $(INSTALL_DATA)
DATA = $(aclocal_DATA)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
@@ -100,6 +119,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOM4TE = @AUTOM4TE@ AUTOM4TE = @AUTOM4TE@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BISON_CXX_WORKS = @BISON_CXX_WORKS@
BISON_LOCALEDIR = @BISON_LOCALEDIR@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -117,6 +138,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
GCC = @GCC@ GCC = @GCC@
GETOPT_H = @GETOPT_H@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
HAVE__BOOL = @HAVE__BOOL@ HAVE__BOOL = @HAVE__BOOL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@@ -124,6 +146,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
@@ -141,6 +164,7 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@ MSGMERGE = @MSGMERGE@
O0CFLAGS = @O0CFLAGS@ O0CFLAGS = @O0CFLAGS@
O0CXXFLAGS = @O0CXXFLAGS@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -169,6 +193,9 @@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
# Files installed for use by Automake.
aclocaldir = @aclocaldir@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -176,6 +203,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@ bindir = @bindir@
build = @build@ build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
@@ -205,8 +234,11 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = config po lib data src doc tests SUBDIRS = config po runtime-po lib data src doc examples tests
EXTRA_DIST = REFERENCES OChangeLog Makefile.maint GNUmakefile Makefile.cfg aclocal_DATA = m4/bison-i18n.m4
EXTRA_DIST = GNUmakefile Makefile.cfg Makefile.maint \
OChangeLog PACKAGING
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -262,6 +294,23 @@ $(srcdir)/config.hin: $(am__configure_deps)
distclean-hdr: distclean-hdr:
-rm -f config.h stamp-h1 -rm -f config.h stamp-h1
uninstall-info-am: uninstall-info-am:
install-aclocalDATA: $(aclocal_DATA)
@$(NORMAL_INSTALL)
test -z "$(aclocaldir)" || $(mkdir_p) "$(DESTDIR)$(aclocaldir)"
@list='$(aclocal_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(aclocalDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(aclocaldir)/$$f'"; \
$(aclocalDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(aclocaldir)/$$f"; \
done
uninstall-aclocalDATA:
@$(NORMAL_UNINSTALL)
@list='$(aclocal_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
done
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@@ -270,7 +319,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS): $(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -282,7 +337,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ || eval $$failcom; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -290,7 +345,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -311,7 +372,7 @@ maintainer-clean-recursive:
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ || eval $$failcom; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -392,7 +453,7 @@ distdir: $(DISTFILES)
esac esac
$(am__remove_distdir) $(am__remove_distdir)
mkdir $(distdir) mkdir $(distdir)
$(mkdir_p) $(distdir)/m4 $(distdir)/po $(distdir)/tests $(mkdir_p) $(distdir)/build-aux $(distdir)/m4 $(distdir)/po $(distdir)/runtime-po $(distdir)/tests
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; for file in $$list; do \
@@ -419,15 +480,17 @@ distdir: $(DISTFILES)
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \ test -d "$(distdir)/$$subdir" \
|| mkdir "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \ || exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \ (cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="../$(top_distdir)" \ top_distdir="$$top_distdir" \
distdir="../$(distdir)/$$subdir" \ distdir="$$distdir/$$subdir" \
distdir) \ distdir) \
|| exit 1; \ || exit 1; \
fi; \ fi; \
@@ -438,14 +501,14 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir) || chmod -R a+r $(distdir)
dist-gzip: distdir dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir) $(am__remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir) $(am__remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir) $(am__remove_distdir)
dist-shar: distdir dist-shar: distdir
@@ -458,8 +521,8 @@ dist-zip: distdir
$(am__remove_distdir) $(am__remove_distdir)
dist dist-all: distdir dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir) $(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then # This target untars the dist file and tries a VPATH configuration. Then
@@ -468,11 +531,11 @@ dist dist-all: distdir
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
@@ -531,9 +594,12 @@ distcleancheck: distclean
exit 1; } >&2 exit 1; } >&2
check-am: all-am check-am: all-am
check: check-recursive check: check-recursive
all-am: Makefile config.h all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
for dir in "$(DESTDIR)$(aclocaldir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive install: install-recursive
install-exec: install-exec-recursive install-exec: install-exec-recursive
install-data: install-data-recursive install-data: install-data-recursive
@@ -553,7 +619,7 @@ mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@@ -577,7 +643,7 @@ info: info-recursive
info-am: info-am:
install-data-am: install-data-am: install-aclocalDATA
install-exec-am: install-exec-am:
@@ -605,7 +671,7 @@ ps: ps-recursive
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-am: uninstall-aclocalDATA uninstall-info-am
uninstall-info: uninstall-info-recursive uninstall-info: uninstall-info-recursive
@@ -615,14 +681,14 @@ uninstall-info: uninstall-info-recursive
dist-tarZ dist-zip distcheck distclean distclean-generic \ dist-tarZ dist-zip distcheck distclean distclean-generic \
distclean-hdr distclean-recursive distclean-tags \ distclean-hdr distclean-recursive distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \ distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-aclocalDATA install-am \
install-data-am install-exec install-exec-am install-info \ install-data install-data-am install-exec install-exec-am \
install-info-am install-man install-strip installcheck \ install-info install-info-am install-man install-strip \
installcheck-am installdirs installdirs-am maintainer-clean \ installcheck installcheck-am installdirs installdirs-am \
maintainer-clean-generic maintainer-clean-recursive \ maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ maintainer-clean-recursive mostlyclean mostlyclean-generic \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall-info-am uninstall uninstall-aclocalDATA uninstall-am uninstall-info-am
.PHONY: maintainer-check .PHONY: maintainer-check
+187 -104
View File
@@ -2,7 +2,7 @@
# This Makefile fragment is shared between the coreutils, # This Makefile fragment is shared between the coreutils,
# CPPI, Bison, and Autoconf. # CPPI, Bison, and Autoconf.
## Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ## Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
## ##
## This program is free software; you can redistribute it and/or modify ## 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 ## it under the terms of the GNU General Public License as published by
@@ -16,14 +16,15 @@
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02111-1307, USA. ## 02110-1301, USA.
# This is reported not to work with make-3.79.1 # This is reported not to work with make-3.79.1
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ME := Makefile.maint ME := Makefile.maint
# Do not save the original name or timestamp in the .tar.gz file. # Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
GZIP_ENV = \ GZIP_ENV = \
"--no-name --best$$( \ "--no-name --best$$( \
case $$(gzip --help) in \ case $$(gzip --help) in \
@@ -33,6 +34,20 @@ GZIP_ENV = \
CVS = cvs CVS = cvs
CVS_LIST = sh -c ' \
(cvsu --find --types=AFGM $$*) 2>/dev/null || \
awk -F/ '\''{ \
if (!$$1 && $$3 !~ /^-/) { \
f=FILENAME; \
sub(/CVS\/Entries/, "", f); \
print f $$2; \
}}'\'' \
$$(find $${*-*} -name Entries -print) /dev/null \
' dummy
CVS_LIST_EXCEPT = \
$(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
ifeq ($(origin prev_version_file), undefined) ifeq ($(origin prev_version_file), undefined)
prev_version_file = .prev-version prev_version_file = .prev-version
endif endif
@@ -69,126 +84,184 @@ local-checks-available = \
local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available)) local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
# Make sure C source files in src/ don't include xalloc.h directly,
# since they all already include it via sys2.h.
# It's not a big deal -- just aesthetics.
.PHONY: $(syntax-check-rules) .PHONY: $(syntax-check-rules)
syntax-check-rules = \ syntax-check-rules = \
sc_cast_of_argument_to_free \ sc_cast_of_argument_to_free \
sc_cast_of_x_alloc_return_value \ sc_cast_of_x_alloc_return_value \
sc_cast_of_alloca_return_value \
sc_changelog \ sc_changelog \
sc_dd_max_sym_length \
sc_error_exit_success \ sc_error_exit_success \
sc_file_system \
sc_obsolete_symbols \
sc_prohibit_atoi_atof \
sc_prohibit_jm_in_m4 \
sc_root_tests \
sc_space_tab \ sc_space_tab \
sc_sun_os_names \ sc_sun_os_names \
sc_system_h_headers \ sc_system_h_headers \
sc_unmarked_diagnostics \ sc_tight_scope \
sc_xalloc_h_in_src sc_trailing_space \
sc_unmarked_diagnostics
syntax-check: $(syntax-check-rules) syntax-check: $(syntax-check-rules)
# @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \ # @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
# $$(find -type f -name '*.[chly]') && \ # $$(find -type f -name '*.[chly]') && \
# { echo '$(ME): found conditional include' 1>&2; \ # { echo '$(ME): found conditional include' 1>&2; \
# exit 1; } || : # exit 1; } || :
# grep -E '^# *include <(string|stdlib)\.h>' \ # grep -nE '^# *include <(string|stdlib)\.h>' \
# $(srcdir)/{lib,src}/*.[chy] && \ # $(srcdir)/{lib,src}/*.[chy] && \
# { echo '$(ME): FIXME' 1>&2; \ # { echo '$(ME): FIXME' 1>&2; \
# exit 1; } || : # exit 1; } || :
# FIXME: don't allow `#include .strings\.h' anywhere # FIXME: don't allow `#include .strings\.h' anywhere
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep --exclude=$(srcdir)/src/shred.c -E \
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
| grep -v '_(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
sc_cast_of_argument_to_free: sc_cast_of_argument_to_free:
@grep -E '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \ @grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \ { echo '$(ME): don'\''t cast free argument' 1>&2; \
exit 1; } || : exit 1; } || :
sc_cast_of_x_alloc_return_value: sc_cast_of_x_alloc_return_value:
@grep -E --exclude=$(srcdir)/lib/regex.c \ @grep -nE --exclude=$(srcdir)/lib/regex.c \
'\*\) *x(m|c|re)alloc\>' $(srcdir)/{lib,src}/*.[chy] && \ '\*\) *x(m|c|re)alloc\>' \
$(srcdir)/{lib,src}/*.[chy] && \
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \ { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
exit 1; } || : exit 1; } || :
sc_cast_of_alloca_return_value:
@grep -nE '\*\) *alloca\>' \
$(srcdir)/src/*.[chy] && \
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
exit 1; } || :
sc_space_tab: sc_space_tab:
@( cvsu --list ) > /dev/null 2>&1 || : && \ @grep -n '[ ] ' \
grep '[ ] ' \ $$($(CVS_LIST_EXCEPT)) && \
$$(cvsu --list | grep -vEf .x-$@ ) && \
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \ { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
1>&2; exit 1; } || : 1>&2; exit 1; } || :
# Don't use the old ato* functions in `real' code.
# They provide no error checking mechanism.
# Instead, use strto* functions.
sc_prohibit_atoi_atof:
@grep -nE '\<(ato[filq]|ato''ll)\>' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): do not use ato''f, ato''i, ato''l, ato''ll, or ato''q' \
1>&2; exit 1; } || :
# Using EXIT_SUCCESS as the first argument to error is misleading, # Using EXIT_SUCCESS as the first argument to error is misleading,
# since when that parameter is 0, error does not exit. Use `0' instead. # since when that parameter is 0, error does not exit. Use `0' instead.
sc_error_exit_success: sc_error_exit_success:
@grep -F 'error (EXIT_SUCCESS,' \ @grep -nF 'error (EXIT_SUCCESS,' \
$$(find -type f -name '*.[chly]') && \ $$(find -type f -name '*.[chly]') && \
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
exit 1; } || : exit 1; } || :
# FIXME: merge this with sc_system_h_headers below. sc_file_system:
# xalloc.h is included via system.h, so should not be included @grep -ni 'file''system' \
# directly by any file in src/. $$($(CVS_LIST_EXCEPT)) && \
sc_xalloc_h_in_src: { echo '$(ME): found use of "file''system";' \
@if test -f $(srcdir)/src/sys2.h; then \ 'rewrite to use "file system"' 1>&2; \
if grep 'xalloc\.h' $(srcdir)/src/*.c; then \ exit 1; } || :
exit 1; \
fi; \ sc_obsolete_symbols:
fi @grep -nE '\<(HAVE_''FCNTL_H)\>' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): do not use HAVE_''FCNTL_H' \
1>&2; exit 1; } || :
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
# Each nonempty line must start with a year number, or a TAB. # Each nonempty line must start with a year number, or a TAB.
sc_changelog: sc_changelog:
@grep '^[^12 ]' $$(find . -name ChangeLog -maxdepth 2) && \ @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \ { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
exit 1; } || : exit 1; } || :
header_regexp = \ # Ensure that dd's definition of LONGEST_SYMBOL stays in sync
alloca\ # with the strings from the two affected variables.
|closeout\ dd_c = $(srcdir)/src/dd.c
|ctype\ sc_dd_max_sym_length:
|dirent\ ifneq ($(wildcard $(dd_c)),)
|errno\ @len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
|fcntl\ sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|inttypes\ |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
|limits\ | wc --max-line-length); \
|locale\ max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|pathmax\ |tr -d '"' | wc --max-line-length); \
|std(lib|bool)\ if test "$$len" = "$$max"; then :; else \
|string\ echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
|sys/(stat|dir|time)\ exit 1; \
|time\ fi
|unistd\ endif
|utime\
|version-etc\ # Many m4 macros names once began with `jm_'.
|xalloc # On 2004-04-13, they were all changed to start with gl_ instead.
h_re := $(shell echo '$(header_regexp)'|tr -d ' ') # Make sure that none are inadvertently reintroduced.
sc_prohibit_jm_in_m4:
@grep -nE 'jm_[A-Z]' \
$$($(CVS_LIST) $(srcdir)/m4 |grep '\.m4$$') && \
{ echo '$(ME): do not use jm_ in m4 macro names' \
1>&2; exit 1; } || :
sc_root_tests:
@t1=sc-root.expected; t2=sc-root.actual; \
grep -nl '^PRIV_CHECK_ARG=require-root' \
$$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \
sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
$(srcdir)/tests/Makefile.am |sort > $$t2; \
diff -u $$t1 $$t2 || diff=1; \
rm -f $$t1 $$t2; \
test "$$diff" \
&& { echo 'tests/Makefile.am: missing check-root action'>&2; \
exit 1; } || :
# Create a list of regular expressions matching the names
# of files included from system.h. Exclude a couple.
.re-list:
@sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
| grep -Ev 'sys/(param|file)\.h' \
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
> $@-t
@mv $@-t $@
# Files in src/ should not include directly any of # Files in src/ should not include directly any of
# the headers already included via system.h. # the headers already included via system.h.
# Get list of candidates with this: sc_system_h_headers: .re-list
# grep -h include src/sys*.h|sed 's/.*include //'|sort - if test -f $(srcdir)/src/system.h; then \
sc_system_h_headers: trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
@( cvsu --list ) > /dev/null 2>&1 || : && \ grep -nE -f .re-list \
grep -E '^# *include ["<]($(h_re))\.h[">]' \ $$($(CVS_LIST) src | \
$$(cvsu --list src | grep -Ev 'sys(2|tem)\.h$$') \ grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
&& { echo '$(ME): the above are already included via system.h'\ && { echo '$(ME): the above are already included via system.h'\
1>&2; exit 1; } || : 1>&2; exit 1; } || :; \
fi
sc_sun_os_names: sc_sun_os_names:
@( cvsu --list ) > /dev/null 2>&1 || : && \ @grep -nEi \
grep -Ei \
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \ 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
$$(cvsu --list | grep -vEf .x-$@ ) && \ $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \ { echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
exit 1; } || : exit 1; } || :
sc_tight_scope:
$(MAKE) -C src $@
sc_trailing_space:
@grep -n '[ ]$$' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found trailing space(s)' \
1>&2; exit 1; } || :
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep -nE \
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
| grep -v '_(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
# Ensure that date's --help output stays in sync with the info # Ensure that date's --help output stays in sync with the info
# documentation for GNU strftime. The only exception is %N, # documentation for GNU strftime. The only exception is %N,
# which date accepts but GNU strftime does not. # which date accepts but GNU strftime does not.
@@ -208,8 +281,17 @@ strftime-check:
# not @...@ in Makefile.am, now that we can rely on automake # not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable. # to emit a definition for each substituted variable.
makefile-check: makefile-check:
grep -E '@[A-Z_0-9]+@' `find . -name Makefile.am` \ grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
&& { echo 'Makefile.maint: use $(...), not @...@' 1>&2; exit 1; } || : && { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
news-date-check: NEWS
today=`date +%Y-%m-%d`; \
if head NEWS | grep '^\*.*'$$today >/dev/null; then \
:; \
else \
echo "today's date is not in NEWS" 1>&2; \
exit 1; \
fi
changelog-check: changelog-check:
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \ if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
@@ -225,9 +307,11 @@ m4-check:
exit 1; } || : exit 1; } || :
# Verify that all source files using _() are listed in po/POTFILES.in. # Verify that all source files using _() are listed in po/POTFILES.in.
# FIXME: don't hard-code src/false.c below; use a more general mechanism.
po-check: po-check:
if test -f po/POTFILES.in; then \ if test -f po/POTFILES.in; then \
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \ grep -E -v '^(#|$$)' po/POTFILES.in \
| grep -v '^src/false\.c$$' | sort > $@-1; \
files=; \ files=; \
for file in lib/*.[chly] src/*.[chly]; do \ for file in lib/*.[chly] src/*.[chly]; do \
case $$file in \ case $$file in \
@@ -246,7 +330,7 @@ po-check:
# the English word `and', the string must be marked with `N_ (...)' so that # the English word `and', the string must be marked with `N_ (...)' so that
# gettext recognizes it as a string requiring translation. # gettext recognizes it as a string requiring translation.
author_mark_check: author_mark_check:
@grep '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \ @grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \ { echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
exit 1; } || : exit 1; } || :
@@ -258,7 +342,7 @@ author_mark_check:
# that we'd have to worry about limits on command line length. # that we'd have to worry about limits on command line length.
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead' msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
makefile_path_separator_check: makefile_path_separator_check:
@grep 'PATH=.*:' `find $(srcdir) -name Makefile.am` \ @grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
&& { echo $(msg) 1>&2; exit 1; } || : && { echo $(msg) 1>&2; exit 1; } || :
# Check that `make alpha' will not fail at the end of the process. # Check that `make alpha' will not fail at the end of the process.
@@ -279,7 +363,7 @@ v_etc_file = lib/version-etc.c
# Make sure that the copyright date in $(v_etc_file) is up to date. # Make sure that the copyright date in $(v_etc_file) is up to date.
copyright-check: copyright-check:
@if test -f $(v_etc_file); then \ @if test -f $(v_etc_file); then \
grep '"Copyright (C) $(shell date +%Y) Free' $(v_etc_file) \ grep 'enum { COPYRIGHT_YEAR = 2005 };' $(v_etc_file) \
>/dev/null \ >/dev/null \
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \ || { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
exit 1; }; \ exit 1; }; \
@@ -330,7 +414,9 @@ null_AM_MAKEFLAGS = \
# Detect format-string/arg-list mismatches that would normally be obscured # Detect format-string/arg-list mismatches that would normally be obscured
# by the use of _(). The --disable-nls effectively defines away that macro, # by the use of _(). The --disable-nls effectively defines away that macro,
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be # and building with CFLAGS='-Wformat -Werror' causes any format warning to be
# treated as a failure. # treated as a failure. Also, check for shadowing problems with -Wshadow.
# These CFLAGS are pretty strict. If you build this target, you probably
# have to have a recent version of gcc and glibc headers.
TMPDIR ?= /tmp TMPDIR ?= /tmp
t=$(TMPDIR)/$(PACKAGE)/test t=$(TMPDIR)/$(PACKAGE)/test
my-distcheck: $(local-check) my-distcheck: $(local-check)
@@ -339,7 +425,7 @@ my-distcheck: $(local-check)
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
cd $(t)/$(distdir) \ cd $(t)/$(distdir) \
&& ./configure --disable-nls \ && ./configure --disable-nls \
&& $(MAKE) CFLAGS='-Wformat -Werror' \ && $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \ AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \ && $(MAKE) dvi \
&& $(MAKE) check \ && $(MAKE) check \
@@ -377,15 +463,9 @@ rel-check:
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
signatures ?= $(distdir).tar.bz2.asc $(distdir).tar.gz.asc rel-files = $(xd-delta) $(DIST_ARCHIVES)
%.asc: % announcement: NEWS ChangeLog $(rel-files)
rm -f $@ @./announce-gen \
gpg --armor --detach-sign -o $@ $<
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz $(signatures)
announce_gen ?= ./announce-gen
announcement: NEWS ChangeLog $(rel-files) $(signatures)
@$(announce_gen) \
--release-type=$(RELEASE_TYPE) \ --release-type=$(RELEASE_TYPE) \
--package=$(PACKAGE) \ --package=$(PACKAGE) \
--prev=$(PREV_VERSION) \ --prev=$(PREV_VERSION) \
@@ -443,14 +523,16 @@ po-update:
# The following pseudo table associates a local directory and a URL # The following pseudo table associates a local directory and a URL
# with each of the files that belongs to some other package and is # with each of the files that belongs to some other package and is
# regularly updated from the specified URL. # regularly updated from the specified URL.
wget_files ?= $(srcdir)/config/config.guess \ wget_files ?= \
$(srcdir)/config/config.sub \ $(srcdir)/build-aux/config.guess \
$(srcdir)/src/ansi2knr.c \ $(srcdir)/build-aux/config.sub \
$(srcdir)/config/texinfo.tex $(srcdir)/build-aux/texinfo.tex \
$(srcdir)/src/ansi2knr.c
get-targets = $(patsubst %, get-%, $(wget_files)) get-targets = $(patsubst %, get-%, $(wget_files))
config.guess-url_prefix = $(ftp-gnu)/config/ config.guess-url_prefix = $(ftp-gnu)/build-aux/
config.sub-url_prefix = $(ftp-gnu)/config/ config.sub-url_prefix = $(ftp-gnu)/build-aux/
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/ ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
@@ -468,11 +550,11 @@ $(get-targets):
&& $(move_if_change) $(target).t $(target) && $(move_if_change) $(target).t $(target)
cvs_files ?= \ cvs_files ?= \
$(srcdir)/src/ansi2knr.c \ $(srcdir)/build-aux/depcomp \
$(srcdir)/config/depcomp \ $(srcdir)/build-aux/install-sh \
$(srcdir)/config/install-sh \ $(srcdir)/build-aux/missing \
$(srcdir)/config/missing \ $(srcdir)/build-aux/mkinstalldirs \
$(srcdir)/config/mkinstalldirs $(srcdir)/src/ansi2knr.c
automake_repo=:pserver:anoncvs:[email protected]:/cvs/automake automake_repo=:pserver:anoncvs:[email protected]:/cvs/automake
.PHONY: wget-update .PHONY: wget-update
wget-update: $(get-targets) wget-update: $(get-targets)
@@ -492,25 +574,26 @@ cvs-update:
done; \ done; \
test "$$fail" && exit 1 test "$$fail" && exit 1
define emit-upload-commands emit_upload_commands:
echo ===================================== @echo =====================================
echo ===================================== @echo =====================================
echo upload $(PACKAGE) $(PREV_VERSION) $(VERSION) @echo "$(srcdir)/gnupload $(GNUPLOADFLAGS) \\"
echo '# send the /tmp/announcement e-mail' @echo " --to $(gnu_rel_host):coreutils \\"
echo ===================================== @echo " $(rel-files)"
echo ===================================== @echo '# send the /tmp/announcement e-mail'
endef @echo =====================================
@echo =====================================
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz $(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
xdelta delta -9 $^ $@ || : xdelta delta -9 $^ $@ || :
.PHONY: alpha beta major .PHONY: alpha beta major
alpha beta major: $(local-check) alpha beta major: news-date-check $(local-check)
$(MAKE) cvs-dist $(MAKE) cvs-dist
$(MAKE) $(xd-delta) $(MAKE) $(xd-delta)
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
ln $(rel-files) $(release_archive_dir) ln $(rel-files) $(release_archive_dir)
chmod a-w $(rel-files) chmod a-w $(rel-files)
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
echo $(VERSION) > $(prev_version_file) echo $(VERSION) > $(prev_version_file)
$(CVS) ci -m. $(prev_version_file) $(CVS) ci -m. $(prev_version_file)
@$(emit-upload-commands)
+76 -27
View File
@@ -1,47 +1,93 @@
Bison News Bison News
---------- ----------
Changes in version 1.875d, 2004-05-21: Changes in version 2.1, 2005-09-16:
* Unescaped newlines are no longer allowed in character constants or * Bison-generated parsers now support the translation of diagnostics like
"syntax error" into languages other than English. The default
language is still English. For details, please see the new
Internationalization section of the Bison manual. Software
distributors should also see the new PACKAGING file. Thanks to
Bruno Haible for this new feature.
* Wording in the Bison-generated parsers has been changed slightly to
simplify translation. In particular, the message "memory exhausted"
has replaced "parser stack overflow", as the old message was not
always accurate for modern Bison-generated parsers.
* Destructors are now called when the parser aborts, for all symbols left
behind on the stack. Also, the start symbol is now destroyed after a
successful parse. In both cases, the behavior was formerly inconsistent.
* When generating verbose diagnostics, Bison-generated parsers no longer
quote the literal strings associated with tokens. For example, for
a syntax error associated with '%token NUM "number"' they might
print 'syntax error, unexpected number' instead of 'syntax error,
unexpected "number"'.
Changes in version 2.0, 2004-12-25:
* Possibly-incompatible changes
- Bison-generated parsers no longer default to using the alloca function
(when available) to extend the parser stack, due to widespread
problems in unchecked stack-overflow detection. You can "#define
YYSTACK_USE_ALLOCA 1" to require the use of alloca, but please read
the manual to determine safe values for YYMAXDEPTH in that case.
- Error token location.
During error recovery, the location of the syntax error is updated
to cover the whole sequence covered by the error token: it includes
the shifted symbols thrown away during the first part of the error
recovery, and the lookahead rejected during the second part.
- Semicolon changes:
. Stray semicolons are no longer allowed at the start of a grammar.
. Semicolons are now required after in-grammar declarations.
- Unescaped newlines are no longer allowed in character constants or
string literals. They were never portable, and GCC 3.4.0 has string literals. They were never portable, and GCC 3.4.0 has
dropped support for them. Better diagnostics are now generated if dropped support for them. Better diagnostics are now generated if
forget a closing quote. forget a closing quote.
* NUL bytes are no longer allowed in Bison string literals, unfortunately. - NUL bytes are no longer allowed in Bison string literals, unfortunately.
* %token numbers can now be hexadecimal integers, e.g., `%token FOO 0x12d'. * New features
This is a GNU extension.
* A new directive "%expect-rr N" specifies the expected number of - GLR grammars now support locations.
- New directive: %initial-action.
This directive allows the user to run arbitrary code (including
initializing @$) from yyparse before parsing starts.
- A new directive "%expect-rr N" specifies the expected number of
reduce/reduce conflicts in GLR parsers. reduce/reduce conflicts in GLR parsers.
* Experimental %destructor support has been added to lalr1.cc. - %token numbers can now be hexadecimal integers, e.g., `%token FOO 0x12d'.
This is a GNU extension.
Changes in version 1.875c, 2003-08-25: - The option `--report=lookahead' was changed to `--report=look-ahead'.
The old spelling still works, but is not documented and will be
removed.
(Just bug fixes.) - Experimental %destructor support has been added to lalr1.cc.
Changes in version 1.875b, 2003-06-17: - New configure option --disable-yacc, to disable installation of the
yacc command and -ly library introduced in 1.875 for POSIX conformance.
* GLR grammars now support locations. * Bug fixes
* Semicolon changes: - For now, %expect-count violations are now just warnings, not errors.
- Semicolons are now allowed before "|" in grammar rules, as POSIX requires.
- Stray semicolons are no longer allowed at the start of a grammar.
- Semicolons are now required after in-grammar declarations.
Changes in version 1.875a, 2003-02-01:
* For now, %expect-count violations are now just warnings, not errors.
This is for compatibility with Bison 1.75 and earlier (when there are This is for compatibility with Bison 1.75 and earlier (when there are
reduce/reduce conflicts) and with Bison 1.30 and earlier (when there reduce/reduce conflicts) and with Bison 1.30 and earlier (when there
are too many or too few shift/reduce conflicts). However, in future are too many or too few shift/reduce conflicts). However, in future
versions of Bison we plan to improve the %expect machinery so that versions of Bison we plan to improve the %expect machinery so that
these violations will become errors again. these violations will become errors again.
* New configure option --disable-yacc, to disable installation of the - Within Bison itself, numbers (e.g., goto numbers) are no longer
yacc command and -ly library introduced in 1.875 for POSIX conformance. arbitrarily limited to 16-bit counts.
- Semicolons are now allowed before "|" in grammar rules, as POSIX requires.
Changes in version 1.875, 2003-01-01: Changes in version 1.875, 2003-01-01:
@@ -213,7 +259,8 @@ Changes in version 1.50, 2002-10-04:
allowed some non-error action other than a default reduction on the allowed some non-error action other than a default reduction on the
error token. The new behavior has long been the documented behavior, error token. The new behavior has long been the documented behavior,
and has long been required by POSIX. For more details, please see and has long been required by POSIX. For more details, please see
<http://mail.gnu.org/pipermail/bug-bison/2002-May/001452.html>. Paul Eggert, "Reductions during Bison error handling" (2002-05-20)
<http://lists.gnu.org/archive/html/bug-bison/2002-05/msg00038.html>.
* Traces * Traces
Popped tokens and nonterminals are now reported. Popped tokens and nonterminals are now reported.
@@ -288,8 +335,8 @@ Changes in version 1.50, 2002-10-04:
produces additional information: produces additional information:
- itemset - itemset
complete the core item sets with their closure complete the core item sets with their closure
- lookahead - lookahead [changed to `look-ahead' in 1.875e and later]
explicitly associate lookaheads to items explicitly associate look-ahead tokens to items
- solved - solved
describe shift/reduce conflicts solving. describe shift/reduce conflicts solving.
Bison used to systematically output this information on top of Bison used to systematically output this information on top of
@@ -376,6 +423,8 @@ Changes in version 1.31, 2002-01-14:
alloca is used only when compiled with GCC, to avoid portability alloca is used only when compiled with GCC, to avoid portability
problems as on AIX. problems as on AIX.
* yyparse now returns 2 if memory is exhausted; formerly it dumped core.
* When the generated parser lacks debugging code, YYDEBUG is now 0 * When the generated parser lacks debugging code, YYDEBUG is now 0
(as POSIX requires) instead of being undefined. (as POSIX requires) instead of being undefined.
@@ -570,7 +619,7 @@ End:
----- -----
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -587,5 +636,5 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with autoconf; see the file COPYING. If not, write to along with autoconf; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. Boston, MA 02110-1301, USA.
+14 -22
View File
@@ -3,33 +3,25 @@ This directory contains the Bison parser generator.
See the file INSTALL for generic compilation and installation instructions. See the file INSTALL for generic compilation and installation instructions.
See the file doc/FAQ for frequently asked questions. See the file doc/FAQ for frequently asked questions.
Bison requires GNU m4 1.4 (or later, if a later version of GNU m4 Bison requires GNU m4 1.4.3 or later. See:
becomes available). The following m4 patches are recommended:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629 ftp://ftp.gnu.org/gnu/m4/m4-1.4.3.tar.gz
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211477
Older versions of Sun Forte Developer 6 update 2 have a compiler bug Bison can work with pre-1.4.3 distributions of GNU m4 if they are
that cause "make check" to fail with a "Encounter BINCL entry" sufficiently patched, but if you encounter a bug with an older
diagnostic. To fix the bug, update to the latest set of Solaris and distribution and report a bug we will probably suggest that you
Forte patches recommended by Sun. upgrade to 1.4.3 as the first step in trying to fix it.
VMS and MS-DOS builds are probably broken right now. If you are able Please send bug reports to <[email protected]>. Please include the
to build Bison on either platform and you need to make changes to do version number from `bison --version', and a complete, self-contained
so, please submit those changes as a bug report. On VMS, you will test case in each bug report.
probably have to create Makefile from Makefile.in by hand. Remember
to do `SET COMMAND BISON' to install the data in `BISON.CLD'.
Send bug reports to <[email protected]>. Please include the version If you have questions about using Bison and the documentation does
number from `bison --version', and a complete, self-contained test not answer them, please send mail to <[email protected]>.
case in each bug report.
If you have questions about using Bison which the documentation does
not answer, send mail to <[email protected]>.
----- -----
Copyright (C) 1992, 1998, 1999, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -45,5 +37,5 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with autoconf; see the file COPYING. If not, write to along with autoconf; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. Boston, MA 02110-1301, USA.
+11 -1
View File
@@ -5,10 +5,13 @@ Airy Andre [email protected]
Akim Demaille [email protected] Akim Demaille [email protected]
Albert Chin-A-Young [email protected] Albert Chin-A-Young [email protected]
Alexander Belopolsky [email protected] Alexander Belopolsky [email protected]
Alexandre Duret-Lutz [email protected]
Andreas Schwab [email protected] Andreas Schwab [email protected]
Andrew Suffield [email protected] Andrew Suffield [email protected]
Anthony Heading [email protected]
Arnold Robbins [email protected] Arnold Robbins [email protected]
Art Haas [email protected] Art Haas [email protected]
Baron Schwartz [email protected]
Benoit Perrot [email protected] Benoit Perrot [email protected]
Bert Deknuydt [email protected] Bert Deknuydt [email protected]
Bruce Lilly [email protected] Bruce Lilly [email protected]
@@ -23,12 +26,15 @@ Enrico Scholz [email protected]
Evgeny Stambulchik [email protected] Evgeny Stambulchik [email protected]
Fabrice Bauzac [email protected] Fabrice Bauzac [email protected]
Florian Krohm [email protected] Florian Krohm [email protected]
Frank Heckenbach [email protected]
Guido Trentalancia [email protected]
H. Merijn Brand [email protected] H. Merijn Brand [email protected]
Hans Aberg [email protected] Hans Aberg [email protected]
Jan Nieuwenhuizen [email protected] Jan Nieuwenhuizen [email protected]
Jesse Thilo [email protected] Jesse Thilo [email protected]
Jim Kent [email protected] Jim Kent [email protected]
Jim Meyering [email protected] Jim Meyering [email protected]
Joel E. Denny [email protected]
Juan Manuel Guerrero [email protected] Juan Manuel Guerrero [email protected]
Kees Zeelenberg [email protected] Kees Zeelenberg [email protected]
Keith Browne [email protected] Keith Browne [email protected]
@@ -46,9 +52,10 @@ Nicolas Burrus [email protected]
Nicolas Tisserand [email protected] Nicolas Tisserand [email protected]
Noah Friedman [email protected] Noah Friedman [email protected]
Pascal Bart [email protected] Pascal Bart [email protected]
Paul Eggert eggert@twinsun.com Paul Eggert eggert@cs.ucla.edu
Paul Hilfinger [email protected] Paul Hilfinger [email protected]
Per Allansson [email protected] Per Allansson [email protected]
Peter Fales [email protected]
Peter Hamorsky [email protected] Peter Hamorsky [email protected]
Piotr Gackiewicz [email protected] Piotr Gackiewicz [email protected]
Quoc Peyrot [email protected] Quoc Peyrot [email protected]
@@ -61,10 +68,13 @@ Tim Josling [email protected]
Tim Van Holder [email protected] Tim Van Holder [email protected]
Tom Lane [email protected] Tom Lane [email protected]
Tom Tromey [email protected] Tom Tromey [email protected]
Troy A. Johnson [email protected]
Vin Shelton [email protected]
Wayne Green [email protected] Wayne Green [email protected]
Wolfram Wagner [email protected] Wolfram Wagner [email protected]
Wwp [email protected] Wwp [email protected]
Zack Weinberg [email protected] Zack Weinberg [email protected]
[email protected]
Many people are not named here because we lost track of them. We Many people are not named here because we lost track of them. We
thank them! Please, help us keeping this list up to date. thank them! Please, help us keeping this list up to date.
+28 -20
View File
@@ -12,24 +12,22 @@ They should not: it is not documented. But if they need to, let's
find something clean (not like YYLSP_NEEDED...). find something clean (not like YYLSP_NEEDED...).
* URGENT: Documenting C++ output
Write a first documentation for C++ output.
* Documentation * Documentation
Before releasing, make sure the documentation ("Understanding your Before releasing, make sure the documentation ("Understanding your
parser") refers to the current `output' format. parser") refers to the current `output' format.
* lalr1.cc
** vector
Move to using vector, drop stack.hh.
* GLR & C++ ** I18n
Currently, the GLR parser cannot compile with a C++ compiler. Catch up with yacc.c.
* Report * Report
** GLR ** GLR
How would Paul like to display the conflicted actions? In particular, How would Paul like to display the conflicted actions? In particular,
what when two reductions are possible on a given lookahead, but one is what when two reductions are possible on a given look-ahead token, but one is
part of $default. Should we make the two reductions explicit, or just part of $default. Should we make the two reductions explicit, or just
keep $default? See the following point. keep $default? See the following point.
@@ -52,14 +50,7 @@ DeRemer and Penello: they already provide the algorithm.
* Extensions * Extensions
** %destructor ** Labeling the symbols
I think we should document it as experimental, and allow its use in
the next releases. But we also need to port it to GLR. What about
lalr1.cc? Well, read what Hans reported, maybe we don't want
%detructor. On the other hand, there is no reason not to provide it:
users can avoid its use.
** $foo
Have a look at the Lemon parser generator: instead of $1, $2 etc. they Have a look at the Lemon parser generator: instead of $1, $2 etc. they
can name the values. This is much more pleasant. For instance: can name the values. This is much more pleasant. For instance:
@@ -69,6 +60,21 @@ I love this. I have been bitten too often by the removal of the
symbol, and forgetting to shift all the $n to $n-1. If you are symbol, and forgetting to shift all the $n to $n-1. If you are
unlucky, it compiles... unlucky, it compiles...
But instead of using $a etc., we can use regular variables. And
instead of using (), I propose to use `:' (again). Paul suggests
supporting `->' in addition to `:' to separate LHS and RHS. In other
words:
r:exp -> a:exp '+' b:exp { r = a + b; };
That requires an significant improvement of the grammar parser. Using
GLR would be nice. It also requires that Bison know the type of the
symbols (which will be useful for %include anyway). So we have some
time before...
Note that there remains the problem of locations: `@r'?
** $-1 ** $-1
We should find a means to provide an access to values deep in the We should find a means to provide an access to values deep in the
stack. For instance, instead of stack. For instance, instead of
@@ -192,7 +198,9 @@ Paul notes:
PDP-10 ports :-) but they should probably be documented PDP-10 ports :-) but they should probably be documented
somewhere. somewhere.
More importantly, Bison does not currently allow NUL bytes in
tokens, either via escapes (e.g., "x\0y") or via a NUL byte in
the source code. This should get fixed.
* --graph * --graph
Show reductions. [] Show reductions. []
@@ -337,7 +345,7 @@ the parser with a means to create the (visual) parse tree.
----- -----
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Bison. This file is part of GNU Bison.
@@ -353,5 +361,5 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. Boston, MA 02110-1301, USA.
+243 -304
View File
@@ -1,7 +1,7 @@
# generated automatically by aclocal 1.8.5 -*- Autoconf -*- # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# Free Software Foundation, Inc. # 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -11,55 +11,32 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
# -*- Autoconf -*- # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003 Free Software Foundation, Inc. #
# Generated from amversion.in; do not edit by hand. # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# This program is free software; you can redistribute it and/or modify # with or without modifications, as long as this notice is preserved.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION) # AM_AUTOMAKE_VERSION(VERSION)
# ---------------------------- # ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been # Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y. # generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION # AM_SET_CURRENT_AUTOMAKE_VERSION
# ------------------------------- # -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced. # Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.8.5])]) [AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify # This file is free software; the Free Software Foundation
# it under the terms of the GNU General Public License as published by # gives unlimited permission to copy and/or distribute it,
# the Free Software Foundation; either version 2, or (at your option) # with or without modifications, as long as this notice is preserved.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@@ -107,25 +84,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
]) ])
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 4
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# This was merged into AC_PROG_CC in Autoconf. # This was merged into AC_PROG_CC in Autoconf.
@@ -142,24 +108,14 @@ AU_DEFUN([fp_PROG_CC_STDC])
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 7
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 6
# AM_CONDITIONAL(NAME, SHELL-CONDITION) # AM_CONDITIONAL(NAME, SHELL-CONDITION)
# ------------------------------------- # -------------------------------------
@@ -179,30 +135,19 @@ else
fi fi
AC_CONFIG_COMMANDS_PRE( AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([conditional "$1" was never defined. AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# serial 7 -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 8
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4, # written in clear, in which case automake, when reading aclocal.m4,
@@ -211,7 +156,6 @@ fi])])
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME) # _AM_DEPENDENCIES(NAME)
# ---------------------- # ----------------------
# See how the compiler implements dependency checking. # See how the compiler implements dependency checking.
@@ -353,24 +297,14 @@ AC_SUBST([AMDEPBACKSLASH])
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify #serial 3
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS # _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------ # ------------------------------
@@ -389,27 +323,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
else else
continue continue
fi fi
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEPDIR, am__include, and am__quote
# Extract the definition of DEP_FILES from the Makefile without # from the Makefile without running `make'.
# running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it # When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"` U=`sed -n 's/^U = //p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # Find all dependency output files, they are included files with
# We invoke sed twice because it is the simplest approach to # $(DEPDIR) in their names. We invoke sed twice because it is the
# changing $(DEPDIR) to its actual value in the expansion. # simplest approach to changing $(DEPDIR) to its actual value in the
for file in `sed -n ' # expansion.
/^DEP_FILES = .*\\\\$/ { for file in `sed -n "
s/^DEP_FILES = // s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists. # Make sure the directory exists.
test -f "$dirpart/$file" && continue test -f "$dirpart/$file" && continue
@@ -437,28 +365,17 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# This macro actually does too much some checks are only needed if # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# your package does certain things. But this isn't really a big deal.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 12
# 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, # This macro actually does too much. Some checks are only needed if
# but WITHOUT ANY WARRANTY; without even the implied warranty of # your package does certain things. But this isn't really a big deal.
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 11
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS]) # AM_INIT_AUTOMAKE([OPTIONS])
@@ -516,7 +433,6 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl
@@ -525,7 +441,9 @@ AC_REQUIRE([AM_PROG_MKDIR_P])dnl
AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],, _AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC], [AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)], [_AM_DEPENDENCIES(CC)],
@@ -559,51 +477,27 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH # AM_PROG_INSTALL_SH
# ------------------ # ------------------
# Define $install_sh. # Define $install_sh.
# Copyright (C) 2001, 2003 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH], AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"} install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)]) AC_SUBST(install_sh)])
# -*- Autoconf -*- # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2003 Free Software Foundation, Inc. #
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 2
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# Check whether the underlying file-system supports filenames # Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't. # with a leading dot. For instance MS-DOS doesn't.
@@ -620,24 +514,13 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 3
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE() # AM_MAKE_INCLUDE()
# ----------------- # -----------------
@@ -681,27 +564,16 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf rm -f confinc confmf
]) ])
# -*- Autoconf -*- # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # serial 4
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM) # AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------ # ------------------------------
@@ -727,27 +599,16 @@ else
fi fi
]) ])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P # AM_PROG_MKDIR_P
# --------------- # ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the # created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077). # installer happens to have an overly restrictive umask (e.g. 077).
@@ -768,13 +629,21 @@ fi
# this.) # this.)
AC_DEFUN([AM_PROG_MKDIR_P], AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# Keeping the `.' argument allows $(mkdir_p) to be used without # We used to keeping the `.' as first argument, in order to
# argument. Indeed, we sometimes output rules like # allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir) # $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. # where $(somedir) is conditionally defined. However this is wrong
# (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # for two reasons:
# expensive solution, as it forces Make to start a sub-shell.) # 1. if the package is installed by a user who cannot write `.'
mkdir_p='mkdir -p -- .' # make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else else
# On NextStep and OpenStep, the `mkdir' command does not # On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as # recognize any option. It will interpret all options as
@@ -795,24 +664,13 @@ AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is free software; you can redistribute it and/or modify # serial 3
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME) # _AM_MANGLE_OPTION(NAME)
# ----------------------- # -----------------------
@@ -837,28 +695,16 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION], AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
# #
# Check to make sure that the build environment is sane. # This file is free software; the Free Software Foundation
# # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # serial 4
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_SANITY_CHECK # AM_SANITY_CHECK
# --------------- # ---------------
@@ -901,25 +747,14 @@ Check your system clock])
fi fi
AC_MSG_RESULT(yes)]) AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP # AM_PROG_INSTALL_STRIP
# ---------------------
# Copyright (C) 2001, 2003 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# One issue with vendor `install' (even GNU) is that you can't # One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially # specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip # annoying in cross-compiling environments, where the build's strip
@@ -940,7 +775,105 @@ fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/alloca.m4]) m4_include([m4/alloca.m4])
m4_include([m4/bison-i18n.m4])
m4_include([m4/cxx.m4])
m4_include([m4/dirname.m4]) m4_include([m4/dirname.m4])
m4_include([m4/dmalloc.m4]) m4_include([m4/dmalloc.m4])
m4_include([m4/dos.m4]) m4_include([m4/dos.m4])
@@ -948,14 +881,15 @@ m4_include([m4/error.m4])
m4_include([m4/exitfail.m4]) m4_include([m4/exitfail.m4])
m4_include([m4/extensions.m4]) m4_include([m4/extensions.m4])
m4_include([m4/getopt.m4]) m4_include([m4/getopt.m4])
m4_include([m4/gettext.m4]) m4_include([m4/gettext_gl.m4])
m4_include([m4/gnulib.m4]) m4_include([m4/gnulib.m4])
m4_include([m4/hard-locale.m4]) m4_include([m4/hard-locale.m4])
m4_include([m4/hash.m4]) m4_include([m4/hash.m4])
m4_include([m4/iconv.m4]) m4_include([m4/iconv.m4])
m4_include([m4/lib-ld.m4]) m4_include([m4/inttypes_h_gl.m4])
m4_include([m4/lib-ld_gl.m4])
m4_include([m4/lib-link.m4]) m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4]) m4_include([m4/lib-prefix_gl.m4])
m4_include([m4/m4.m4]) m4_include([m4/m4.m4])
m4_include([m4/mbrtowc.m4]) m4_include([m4/mbrtowc.m4])
m4_include([m4/mbstate_t.m4]) m4_include([m4/mbstate_t.m4])
@@ -963,17 +897,22 @@ m4_include([m4/mbswidth.m4])
m4_include([m4/nls.m4]) m4_include([m4/nls.m4])
m4_include([m4/obstack.m4]) m4_include([m4/obstack.m4])
m4_include([m4/onceonly.m4]) m4_include([m4/onceonly.m4])
m4_include([m4/po.m4]) m4_include([m4/po_gl.m4])
m4_include([m4/progtest.m4]) m4_include([m4/progtest.m4])
m4_include([m4/quote.m4]) m4_include([m4/quote.m4])
m4_include([m4/quotearg.m4]) m4_include([m4/quotearg.m4])
m4_include([m4/stdbool.m4]) m4_include([m4/stdbool.m4])
m4_include([m4/stdint_h_gl.m4])
m4_include([m4/stdio-safer.m4])
m4_include([m4/stpcpy.m4]) m4_include([m4/stpcpy.m4])
m4_include([m4/strdup.m4])
m4_include([m4/strndup.m4]) m4_include([m4/strndup.m4])
m4_include([m4/strnlen.m4]) m4_include([m4/strnlen.m4])
m4_include([m4/subpipe.m4]) m4_include([m4/subpipe.m4])
m4_include([m4/timevar.m4]) m4_include([m4/timevar.m4])
m4_include([m4/unlocked-io.m4]) m4_include([m4/uintmax_t_gl.m4])
m4_include([m4/ulonglong_gl.m4])
m4_include([m4/unistd-safer.m4])
m4_include([m4/warning.m4]) m4_include([m4/warning.m4])
m4_include([m4/xalloc.m4]) m4_include([m4/xalloc.m4])
m4_include([m4/xstrndup.m4]) m4_include([m4/xstrndup.m4])
+54 -67
View File
@@ -15,17 +15,17 @@
/* Define on systems for which file names may have a so-called `drive letter' /* Define on systems for which file names may have a so-called `drive letter'
prefix, define this to compute the length of that prefix, including the prefix, define this to compute the length of that prefix, including the
colon. */ colon. */
#undef FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX #undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
/* Define if the backslash character may also serve as a file name component /* Define if the backslash character may also serve as a file name component
separator. */ separator. */
#undef FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR #undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX #if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
# define FILESYSTEM_PREFIX_LEN(Filename) \ # define FILE_SYSTEM_PREFIX_LEN(Filename) \
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0) ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
#else #else
# define FILESYSTEM_PREFIX_LEN(Filename) 0 # define FILE_SYSTEM_PREFIX_LEN(Filename) 0
#endif #endif
/* Define to 1 if you have `alloca' after including <alloca.h>, a header that /* Define to 1 if you have `alloca' after including <alloca.h>, a header that
@@ -36,6 +36,14 @@
includes <alloca.h> only if HAVE_ALLOCA_H is defined. */ includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
#undef HAVE_ALLOCA_H #undef HAVE_ALLOCA_H
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define to 1 if the system has the type `clock_t'. */ /* Define to 1 if the system has the type `clock_t'. */
#undef HAVE_CLOCK_T #undef HAVE_CLOCK_T
@@ -43,54 +51,10 @@
*/ */
#undef HAVE_DCGETTEXT #undef HAVE_DCGETTEXT
/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_CLEARERR_UNLOCKED
/* Define to 1 if you have the declaration of `clock', and to 0 if you don't. /* Define to 1 if you have the declaration of `clock', and to 0 if you don't.
*/ */
#undef HAVE_DECL_CLOCK #undef HAVE_DECL_CLOCK
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_FEOF_UNLOCKED
/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FERROR_UNLOCKED
/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FFLUSH_UNLOCKED
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETS_UNLOCKED
/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FPUTC_UNLOCKED
/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FPUTS_UNLOCKED
/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FREAD_UNLOCKED
/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_GETCHAR_UNLOCKED
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if you have the declaration of `getrusage', and to 0 if you /* Define to 1 if you have the declaration of `getrusage', and to 0 if you
don't. */ don't. */
#undef HAVE_DECL_GETRUSAGE #undef HAVE_DECL_GETRUSAGE
@@ -99,13 +63,9 @@
otherwise. */ otherwise. */
#undef HAVE_DECL_MBSWIDTH_IN_WCHAR_H #undef HAVE_DECL_MBSWIDTH_IN_WCHAR_H
/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
you don't. */ */
#undef HAVE_DECL_PUTCHAR_UNLOCKED #undef HAVE_DECL_STRDUP
/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_PUTC_UNLOCKED
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */ don't. */
@@ -130,12 +90,15 @@
/* Define to 1 if you have the `dup2' function. */ /* Define to 1 if you have the `dup2' function. */
#undef HAVE_DUP2 #undef HAVE_DUP2
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fork' function. */ /* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK #undef HAVE_FORK
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long_only' function. */
#undef HAVE_GETOPT_LONG_ONLY
/* Define if the GNU gettext() function is already present or preinstalled. */ /* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT #undef HAVE_GETTEXT
@@ -145,6 +108,10 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
/* Define to 1 if you have the `isascii' function. */ /* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII #undef HAVE_ISASCII
@@ -176,10 +143,6 @@
/* Define to 1 if libc includes obstacks. */ /* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK #undef HAVE_OBSTACK
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#undef HAVE_REALLOC
/* Define to 1 if you have the `setlocale' function. */ /* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE #undef HAVE_SETLOCALE
@@ -189,12 +152,19 @@
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
#undef HAVE_STDINT_H_WITH_UINTMAX
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
/* Define to 1 if you have the `stpcpy' function. */ /* Define to 1 if you have the `stpcpy' function. */
#undef HAVE_STPCPY #undef HAVE_STPCPY
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror_r' function. */ /* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R #undef HAVE_STRERROR_R
@@ -231,12 +201,18 @@
/* Define to 1 if you have the `times' function. */ /* Define to 1 if you have the `times' function. */
#undef HAVE_TIMES #undef HAVE_TIMES
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_UINTMAX_T
/* Define to 1 if the system has the type `uintptr_t'. */ /* Define to 1 if the system has the type `uintptr_t'. */
#undef HAVE_UINTPTR_T #undef HAVE_UINTPTR_T
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define if you have the 'unsigned long long' type. */
#undef HAVE_UNSIGNED_LONG_LONG
/* Define to 1 if you have the `vfork' function. */ /* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK #undef HAVE_VFORK
@@ -264,7 +240,7 @@
/* Define to 1 if the system has the type `_Bool'. */ /* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL #undef HAVE__BOOL
#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR #if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
# define ISSLASH(C) ((C) == '/' || (C) == '\\') # define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else #else
# define ISSLASH(C) ((C) == '/') # define ISSLASH(C) ((C) == '/')
@@ -311,6 +287,9 @@
/* Define if using the dmalloc debugging malloc package */ /* Define if using the dmalloc debugging malloc package */
#undef WITH_DMALLOC #undef WITH_DMALLOC
/* Define to 1 to internationalize bison runtime messages. */
#undef YYENABLE_NLS
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */ `char[]'. */
#undef YYTEXT_POINTER #undef YYTEXT_POINTER
@@ -341,6 +320,13 @@
#ifndef __EXTENSIONS__ #ifndef __EXTENSIONS__
# undef __EXTENSIONS__ # undef __EXTENSIONS__
#endif #endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
#undef __GETOPT_PREFIX
/* Define to `__inline__' or `__inline' if that's what the C compiler /* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */ calls it, or to nothing if 'inline' is not supported under any name. */
@@ -360,11 +346,12 @@
/* Define to `int' if <sys/types.h> does not define. */ /* Define to `int' if <sys/types.h> does not define. */
#undef pid_t #undef pid_t
/* Define to rpl_realloc if the replacement function should be used. */
#undef realloc
/* Define to rpl_strnlen if the replacement function should be used. */ /* Define to rpl_strnlen if the replacement function should be used. */
#undef strnlen #undef strnlen
/* Define to unsigned long or unsigned long long if <stdint.h> and
<inttypes.h> don't define. */
#undef uintmax_t
/* Define as `fork' if `vfork' does not work. */ /* Define as `fork' if `vfork' does not work. */
#undef vfork #undef vfork
-2
View File
@@ -1,2 +0,0 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
EXTRA_DIST = move-if-change prev-version.txt config.rpath
-338
View File
@@ -1,338 +0,0 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
subdir = config
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in config.guess \
config.rpath config.sub depcomp install-sh mdate-sh missing \
mkinstalldirs texinfo.tex ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/m4.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
$(top_srcdir)/m4/subpipe.m4 $(top_srcdir)/m4/timevar.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/warning.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOM4TE = @AUTOM4TE@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GCC = @GCC@
GMSGFMT = @GMSGFMT@
HAVE__BOOL = @HAVE__BOOL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
O0CFLAGS = @O0CFLAGS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YACC_LIBRARY = @YACC_LIBRARY@
YACC_SCRIPT = @YACC_SCRIPT@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = move-if-change prev-version.txt config.rpath
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu config/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-1459
View File
File diff suppressed because it is too large Load Diff
-548
View File
@@ -1,548 +0,0 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2003 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <[email protected]>, 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 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
case $CC in
icc|ecc)
wl='-Wl,'
;;
ccc)
wl='-Wl,'
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
sysv4*MP*)
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <[email protected]> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi4*)
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
hardcode_direct=no
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
;;
aix4* | aix5*)
;;
amigaos*)
;;
beos*)
;;
bsdi4*)
;;
cygwin* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
freebsd*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
;;
netbsd*)
;;
newsos6)
;;
nto-qnx)
;;
openbsd*)
;;
os2*)
libname_spec='$name'
shrext=.dll
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
sysv4*MP*)
;;
uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF
-1549
View File
File diff suppressed because it is too large Load Diff
-526
View File
@@ -1,526 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2004-04-25.13
# Copyright (C) 1999, 2000, 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# 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 <[email protected]>.
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'.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <[email protected]>.
EOF
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit 0
;;
esac
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
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
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
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.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
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 ' ' '
' < "$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.
## 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"
;;
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 ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$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"
;;
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.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$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 understands `-MD -MF file'. However on
# icc -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 ... \
# ...
"$@" -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 "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
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
# Dependencies are output in .lo.d with libtool 1.4.
# They are output in .o.d with libtool 1.5.
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#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 $1 != '--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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$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 $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
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.
-*|$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"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## 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 $1 != '--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 '/^# [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, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
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-end: "$"
# End:
-325
View File
@@ -1,325 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2004-04-01.17
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=
transform_arg=
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 -d DIRECTORIES...
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
In the second, create the directory path DIR.
Options:
-b=TRANSFORMBASENAME
-c copy source (using $cpprog) instead of moving (using $mvprog).
-d create directories instead of installing files.
-g GROUP $chgrp installed files to GROUP.
-m MODE $chmod installed files to MODE.
-o USER $chown installed files to USER.
-s strip installed files (using $stripprog).
-t=TRANSFORM
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit 0;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
test -n "$dir_arg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
instcmd=:
chmodcmd=
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp" || lasterr=$?
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $instcmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
# If we're going to rename the final executable, determine the name now.
if test -z "$transformarg"; then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename \
| sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename.
test -z "$dstfile" && dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
-170
View File
@@ -1,170 +0,0 @@
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
scriptversion=2003-11-09.00
# Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
# written by Ulrich Drepper <[email protected]>, June 1995
#
# 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, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 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 <[email protected]> or send patches to
# <[email protected]>.
case $1 in
'')
echo "$0: No file. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: mdate-sh [--help] [--version] FILE
Pretty-print the modification time of FILE.
Report bugs to <[email protected]>.
EOF
exit 0
;;
-v | --v*)
echo "mdate-sh $scriptversion"
exit 0
;;
esac
# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME
save_arg1="$1"
# Find out how to get the extended ls output of a file or directory.
if ls -L /dev/null 1>/dev/null 2>&1; then
ls_command='ls -L -l -d'
else
ls_command='ls -l -d'
fi
# A `ls -l' line looks as follows on OS/2.
# drwxrwx--- 0 Aug 11 2001 foo
# This differs from Unix, which adds ownership information.
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
#
# To find the date, we split the line on spaces and iterate on words
# until we find a month. This cannot work with files whose owner is a
# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
# will be owned by a user whose name is a month. So we first look at
# the extended ls output of the root directory to decide how many
# words should be skipped to get the date.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
set - x`$ls_command /`
# Find which argument is the month.
month=
command=
until test $month
do
shift
# Add another shift to the command.
command="$command shift;"
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
done
# Get the extended ls output of the file or directory.
set - x`eval "$ls_command \"\$save_arg1\""`
# Remove all preceding arguments
eval $command
# Get the month. Next argument is day, followed by the year or time.
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
day=$2
# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
*:*) set `date`; eval year=\$$#
case $2 in
Jan) nummonthtod=1;;
Feb) nummonthtod=2;;
Mar) nummonthtod=3;;
Apr) nummonthtod=4;;
May) nummonthtod=5;;
Jun) nummonthtod=6;;
Jul) nummonthtod=7;;
Aug) nummonthtod=8;;
Sep) nummonthtod=9;;
Oct) nummonthtod=10;;
Nov) nummonthtod=11;;
Dec) nummonthtod=12;;
esac
# For the first six month of the year the time notation can also
# be used for files modified in the last year.
if (expr $nummonth \> $nummonthtod) > /dev/null;
then
year=`expr $year - 1`
fi;;
*) year=$3;;
esac
# The result.
echo $day $month $year
# 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-end: "$"
# End:
-360
View File
@@ -1,360 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2003-09-02.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <[email protected]>, 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# 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=:
# 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
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-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'
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
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <[email protected]>."
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
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 [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -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 [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
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 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
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."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
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-end: "$"
# End:
-150
View File
@@ -1,150 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman <[email protected]>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <[email protected]> or send patches to
# <[email protected]>.
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <[email protected]>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# 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-end: "$"
# End:
-17
View File
@@ -1,17 +0,0 @@
#!/bin/sh
# Like mv $1 $2, but if the files are the same, just delete $1.
# Status is 0 if $2 is changed, 1 otherwise.
if
test -r $2
then
if
cmp -s $1 $2
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi
-1
View File
@@ -1 +0,0 @@
1.75
File diff suppressed because it is too large Load Diff
-222
View File
@@ -1,222 +0,0 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
scriptversion=2003-11-18.20
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003
# Free Software Foundation, Inc.
#
# Written by Tom Tromey <[email protected]>.
#
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 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 <[email protected]> or send patches to
# <[email protected]>.
case "$1" in
'')
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
exit 1
;;
--basedir)
basedir=$2
shift 2
;;
-h|--h*)
cat <<\EOF
Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
Wrapper for lex/yacc invocations, renaming files as desired.
INPUT is the input file
OUTPUT is one file PROG generates
DESIRED is the file we actually want instead of OUTPUT
PROGRAM is program to run
ARGS are passed to PROG
Any number of OUTPUT,DESIRED pairs may be used.
Report bugs to <[email protected]>.
EOF
exit 0
;;
-v|--v*)
echo "ylwrap $scriptversion"
exit 0
;;
esac
# The input.
input="$1"
shift
case "$input" in
[\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute.
input="`pwd`/$input"
;;
esac
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
shift
break
fi
pairlist="$pairlist $1"
shift
done
# The program to run.
prog="$1"
shift
# Make any relative path in $prog absolute.
case "$prog" in
[\\/]* | ?:[\\/]*) ;;
*[\\/]*) prog="`pwd`/$prog" ;;
esac
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
case $# in
0) $prog "$input" ;;
*) $prog "$@" "$input" ;;
esac
status=$?
if test $status -eq 0; then
set X $pairlist
shift
first=yes
# Since DOS filename conventions don't allow two dots,
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
y_tab_nodot="no"
if test -f y_tab.c || test -f y_tab.h; then
y_tab_nodot="yes"
fi
# The directory holding the input.
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
# Quote $INPUT_DIR so we can use it in a regexp.
# FIXME: really we should care about more than `.' and `\'.
input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
while test "$#" -ne 0; do
from="$1"
# Handle y_tab.c and y_tab.h output by DOS
if test $y_tab_nodot = "yes"; then
if test $from = "y.tab.c"; then
from="y_tab.c"
else
if test $from = "y.tab.h"; then
from="y_tab.h"
fi
fi
fi
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
[\\/]* | ?:[\\/]*) target="$2";;
*) target="../$2";;
esac
# We do not want to overwrite a header file if it hasn't
# changed. This avoid useless recompilations. However the
# parser itself (the first file) should always be updated,
# because it is the destination of the .y.c rule in the
# Makefile. Divert the output of all other files to a temporary
# file so we can compare them to existing versions.
if test $first = no; then
realtarget="$target"
target="tmp-`echo $target | sed s/.*[\\/]//g`"
fi
# Edit out `#line' or `#' directives.
#
# We don't want the resulting debug information to point at
# an absolute srcdir; it is better for it to just mention the
# .y file with no path.
#
# We want to use the real output file name, not yy.lex.c for
# instance.
#
# We want the include guards to be adjusted too.
FROM=`echo "$from" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
TARGET=`echo "$2" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
-e "s,$FROM,$TARGET," "$from" >"$target" || status=$?
# Check whether header files must be updated.
if test $first = no; then
if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
echo "$2" is unchanged
rm -f "$target"
else
echo updating "$2"
mv -f "$target" "$realtarget"
fi
fi
else
# A missing file is only an error for the first file. This
# is a blatant hack to let us support using "yacc -d". If -d
# is not specified, we don't want an error when the header
# file is "missing".
if test $first = yes; then
status=1
fi
fi
shift
shift
first=no
done
else
status=$?
fi
# Remove the directory.
cd ..
rm -rf $dirname
exit $status
# 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-end: "$"
# End:
+1447 -1580
View File
File diff suppressed because it is too large Load Diff
+27 -10
View File
@@ -1,6 +1,6 @@
# Configure template for GNU Bison. -*-Autoconf-*- # Configure template for GNU Bison. -*-Autoconf-*-
# #
# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@@ -14,17 +14,21 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02111-1307 USA # 02110-1301 USA
# We need a recent Autoconf to run a recent Autotest. # This file uses AC_CONFIG_MACRO_DIR, so we need Autoconf 2.58 or better.
AC_PREREQ(2.57) # But Autoconf 2.58 has a bug in the way that it generates tests: it
# puts the wrong absolute path names in the tests. So we need at
# least Autoconf 2.59.
AC_PREREQ(2.59)
AC_INIT([GNU Bison], [1.875d], [[email protected]]) AC_INIT([GNU Bison], [2.1], [[email protected]])
AC_CONFIG_AUX_DIR([config]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.7 check-news readme-alpha dist-bzip2]) # We don't have a file m4/Makefile.am, so we need Automake 1.8 or later.
AM_INIT_AUTOMAKE([1.8 check-news readme-alpha dist-bzip2])
AC_CONFIG_HEADERS([config.h:config.hin]) AC_CONFIG_HEADERS([config.h:config.hin])
gl_USE_SYSTEM_EXTENSIONS gl_USE_SYSTEM_EXTENSIONS
@@ -103,7 +107,15 @@ BISON_PREREQ_TIMEVAR
# gnulib and gettext. # gnulib and gettext.
GNULIB_AUTOCONF_SNIPPET GNULIB_AUTOCONF_SNIPPET
AM_GNU_GETTEXT_VERSION([0.14.1]) # We use po/Makevars, so we need at least gettext 0.12.
AM_GNU_GETTEXT_VERSION([0.12])
BISON_I18N
# Internationalized parsers.
AC_CONFIG_FILES([runtime-po/Makefile.in])
# Autoconf macros for packages using internationalized parsers.
aclocaldir='${datadir}/aclocal'
AC_SUBST([aclocaldir])
# Initialize the test suite. # Initialize the test suite.
AC_CONFIG_TESTDIR(tests) AC_CONFIG_TESTDIR(tests)
@@ -111,15 +123,20 @@ AC_CONFIG_FILES([tests/Makefile tests/atlocal])
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison]) AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
AC_CHECK_PROGS([VALGRIND], [valgrind]) AC_CHECK_PROGS([VALGRIND], [valgrind])
AC_PROG_CXX AC_PROG_CXX
BISON_TEST_FOR_WORKING_CXX_COMPILER
AM_MISSING_PROG([AUTOM4TE], [autom4te]) AM_MISSING_PROG([AUTOM4TE], [autom4te])
# Needed by tests/atlocal.in. # Needed by tests/atlocal.in.
AC_SUBST([GCC]) AC_SUBST([GCC])
O0CFLAGS=`echo $CFLAGS | sed 's/-O[0-9] *//'` O0CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]] *//'`
AC_SUBST([O0CFLAGS]) AC_SUBST([O0CFLAGS])
O0CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[[0-9]] *//'`
AC_SUBST([O0CXXFLAGS])
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
config/Makefile config/Makefile
po/Makefile.in po/Makefile.in
data/Makefile data/Makefile
examples/Makefile
examples/calc++/Makefile
lib/Makefile src/Makefile doc/Makefile]) lib/Makefile src/Makefile doc/Makefile])
AC_OUTPUT AC_OUTPUT
+6 -4
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2002 Free Software Foundation, Inc. ## Copyright (C) 2002, 2005 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify ## 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 ## it under the terms of the GNU General Public License as published by
@@ -12,10 +12,12 @@
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02111-1307 USA ## 02110-1301 USA
dist_pkgdata_DATA = README c.m4 yacc.c lalr1.cc glr.c dist_pkgdata_DATA = README \
c.m4 yacc.c glr.c \
c++.m4 lalr1.cc
m4sugardir = $(pkgdatadir)/m4sugar m4sugardir = $(pkgdatadir)/m4sugar
dist_m4sugar_DATA = m4sugar/m4sugar.m4 dist_m4sugar_DATA = m4sugar/m4sugar.m4
+40 -17
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am. # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -34,38 +34,50 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = data subdir = data
DIST_COMMON = README $(dist_m4sugar_DATA) $(dist_pkgdata_DATA) \ DIST_COMMON = README $(dist_m4sugar_DATA) $(dist_pkgdata_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/bison-i18n.m4 $(top_srcdir)/m4/cxx.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext_gl.m4 \
$(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \ $(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/inttypes_h_gl.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/lib-ld_gl.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix_gl.m4 $(top_srcdir)/m4/m4.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \ $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/po_gl.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stpcpy.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h_gl.m4 \
$(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/subpipe.m4 $(top_srcdir)/m4/timevar.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/warning.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/subpipe.m4 \
$(top_srcdir)/m4/timevar.m4 $(top_srcdir)/m4/uintmax_t_gl.m4 \
$(top_srcdir)/m4/ulonglong_gl.m4 \
$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/warning.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(m4sugardir)" "$(DESTDIR)$(pkgdatadir)" am__installdirs = "$(DESTDIR)$(m4sugardir)" "$(DESTDIR)$(pkgdatadir)"
dist_m4sugarDATA_INSTALL = $(INSTALL_DATA) dist_m4sugarDATA_INSTALL = $(INSTALL_DATA)
dist_pkgdataDATA_INSTALL = $(INSTALL_DATA) dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
@@ -82,6 +94,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOM4TE = @AUTOM4TE@ AUTOM4TE = @AUTOM4TE@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BISON_CXX_WORKS = @BISON_CXX_WORKS@
BISON_LOCALEDIR = @BISON_LOCALEDIR@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -99,6 +113,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
GCC = @GCC@ GCC = @GCC@
GETOPT_H = @GETOPT_H@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
HAVE__BOOL = @HAVE__BOOL@ HAVE__BOOL = @HAVE__BOOL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@@ -106,6 +121,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
@@ -123,6 +139,7 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@ MSGMERGE = @MSGMERGE@
O0CFLAGS = @O0CFLAGS@ O0CFLAGS = @O0CFLAGS@
O0CXXFLAGS = @O0CXXFLAGS@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -151,6 +168,7 @@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
aclocaldir = @aclocaldir@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -158,6 +176,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@ bindir = @bindir@
build = @build@ build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
@@ -186,7 +206,10 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
dist_pkgdata_DATA = README c.m4 yacc.c lalr1.cc glr.c dist_pkgdata_DATA = README \
c.m4 yacc.c glr.c \
c++.m4 lalr1.cc
m4sugardir = $(pkgdatadir)/m4sugar m4sugardir = $(pkgdatadir)/m4sugar
dist_m4sugar_DATA = m4sugar/m4sugar.m4 dist_m4sugar_DATA = m4sugar/m4sugar.m4
all: all-am all: all-am
@@ -227,7 +250,7 @@ install-dist_m4sugarDATA: $(dist_m4sugar_DATA)
test -z "$(m4sugardir)" || $(mkdir_p) "$(DESTDIR)$(m4sugardir)" test -z "$(m4sugardir)" || $(mkdir_p) "$(DESTDIR)$(m4sugardir)"
@list='$(dist_m4sugar_DATA)'; for p in $$list; do \ @list='$(dist_m4sugar_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \ f=$(am__strip_dir) \
echo " $(dist_m4sugarDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4sugardir)/$$f'"; \ echo " $(dist_m4sugarDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4sugardir)/$$f'"; \
$(dist_m4sugarDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4sugardir)/$$f"; \ $(dist_m4sugarDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4sugardir)/$$f"; \
done done
@@ -235,7 +258,7 @@ install-dist_m4sugarDATA: $(dist_m4sugar_DATA)
uninstall-dist_m4sugarDATA: uninstall-dist_m4sugarDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(dist_m4sugar_DATA)'; for p in $$list; do \ @list='$(dist_m4sugar_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \ f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(m4sugardir)/$$f'"; \ echo " rm -f '$(DESTDIR)$(m4sugardir)/$$f'"; \
rm -f "$(DESTDIR)$(m4sugardir)/$$f"; \ rm -f "$(DESTDIR)$(m4sugardir)/$$f"; \
done done
@@ -244,7 +267,7 @@ install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \ f=$(am__strip_dir) \
echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
$(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
done done
@@ -252,7 +275,7 @@ install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
uninstall-dist_pkgdataDATA: uninstall-dist_pkgdataDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \ f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done done
@@ -317,7 +340,7 @@ mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
+2 -2
View File
@@ -41,5 +41,5 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. Boston, MA 02110-1301, USA.
+121
View File
@@ -0,0 +1,121 @@
m4_divert(-1)
# C++ skeleton for Bison
# Copyright (C) 2002, 2003, 2004, 2005 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 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
## ---------------- ##
## Default values. ##
## ---------------- ##
# Default parser class name.
m4_define_default([b4_parser_class_name], [parser])
m4_define_default([b4_location_type], [location])
m4_define_default([b4_filename_type], [std::string])
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -----------------------------------------------------
# Output the definition of the tokens (if there are) as enums.
m4_define([b4_token_enums],
[m4_if([$@], [[]], [],
[/* Tokens. */
enum yytokentype {
m4_map_sep([ b4_token_enum], [,
],
[$@])
};
])])
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
# b4_lhs_value([TYPE])
# --------------------
# Expansion of $<TYPE>$.
m4_define([b4_lhs_value],
[(yyval[]m4_ifval([$1], [.$1]))])
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
# --------------------------------------
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
# symbols on RHS.
m4_define([b4_rhs_value],
[(yysemantic_stack_@{m4_eval([$1 - $2])@}m4_ifval([$3], [.$3]))])
# b4_lhs_location()
# -----------------
# Expansion of @$.
m4_define([b4_lhs_location],
[(yyloc)])
# b4_rhs_location(RULE-LENGTH, NUM)
# ---------------------------------
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
# on RHS.
m4_define([b4_rhs_location],
[(yylocation_stack_@{m4_eval([$1 - $2])@})])
# b4_parse_param_decl
# -------------------
# Extra formal arguments of the constructor.
# Change the parameter names from "foo" into "foo_yyarg", so that
# there is no collision bw the user chosen attribute name, and the
# argument name in the constructor.
m4_define([b4_parse_param_decl],
[m4_ifset([b4_parse_param],
[m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
m4_define([b4_parse_param_decl_1],
[$1_yyarg])
# b4_parse_param_cons
# -------------------
# Extra initialisations of the constructor.
m4_define([b4_parse_param_cons],
[m4_ifset([b4_parse_param],
[,
b4_cc_constructor_calls(b4_parse_param)])])
m4_define([b4_cc_constructor_calls],
[m4_map_sep([b4_cc_constructor_call], [,
], [$@])])
m4_define([b4_cc_constructor_call],
[$2 ($2_yyarg)])
# b4_parse_param_vars
# -------------------
# Extra instance variables.
m4_define([b4_parse_param_vars],
[m4_ifset([b4_parse_param],
[
/* User arguments. */
b4_cc_var_decls(b4_parse_param)])])
m4_define([b4_cc_var_decls],
[m4_map_sep([b4_cc_var_decl], [
], [$@])])
m4_define([b4_cc_var_decl],
[ $1;])
+53 -25
View File
@@ -1,7 +1,7 @@
m4_divert(-1) -*- Autoconf -*- m4_divert(-1) -*- Autoconf -*-
# C M4 Macros for Bison. # C M4 Macros for Bison.
# Copyright (C) 2002, 2004 Free Software Foundation, Inc. # Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@ m4_divert(-1) -*- Autoconf -*-
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02111-1307 USA # 02110-1301 USA
## ---------------- ## ## ---------------- ##
@@ -43,8 +43,8 @@ m4_define([b4_copyright],
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. */]) Boston, MA 02110-1301, USA. */])
# b4_identification # b4_identification
@@ -53,6 +53,9 @@ m4_define([b4_identification],
[/* Identify Bison output. */ [/* Identify Bison output. */
[#]define YYBISON 1 [#]define YYBISON 1
/* Bison version. */
[#]define YYBISON_VERSION "b4_version"
/* Skeleton name. */ /* Skeleton name. */
[#]define YYSKELETON_NAME b4_skeleton [#]define YYSKELETON_NAME b4_skeleton
@@ -166,6 +169,16 @@ m4_define([b4_token_define],
]) ])
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -------------------------------------------------------
# Output the definition of the tokens (if there are) as #defines.
m4_define([b4_token_defines],
[m4_if([$@], [[]], [],
[/* Tokens. */
m4_map([b4_token_define], [$@])])
])
# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER) # b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
# --------------------------------------- # ---------------------------------------
# Output the definition of this token as an enum. # Output the definition of this token as an enum.
@@ -173,10 +186,10 @@ m4_define([b4_token_enum],
[$1 = $2]) [$1 = $2])
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER) # b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# ------------------------------------------------------- # -----------------------------------------------------
# Output the definition of the tokens (if there are) as enums and #define. # Output the definition of the tokens (if there are) as enums.
m4_define([b4_token_defines], m4_define([b4_token_enums],
[m4_if([$@], [[]], [], [m4_if([$@], [[]], [],
[/* Tokens. */ [/* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
@@ -189,8 +202,14 @@ m4_map_sep([ b4_token_enum], [,
[$@]) [$@])
}; };
#endif #endif
m4_map([b4_token_define], [$@]) ])])
])
# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
# -------------------------------------------------------------
# Output the definition of the tokens (if there are) as enums and #defines.
m4_define([b4_token_enums_defines],
[b4_token_enums($@)b4_token_defines($@)
]) ])
@@ -327,7 +346,8 @@ m4_define([b4_syncline],
# SYMBOL-ACTION, SYMBOL-TYPENAME) # SYMBOL-ACTION, SYMBOL-TYPENAME)
# ------------------------------------------------- # -------------------------------------------------
m4_define([b4_symbol_actions], m4_define([b4_symbol_actions],
[m4_pushdef([b4_dollar_dollar], [yyvaluep->$6])dnl [m4_pushdef([b4_dollar_dollar],
[m4_ifval([$6], [(yyvaluep->$6)], [(*yyvaluep)])])dnl
m4_pushdef([b4_at_dollar], [(*yylocationp)])dnl m4_pushdef([b4_at_dollar], [(*yylocationp)])dnl
case $4: /* $3 */ case $4: /* $3 */
b4_syncline([$2], [$1]) b4_syncline([$2], [$1])
@@ -344,13 +364,14 @@ m4_popdef([b4_dollar_dollar])dnl
# Generate the "yydestruct" function, which declaration is issued using # Generate the "yydestruct" function, which declaration is issued using
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C # FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
# or "b4_c_function_def" for K&R. # or "b4_c_function_def" for K&R.
m4_define([b4_yydestruct_generate], m4_define_default([b4_yydestruct_generate],
[[/*-----------------------------------------------. [[/*-----------------------------------------------.
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
`-----------------------------------------------*/ `-----------------------------------------------*/
]$1([yydestruct], ]$1([yydestruct],
[static void], [static void],
[[const char *yymsg], [yymsg]],
[[int yytype], [yytype]], [[int yytype], [yytype]],
[[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([, [[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([,
[[YYLTYPE *yylocationp], [yylocationp]]]))[ [[YYLTYPE *yylocationp], [yylocationp]]]))[
@@ -359,6 +380,10 @@ m4_define([b4_yydestruct_generate],
(void) yyvaluep; (void) yyvaluep;
]b4_location_if([ (void) yylocationp; ]b4_location_if([ (void) yylocationp;
])[ ])[
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype) switch (yytype)
{ {
]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[ ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
@@ -374,7 +399,7 @@ m4_define([b4_yydestruct_generate],
# Generate the "yysymprint" function, which declaration is issued using # Generate the "yysymprint" function, which declaration is issued using
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C # FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
# or "b4_c_function_def" for K&R. # or "b4_c_function_def" for K&R.
m4_define([b4_yysymprint_generate], m4_define_default([b4_yysymprint_generate],
[[/*--------------------------------. [[/*--------------------------------.
| Print this symbol on YYOUTPUT. | | Print this symbol on YYOUTPUT. |
`--------------------------------*/ `--------------------------------*/
@@ -390,23 +415,26 @@ m4_define([b4_yysymprint_generate],
(void) yyvaluep; (void) yyvaluep;
b4_location_if([ (void) yylocationp; b4_location_if([ (void) yylocationp;
])dnl ])dnl
[
if (yytype < YYNTOKENS) if (yytype < YYNTOKENS)
{ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
YYFPRINTF (yyoutput, "token %s (", yytname[[yytype]]);
# ifdef YYPRINT
YYPRINT (yyoutput, yytoknum[[yytype]], *yyvaluep);
# endif
}
else else
YYFPRINTF (yyoutput, "nterm %s (", yytname[[yytype]]); YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
]b4_location_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
])dnl
[
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
switch (yytype) switch (yytype)
{ {
m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
default: [ default:
break; break;
} }
YYFPRINTF (yyoutput, ")"); YYFPRINTF (yyoutput, ")");
} }
]) ]])
+572 -256
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+203 -239
View File
@@ -2,7 +2,9 @@ divert(-1)# -*- Autoconf -*-
# This file is part of Autoconf. # This file is part of Autoconf.
# Base M4 layer. # Base M4 layer.
# Requires GNU M4. # Requires GNU M4.
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. #
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
# Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@@ -16,8 +18,8 @@ divert(-1)# -*- Autoconf -*-
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02111-1307, USA. # 02110-1301, USA.
# #
# As a special exception, the Free Software Foundation gives unlimited # As a special exception, the Free Software Foundation gives unlimited
# permission to copy, distribute and modify the configure scripts that # permission to copy, distribute and modify the configure scripts that
@@ -58,7 +60,7 @@ changequote([, ])
# long macros we define. # long macros we define.
ifdef([__gnu__], , ifdef([__gnu__], ,
[errprint(M4sugar requires GNU M4. Install it before installing M4sugar or [errprint(M4sugar requires GNU M4. Install it before installing M4sugar or
set the M4 environment variable to its path name.) set the M4 environment variable to its absolute file name.)
m4exit(2)]) m4exit(2)])
@@ -83,12 +85,12 @@ m4_undefine([undefine])
# Define DST as the definition of SRC. # Define DST as the definition of SRC.
# What's the difference between: # What's the difference between:
# 1. m4_copy([from], [to]) # 1. m4_copy([from], [to])
# 2. m4_define([from], [to($@)]) # 2. m4_define([to], [from($@)])
# Well, obviously 1 is more expansive in space. Maybe 2 is more expansive # Well, obviously 1 is more expensive in space. Maybe 2 is more expensive
# in time, but because of the space cost of 1, it's not that obvious. # in time, but because of the space cost of 1, it's not that obvious.
# Nevertheless, one huge difference is the handling of `$0'. If `from' # Nevertheless, one huge difference is the handling of `$0'. If `from'
# uses `$0', then with 1, `to''s `$0' is `to', while it is `from' in 2. # uses `$0', then with 1, `to''s `$0' is `to', while it is `from' in 2.
# The user will certainly prefer see `from'. # The user will certainly prefer to see `to'.
m4_define([m4_copy], m4_define([m4_copy],
[m4_define([$2], m4_defn([$1]))]) [m4_define([$2], m4_defn([$1]))])
@@ -131,7 +133,7 @@ m4_rename_m4([eval])
m4_rename_m4([format]) m4_rename_m4([format])
m4_rename_m4([ifdef]) m4_rename_m4([ifdef])
m4_rename([ifelse], [m4_if]) m4_rename([ifelse], [m4_if])
m4_rename_m4([include]) m4_undefine([include])
m4_rename_m4([incr]) m4_rename_m4([incr])
m4_rename_m4([index]) m4_rename_m4([index])
m4_rename_m4([indir]) m4_rename_m4([indir])
@@ -144,7 +146,7 @@ m4_undefine([popdef])
m4_rename_m4([pushdef]) m4_rename_m4([pushdef])
m4_rename([regexp], [m4_bregexp]) m4_rename([regexp], [m4_bregexp])
m4_rename_m4([shift]) m4_rename_m4([shift])
m4_rename_m4([sinclude]) m4_undefine([sinclude])
m4_rename_m4([substr]) m4_rename_m4([substr])
m4_rename_m4([symbols]) m4_rename_m4([symbols])
m4_rename_m4([syscmd]) m4_rename_m4([syscmd])
@@ -199,76 +201,29 @@ m4_define([m4_assert],
[m4_fatal([assert failed: $1], [$2])])]) [m4_fatal([assert failed: $1], [$2])])])
## ------------- ## ## ------------- ##
## 3. Warnings. ## ## 3. Warnings. ##
## ------------- ## ## ------------- ##
# m4_warning_ifelse(CATEGORY, IF-TRUE, IF-FALSE) # _m4_warn(CATEGORY, MESSAGE, STACK-TRACE)
# ---------------------------------------------- # ----------------------------------------
# If the CATEGORY of warnings is enabled, expand IF_TRUE otherwise # Report a MESSAGE to the user if the CATEGORY of warnings is enabled.
# IF-FALSE. # This is for traces only.
# # The STACK-TRACE is a \n-separated list of "LOCATION: MESSAGE".
# The variable `m4_warnings' contains a comma separated list of m4_define([_m4_warn], [])
# warnings which order is the converse from the one specified by
# the user, i.e., if she specified `-W error,none,obsolete',
# `m4_warnings' is `obsolete,none,error'. We read it from left to
# right, and:
# - if none or noCATEGORY is met, run IF-FALSE
# - if all or CATEGORY is met, run IF-TRUE
# - if there is nothing left, run IF-FALSE.
m4_define([m4_warning_ifelse],
[_m4_warning_ifelse([$1], [$2], [$3], m4_warnings)])
# _m4_warning_ifelse(CATEGORY, IF-TRUE, IF-FALSE, WARNING1, ...)
# --------------------------------------------------------------
# Implementation of the loop described above.
m4_define([_m4_warning_ifelse],
[m4_case([$4],
[$1], [$2],
[all], [$2],
[], [$3],
[none], [$3],
[no-$1], [$3],
[$0([$1], [$2], [$3], m4_shiftn(4, $@))])])
# _m4_warning_error_ifelse(IF-TRUE, IF-FALSE)
# -------------------------------------------
# The same as m4_warning_ifelse, but scan for `error' only.
m4_define([_m4_warning_error_ifelse],
[__m4_warning_error_ifelse([$1], [$2], m4_warnings)])
# __m4_warning_error_ifelse(IF-TRUE, IF-FALSE)
# --------------------------------------------
# The same as _m4_warning_ifelse, but scan for `error' only.
m4_define([__m4_warning_error_ifelse],
[m4_case([$3],
[error], [$1],
[], [$2],
[no-error], [$2],
[$0([$1], [$2], m4_shiftn(3, $@))])])
# _m4_warn(MESSAGE)
# -----------------
# Report MESSAGE as a warning, unless the user requested -W error,
# in which case report a fatal error.
m4_define([_m4_warn],
[_m4_warning_error_ifelse([m4_fatal([$1])],
[m4_warning([$1])])])
# m4_warn(CATEGORY, MESSAGE) # m4_warn(CATEGORY, MESSAGE)
# -------------------------- # --------------------------
# Report a MESSAGE to the autoconf user if the CATEGORY of warnings # Report a MESSAGE to the user if the CATEGORY of warnings is enabled.
# is requested (in fact, not disabled).
m4_define([m4_warn], m4_define([m4_warn],
[m4_warning_ifelse([$1], [_m4_warn([$2])])]) [_m4_warn([$1], [$2],
m4_ifdef([m4_expansion_stack],
[m4_defn([m4_expansion_stack])
m4_location[: the top level]]))dnl
])
@@ -367,7 +322,7 @@ m4_define([m4_ifvaln],
# expand IF-FALSE, otherwise IF-TRUE. # expand IF-FALSE, otherwise IF-TRUE.
m4_define([m4_ifset], m4_define([m4_ifset],
[m4_ifdef([$1], [m4_ifdef([$1],
[m4_if(m4_defn([$1]), [], [$3], [$2])], [m4_ifval(m4_defn([$1]), [$2], [$3])],
[$3])]) [$3])])
@@ -419,23 +374,32 @@ m4_define([m4_case],
# All the values are optional, and the macro is robust to active symbols # All the values are optional, and the macro is robust to active symbols
# properly quoted. # properly quoted.
m4_define([m4_bmatch], m4_define([m4_bmatch],
[m4_if([$#], 0, [], [m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [], [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2], [$#], 2, [$2],
[m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shiftn(3, $@))], [m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shiftn(3, $@))],
[$3])])]) [$3])])])
# m4_car(LIST)
# m4_cdr(LIST)
# ------------
# Manipulate m4 lists.
m4_define([m4_car], [[$1]])
m4_define([m4_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
# m4_map(MACRO, LIST) # m4_map(MACRO, LIST)
# ------------------- # -------------------
# Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements # Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements
# of LIST (which can be lists themselves, for multiple arguments MACROs). # of LIST (which can be lists themselves, for multiple arguments MACROs).
m4_define([m4_fst], [$1]) m4_define([m4_fst], [$1])
m4_define([m4_map], m4_define([m4_map],
[m4_if([$2], [], [], [m4_ifval([$2],
[$2], [[]], [], [$1(m4_fst($2))[]m4_map([$1], m4_cdr($2))])])
[$1(m4_fst($2))[]dnl
m4_map([$1], m4_cdr($2))])])
# m4_map_sep(MACRO, SEPARATOR, LIST) # m4_map_sep(MACRO, SEPARATOR, LIST)
@@ -444,20 +408,16 @@ m4_map([$1], m4_cdr($2))])])
# are the elements of LIST (which can be lists themselves, for multiple # are the elements of LIST (which can be lists themselves, for multiple
# arguments MACROs). # arguments MACROs).
m4_define([m4_map_sep], m4_define([m4_map_sep],
[m4_if([$3], [[]], [], [m4_ifval([$3],
[$1(m4_fst($3))[]dnl [$1(m4_fst($3))[]m4_map([$2[]$1], m4_cdr($3))])])
m4_if(m4_cdr($3),
[[]], [],
[$2])[]dnl
m4_map_sep([$1], [$2], m4_cdr($3))])])
## ---------------------------------------- ## ## ---------------------------------------- ##
## 6. Enhanced version of some primitives. ## ## 6. Enhanced version of some primitives. ##
## ---------------------------------------- ## ## ---------------------------------------- ##
# m4_patsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...) # m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
# --------------------------------------------------- # ----------------------------------------------------
# m4 equivalent of # m4 equivalent of
# #
# $_ = STRING; # $_ = STRING;
@@ -468,7 +428,7 @@ m4_map_sep([$1], [$2], m4_cdr($3))])])
# All the values are optional, and the macro is robust to active symbols # All the values are optional, and the macro is robust to active symbols
# properly quoted. # properly quoted.
# #
# I would have liked to name this macro `m4_patsubst', unfortunately, # I would have liked to name this macro `m4_bpatsubst', unfortunately,
# due to quotation problems, I need to double quote $1 below, therefore # due to quotation problems, I need to double quote $1 below, therefore
# the anchors are broken :( I can't let users be trapped by that. # the anchors are broken :( I can't let users be trapped by that.
m4_define([m4_bpatsubsts], m4_define([m4_bpatsubsts],
@@ -726,14 +686,25 @@ m4_if($1, [$2], [],
m4_define([m4_foreach], m4_define([m4_foreach],
[m4_pushdef([$1])_m4_foreach($@)m4_popdef([$1])]) [m4_pushdef([$1])_m4_foreach($@)m4_popdef([$1])])
# Low level macros used to define m4_foreach.
m4_define([m4_car], [[$1]])
m4_define([m4_cdr], [m4_dquote(m4_shift($@))])
m4_define([_m4_foreach], m4_define([_m4_foreach],
[m4_if([$2], [[]], [], [m4_ifval([$2],
[m4_define([$1], m4_car($2))$3[]_m4_foreach([$1], [m4_define([$1], m4_car($2))$3[]dnl
m4_cdr($2), _m4_foreach([$1], m4_cdr($2), [$3])])])
[$3])])])
# m4_foreach_w(VARIABLE, LIST, EXPRESSION)
# ----------------------------------------
#
# Like m4_foreach, but the list is whitespace separated.
#
# This macro is robust to active symbols:
# m4_foreach_w([Var], [ active
# b act\
# ive ], [-Var-])end
# => -active--b--active-end
#
m4_define([m4_foreach_w],
[m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
@@ -745,7 +716,7 @@ m4_define([_m4_foreach],
# _m4_divert(DIVERSION-NAME or NUMBER) # _m4_divert(DIVERSION-NAME or NUMBER)
# ------------------------------------ # ------------------------------------
# If DIVERSION-NAME is the name of a diversion, return its number, # If DIVERSION-NAME is the name of a diversion, return its number,
# otherwise if is a NUMBER return it. # otherwise if it is a NUMBER return it.
m4_define([_m4_divert], m4_define([_m4_divert],
[m4_ifdef([_m4_divert($1)], [m4_ifdef([_m4_divert($1)],
[m4_indir([_m4_divert($1)])], [m4_indir([_m4_divert($1)])],
@@ -755,13 +726,19 @@ m4_define([_m4_divert],
m4_define([_m4_divert(KILL)], -1) m4_define([_m4_divert(KILL)], -1)
# _m4_divert_n_stack
# ------------------
# Print m4_divert_stack with newline prepended, if it's nonempty.
m4_define([_m4_divert_n_stack],
[m4_ifdef([m4_divert_stack], [
m4_defn([m4_divert_stack])])])
# m4_divert(DIVERSION-NAME) # m4_divert(DIVERSION-NAME)
# ------------------------- # -------------------------
# Change the diversion stream to DIVERSION-NAME. # Change the diversion stream to DIVERSION-NAME.
m4_define([m4_divert], m4_define([m4_divert],
[m4_define([m4_divert_stack], [m4_define([m4_divert_stack], m4_location[: $0: $1]_m4_divert_n_stack)dnl
m4_location[: $0: $1]m4_ifdef([m4_divert_stack], [
m4_defn([m4_divert_stack])]))dnl
m4_builtin([divert], _m4_divert([$1]))dnl m4_builtin([divert], _m4_divert([$1]))dnl
]) ])
@@ -770,11 +747,9 @@ m4_builtin([divert], _m4_divert([$1]))dnl
# ------------------------------ # ------------------------------
# Change the diversion stream to DIVERSION-NAME, while stacking old values. # Change the diversion stream to DIVERSION-NAME, while stacking old values.
m4_define([m4_divert_push], m4_define([m4_divert_push],
[m4_pushdef([m4_divert_stack], [m4_pushdef([m4_divert_stack], m4_location[: $0: $1]_m4_divert_n_stack)dnl
m4_location[: $0: $1]m4_ifdef([m4_divert_stack], [
m4_defn([m4_divert_stack])]))dnl
m4_pushdef([_m4_divert_diversion], [$1])dnl m4_pushdef([_m4_divert_diversion], [$1])dnl
m4_builtin([divert], _m4_divert(_m4_divert_diversion))dnl m4_builtin([divert], _m4_divert([$1]))dnl
]) ])
@@ -782,18 +757,19 @@ m4_builtin([divert], _m4_divert(_m4_divert_diversion))dnl
# ------------------------------- # -------------------------------
# Change the diversion stream to its previous value, unstacking it. # Change the diversion stream to its previous value, unstacking it.
# If specified, verify we left DIVERSION-NAME. # If specified, verify we left DIVERSION-NAME.
# When we pop the last value from the stack, we divert to -1.
m4_define([m4_divert_pop], m4_define([m4_divert_pop],
[m4_ifval([$1], [m4_ifndef([_m4_divert_diversion],
[m4_if(_m4_divert([$1]), m4_divnum, [], [m4_fatal([too many m4_divert_pop])])dnl
[m4_fatal([$0($1): diversion mismatch: ] m4_if([$1], [], [],
m4_defn([m4_divert_stack]))])])dnl [$1], m4_defn([_m4_divert_diversion]), [],
[m4_fatal([$0($1): diversion mismatch: ]_m4_divert_n_stack)])dnl
m4_popdef([m4_divert_stack])dnl
m4_popdef([_m4_divert_diversion])dnl m4_popdef([_m4_divert_diversion])dnl
dnl m4_ifndef([_m4_divert_diversion],
dnl [m4_fatal([too many m4_divert_pop])])dnl
m4_builtin([divert], m4_builtin([divert],
m4_ifdef([_m4_divert_diversion], m4_ifdef([_m4_divert_diversion],
[_m4_divert(_m4_divert_diversion)], -1))dnl [_m4_divert(m4_defn([_m4_divert_diversion]))],
m4_popdef([m4_divert_stack])dnl -1))dnl
]) ])
@@ -980,7 +956,7 @@ m4_define([m4_undivert],
# GROW: # GROW:
# BODY: TEST2a; TEST3; TEST2b: TEST1 # BODY: TEST2a; TEST3; TEST2b: TEST1
# #
# The idea, is simple, but the implementation is a bit evolved. If you # The idea is simple, but the implementation is a bit evolved. If you
# are like me, you will want to see the actual functioning of this # are like me, you will want to see the actual functioning of this
# implementation to be convinced. The next section gives the full # implementation to be convinced. The next section gives the full
# details. # details.
@@ -997,12 +973,12 @@ m4_define([m4_undivert],
# You should keep the definitions of _m4_defun_pro, _m4_defun_epi, and # You should keep the definitions of _m4_defun_pro, _m4_defun_epi, and
# m4_require at hand to follow the steps. # m4_require at hand to follow the steps.
# #
# This implements tries not to assume that of the current diversion is # This implements tries not to assume that the current diversion is
# BODY, so as soon as a macro (m4_defun'd) is expanded, we first # BODY, so as soon as a macro (m4_defun'd) is expanded, we first
# record the current diversion under the name _m4_divert_dump (denoted # record the current diversion under the name _m4_divert_dump (denoted
# DUMP below for short). This introduces an important difference with # DUMP below for short). This introduces an important difference with
# the previous versions of Autoconf: you cannot use m4_require if you # the previous versions of Autoconf: you cannot use m4_require if you
# were not inside an m4_defun'd macro, and especially, you cannot # are not inside an m4_defun'd macro, and especially, you cannot
# m4_require directly from the top level. # m4_require directly from the top level.
# #
# We have not tried to simulate the old behavior (better yet, we # We have not tried to simulate the old behavior (better yet, we
@@ -1017,7 +993,7 @@ m4_define([m4_undivert],
# diversion stack: BODY |- # diversion stack: BODY |-
# #
# * TEST1 is expanded # * TEST1 is expanded
# The prologue of TEST1 sets AC_DIVERSION_DUMP, which is the diversion # The prologue of TEST1 sets _m4_divert_dump, which is the diversion
# where the current elaboration will be dumped, to the current # where the current elaboration will be dumped, to the current
# diversion. It also m4_divert_push to GROW, where the full # diversion. It also m4_divert_push to GROW, where the full
# expansion of TEST1 and its dependencies will be elaborated. # expansion of TEST1 and its dependencies will be elaborated.
@@ -1025,96 +1001,56 @@ m4_define([m4_undivert],
# BODY: empty # BODY: empty
# diversions: GROW, BODY |- # diversions: GROW, BODY |-
# #
# * TEST1 requires TEST2a: prologue # * TEST1 requires TEST2a
# m4_require m4_divert_pushes another temporary diversion GROW - 1 (in # _m4_require_call m4_divert_pushes another temporary diversion,
# fact, the diversion whose number is one less than the current # GROW - 1, and expands TEST2a in there.
# diversion), and expands TEST2a in there.
# DUMP: BODY # DUMP: BODY
# BODY: empty # BODY: empty
# diversions: GROW-1, GROW, BODY |-
#
# * TEST2a is expanded.
# Its prologue pushes the current diversion again.
# DUMP: BODY
# BODY: empty
# diversions: GROW - 1, GROW - 1, GROW, BODY |-
# It is expanded in GROW - 1, and GROW - 1 is popped by the epilogue
# of TEST2a.
# DUMP: BODY
# BODY: nothing
# GROW - 1: TEST2a # GROW - 1: TEST2a
# diversions: GROW - 1, GROW, BODY |- # diversions: GROW - 1, GROW, BODY |-
# # Than the content of the temporary diversion is moved to DUMP and the
# * TEST1 requires TEST2a: epilogue # temporary diversion is popped.
# The content of the current diversion is appended to DUMP (and removed
# from the current diversion). A diversion is popped.
# DUMP: BODY # DUMP: BODY
# BODY: TEST2a # BODY: TEST2a
# diversions: GROW, BODY |- # diversions: GROW, BODY |-
# #
# * TEST1 requires TEST2b: prologue # * TEST1 requires TEST2b
# m4_require pushes GROW - 1 and expands TEST2b. # Again, _m4_require_call pushes GROW - 1 and heads to expand TEST2b.
# DUMP: BODY # DUMP: BODY
# BODY: TEST2a # BODY: TEST2a
# diversions: GROW - 1, GROW, BODY |- # diversions: GROW - 1, GROW, BODY |-
# #
# * TEST2b is expanded. # * TEST2b requires TEST3
# Its prologue pushes the current diversion again. # _m4_require_call pushes GROW - 2 and expands TEST3 here.
# DUMP: BODY # (TEST3 requires TEST2a, but TEST2a has already been m4_provide'd, so
# BODY: TEST2a # nothing happens.)
# diversions: GROW - 1, GROW - 1, GROW, BODY |-
# The body is expanded here.
#
# * TEST2b requires TEST3: prologue
# m4_require pushes GROW - 2 and expands TEST3.
# DUMP: BODY
# BODY: TEST2a
# diversions: GROW - 2, GROW - 1, GROW - 1, GROW, BODY |-
#
# * TEST3 is expanded.
# Its prologue pushes the current diversion again.
# DUMP: BODY
# BODY: TEST2a
# diversions: GROW-2, GROW-2, GROW-1, GROW-1, GROW, BODY |-
# TEST3 requires TEST2a, but TEST2a has already been AC_PROVIDE'd, so
# nothing happens. It's body is expanded here, and its epilogue pops a
# diversion.
# DUMP: BODY # DUMP: BODY
# BODY: TEST2a # BODY: TEST2a
# GROW - 2: TEST3 # GROW - 2: TEST3
# diversions: GROW - 2, GROW - 1, GROW - 1, GROW, BODY |- # diversions: GROW - 2, GROW - 1, GROW, BODY |-
# Than the diversion is appended to DUMP, and popped.
# DUMP: BODY
# BODY: TEST2a; TEST3
# diversions: GROW - 1, GROW, BODY |-
# #
# * TEST2b requires TEST3: epilogue # * TEST1 requires TEST2b (contd.)
# The current diversion is appended to DUMP, and a diversion is popped. # The content of TEST2b is expanded...
# DUMP: BODY
# BODY: TEST2a; TEST3
# diversions: GROW - 1, GROW - 1, GROW, BODY |-
# The content of TEST2b is expanded here.
# DUMP: BODY
# BODY: TEST2a; TEST3
# GROW - 1: TEST2b,
# diversions: GROW - 1, GROW - 1, GROW, BODY |-
# The epilogue of TEST2b pops a diversion.
# DUMP: BODY # DUMP: BODY
# BODY: TEST2a; TEST3 # BODY: TEST2a; TEST3
# GROW - 1: TEST2b, # GROW - 1: TEST2b,
# diversions: GROW - 1, GROW, BODY |- # diversions: GROW - 1, GROW, BODY |-
# # ... and moved to DUMP.
# * TEST1 requires TEST2b: epilogue
# The current diversion is appended to DUMP, and a diversion is popped.
# DUMP: BODY # DUMP: BODY
# BODY: TEST2a; TEST3; TEST2b # BODY: TEST2a; TEST3; TEST2b
# diversions: GROW, BODY |- # diversions: GROW, BODY |-
# #
# * TEST1 is expanded: epilogue # * TEST1 is expanded: epilogue
# TEST1's own content is in GROW, and it's epilogue pops a diversion. # TEST1's own content is in GROW...
# DUMP: BODY # DUMP: BODY
# BODY: TEST2a; TEST3; TEST2b # BODY: TEST2a; TEST3; TEST2b
# GROW: TEST1 # GROW: TEST1
# diversions: BODY |- # diversions: BODY |-
# Here, the epilogue of TEST1 notices the elaboration is done because # ... and it's epilogue moves it to DUMP and then undefines DUMP.
# DUMP and the current diversion are the same, it then undiverts
# GROW by hand, and undefines DUMP.
# DUMP: undefined # DUMP: undefined
# BODY: TEST2a; TEST3; TEST2b; TEST1 # BODY: TEST2a; TEST3; TEST2b; TEST1
# diversions: BODY |- # diversions: BODY |-
@@ -1136,24 +1072,9 @@ m4_define([m4_undivert],
# we prepend its name in m4_expansion_stack, and when we exit the # we prepend its name in m4_expansion_stack, and when we exit the
# macro, we remove it (thanks to pushdef/popdef). # macro, we remove it (thanks to pushdef/popdef).
# #
# In addition, we want to use the expansion stack to detect circular # In addition, we want to detect circular m4_require dependencies.
# m4_require dependencies. This means we need to browse the stack to # Each time we expand a macro FOO we define _m4_expanding(FOO); and
# check whether a macro being expanded is m4_require'd. For ease of # m4_require(BAR) simply checks whether _m4_expanding(BAR) is defined.
# implementation, and certainly for the benefit of performances, we
# don't browse the m4_expansion_stack, rather each time we expand a
# macro FOO we define _m4_expanding(FOO). Then m4_require(BAR) simply
# needs to check whether _m4_expanding(BAR) is defined to diagnose a
# circular dependency.
#
# To improve the diagnostic, in addition to keeping track of the stack
# of macro calls, m4_expansion_stack also records the m4_require
# stack. Note that therefore an m4_defun'd macro being required will
# appear twice in the stack: the first time because it is required,
# the second because it is expanded. We can avoid this, but it has
# two small drawbacks: (i) the implementation is slightly more
# complex, and (ii) it hides the difference between define'd macros
# (which don't appear in m4_expansion_stack) and m4_defun'd macros
# (which do). The more debugging information, the better.
# m4_expansion_stack_push(TEXT) # m4_expansion_stack_push(TEXT)
@@ -1166,7 +1087,6 @@ m4_defn([m4_expansion_stack])]))])
# m4_expansion_stack_pop # m4_expansion_stack_pop
# ---------------------- # ----------------------
# Dump the expansion stack.
m4_define([m4_expansion_stack_pop], m4_define([m4_expansion_stack_pop],
[m4_popdef([m4_expansion_stack])]) [m4_popdef([m4_expansion_stack])])
@@ -1203,29 +1123,33 @@ m4_define([_m4_divert(GROW)], 10000)
# ------------------------- # -------------------------
# The prologue for Autoconf macros. # The prologue for Autoconf macros.
m4_define([_m4_defun_pro], m4_define([_m4_defun_pro],
[m4_expansion_stack_push(m4_defn([m4_location($1)])[: $1 is expanded from...])dnl [m4_ifndef([m4_expansion_stack], [_m4_defun_pro_outer[]])dnl
m4_expansion_stack_push(m4_defn([m4_location($1)])[: $1 is expanded from...])dnl
m4_pushdef([_m4_expanding($1)])dnl m4_pushdef([_m4_expanding($1)])dnl
m4_ifdef([_m4_divert_dump],
[m4_divert_push(m4_defn([_m4_divert_diversion]))],
[m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
m4_divert_push([GROW])])dnl
]) ])
m4_define([_m4_defun_pro_outer],
[m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
m4_divert_push([GROW])dnl
])
# _m4_defun_epi(MACRO-NAME) # _m4_defun_epi(MACRO-NAME)
# ------------------------- # -------------------------
# The Epilogue for Autoconf macros. MACRO-NAME only helps tracing # The Epilogue for Autoconf macros. MACRO-NAME only helps tracing
# the PRO/EPI pairs. # the PRO/EPI pairs.
m4_define([_m4_defun_epi], m4_define([_m4_defun_epi],
[m4_divert_pop()dnl [m4_popdef([_m4_expanding($1)])dnl
m4_if(_m4_divert_dump, _m4_divert_diversion,
[m4_undivert([GROW])dnl
m4_undefine([_m4_divert_dump])])dnl
m4_expansion_stack_pop()dnl m4_expansion_stack_pop()dnl
m4_popdef([_m4_expanding($1)])dnl m4_ifndef([m4_expansion_stack], [_m4_defun_epi_outer[]])dnl
m4_provide([$1])dnl m4_provide([$1])dnl
]) ])
m4_define([_m4_defun_epi_outer],
[m4_undefine([_m4_divert_dump])dnl
m4_divert_pop([GROW])dnl
m4_undivert([GROW])dnl
])
# m4_defun(NAME, EXPANSION) # m4_defun(NAME, EXPANSION)
# ------------------------- # -------------------------
@@ -1314,26 +1238,40 @@ m4_define([m4_before],
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that # `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
# it passes to `AC_LANG_COMPILER(C)'. # it passes to `AC_LANG_COMPILER(C)'.
m4_define([m4_require], m4_define([m4_require],
[m4_expansion_stack_push(m4_location[: $1 is required by...])dnl [m4_ifdef([_m4_expanding($1)],
m4_ifdef([_m4_expanding($1)],
[m4_fatal([$0: circular dependency of $1])])dnl [m4_fatal([$0: circular dependency of $1])])dnl
m4_ifndef([_m4_divert_dump], m4_ifndef([_m4_divert_dump],
[m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl [m4_fatal([$0($1): cannot be used outside of an m4_defun'd macro])])dnl
m4_provide_if([$1], m4_provide_if([$1],
[], [],
[m4_divert_push(m4_eval(m4_divnum - 1))dnl [_m4_require_call([$1], [$2])])dnl
])
# _m4_require_call(BODY-TO-EXPAND)
# --------------------------------
# If m4_require decides to expand the body, it calls this macro.
m4_define([_m4_require_call],
[m4_define([_m4_divert_grow], m4_decr(_m4_divert_grow))dnl
m4_divert_push(_m4_divert_grow)dnl
m4_default([$2], [$1]) m4_default([$2], [$1])
m4_divert(m4_defn([_m4_divert_dump]))dnl
m4_undivert(m4_defn([_m4_divert_diversion]))dnl
m4_divert_pop(m4_defn([_m4_divert_dump]))])dnl
m4_provide_if([$1], m4_provide_if([$1],
[], [],
[m4_warn([syntax], [m4_warn([syntax],
[$1 is m4_require'd but is not m4_defun'd])])dnl [$1 is m4_require'd but not m4_defun'd])])dnl
m4_expansion_stack_pop()dnl m4_divert(m4_defn([_m4_divert_dump]))dnl
m4_undivert(_m4_divert_grow)dnl
m4_divert_pop(_m4_divert_grow)dnl
m4_define([_m4_divert_grow], m4_incr(_m4_divert_grow))dnl
]) ])
# _m4_divert_grow
# ---------------
# The counter for _m4_require_call.
m4_define([_m4_divert_grow], _m4_divert([GROW]))
# m4_expand_once(TEXT, [WITNESS = TEXT]) # m4_expand_once(TEXT, [WITNESS = TEXT])
# -------------------------------------- # --------------------------------------
# If TEXT has never been expanded, expand it *here*. Use WITNESS as # If TEXT has never been expanded, expand it *here*. Use WITNESS as
@@ -1397,17 +1335,18 @@ m4_defn([m4_cr_digits])dnl
# m4_re_escape(STRING) # m4_re_escape(STRING)
# -------------------- # --------------------
# Escape BRE active characters in STRING. # Escape RE active characters in STRING.
m4_define([m4_re_escape], m4_define([m4_re_escape],
[m4_bpatsubst([$1], [m4_bpatsubst([$1],
[[][+*.]], [\\\&])]) [[][*+.?\^$]], [\\\&])])
# m4_re_string # m4_re_string
# ------------ # ------------
# Regexp for `[a-zA-Z_0-9]*' # Regexp for `[a-zA-Z_0-9]*'
# m4_dquote provides literal [] for the character class.
m4_define([m4_re_string], m4_define([m4_re_string],
m4_defn([m4_cr_symbols2])dnl m4_dquote(m4_defn([m4_cr_symbols2]))dnl
[*]dnl [*]dnl
) )
@@ -1416,7 +1355,7 @@ m4_defn([m4_cr_symbols2])dnl
# ---------- # ----------
# Regexp for `[a-zA-Z_][a-zA-Z_0-9]*' # Regexp for `[a-zA-Z_][a-zA-Z_0-9]*'
m4_define([m4_re_word], m4_define([m4_re_word],
m4_defn([m4_cr_symbols1])dnl m4_dquote(m4_defn([m4_cr_symbols1]))dnl
m4_defn([m4_re_string])dnl m4_defn([m4_re_string])dnl
) )
@@ -1440,11 +1379,11 @@ m4_define([m4_toupper],
# #
# REGEXP specifies where to split. Default is [\t ]+. # REGEXP specifies where to split. Default is [\t ]+.
# #
# Pay attention to the m4_changequotes. Inner m4_changequotes exist for # If STRING is empty, the result is an empty list.
# obvious reasons (we want to insert square brackets). Outer #
# m4_changequotes are needed because otherwise the m4 parser, when it # Pay attention to the m4_changequotes. When m4 reads the definition of
# sees the closing bracket we add to the result, believes it is the # m4_split, it still has quotes set to [ and ]. Luckily, these are matched
# end of the body of the macro we define. # in the macro body, so the definition is stored correctly.
# #
# Also, notice that $1 is quoted twice, since we want the result to # Also, notice that $1 is quoted twice, since we want the result to
# be quoted. Then you should understand that the argument of # be quoted. Then you should understand that the argument of
@@ -1455,16 +1394,17 @@ m4_define([m4_toupper],
# m4_split([active active ])end # m4_split([active active ])end
# => [active], [active], []end # => [active], [active], []end
m4_changequote(<<, >>) m4_define([m4_split],
m4_define(<<m4_split>>, [m4_ifval([$1], [_m4_split($@)])])
<<m4_changequote(``, '')dnl
m4_define([_m4_split],
[m4_changequote(``, '')dnl
[dnl Can't use m4_default here instead of m4_if, because m4_default uses [dnl Can't use m4_default here instead of m4_if, because m4_default uses
dnl [ and ] as quotes. dnl [ and ] as quotes.
m4_bpatsubst(````$1'''', m4_bpatsubst(````$1'''',
m4_if(``$2'',, ``[ ]+'', ``$2''), m4_if(``$2'',, ``[ ]+'', ``$2''),
``], ['')]dnl ``], ['')]dnl
m4_changequote([, ])>>) m4_changequote([, ])])
m4_changequote([, ])
@@ -1491,13 +1431,10 @@ m4_define([m4_flatten],
# #
# This macro is robust to active symbols. # This macro is robust to active symbols.
# m4_define(active, ACTIVE) # m4_define(active, ACTIVE)
# m4_strip([ active active ])end # m4_strip([ active <tab> <tab>active ])end
# => active activeend # => active activeend
# #
# This macro is fun! Because we want to preserve active symbols, STRING # Because we want to preserve active symbols, STRING must be double-quoted.
# must be quoted for each evaluation, which explains there are 4 levels
# of brackets around $1 (don't forget that the result must be quoted
# too, hence one more quoting than applications).
# #
# Then notice the 2 last patterns: they are in charge of removing the # Then notice the 2 last patterns: they are in charge of removing the
# leading/trailing spaces. Why not just `[^ ]'? Because they are # leading/trailing spaces. Why not just `[^ ]'? Because they are
@@ -1589,10 +1526,10 @@ m4_define([m4_append_uniq],
# m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH]) # m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH])
# ------------------------------------------------------- # -------------------------------------------------------
# Expands into STRING wrapped to hold in WIDTH columns (default = 79). # Expands into STRING wrapped to hold in WIDTH columns (default = 79).
# If prefix is set, each line is prefixed with it. If FIRST-PREFIX is # If PREFIX is given, each line is prefixed with it. If FIRST-PREFIX is
# specified, then the first line is prefixed with it. As a special # specified, then the first line is prefixed with it. As a special case,
# case, if the length of the first prefix is greater than that of # if the length of FIRST-PREFIX is greater than that of PREFIX, then
# PREFIX, then FIRST-PREFIX will be left alone on the first line. # FIRST-PREFIX will be left alone on the first line.
# #
# Typical outputs are: # Typical outputs are:
# #
@@ -1619,12 +1556,15 @@ m4_define([m4_append_uniq],
# we really want to bother with people trying each single corner # we really want to bother with people trying each single corner
# of a software? # of a software?
# #
# more important:
# FIXME: handle quadrigraphs correctly, both in TEXT and in FIRST_PREFIX.
#
# This macro does not leave a trailing space behind the last word, # This macro does not leave a trailing space behind the last word,
# what complicates it a bit. The algorithm is stupid simple: all the # what complicates it a bit. The algorithm is stupid simple: all the
# words are preceded by m4_Separator which is defined to empty for the # words are preceded by m4_Separator which is defined to empty for the
# first word, and then ` ' (single space) for all the others. # first word, and then ` ' (single space) for all the others.
m4_define([m4_text_wrap], m4_define([m4_text_wrap],
[m4_pushdef([m4_Prefix], m4_default([$2], []))dnl [m4_pushdef([m4_Prefix], [$2])dnl
m4_pushdef([m4_Prefix1], m4_default([$3], [m4_Prefix]))dnl m4_pushdef([m4_Prefix1], m4_default([$3], [m4_Prefix]))dnl
m4_pushdef([m4_Width], m4_default([$4], 79))dnl m4_pushdef([m4_Width], m4_default([$4], 79))dnl
m4_pushdef([m4_Cursor], m4_len(m4_Prefix1))dnl m4_pushdef([m4_Cursor], m4_len(m4_Prefix1))dnl
@@ -1633,7 +1573,7 @@ m4_Prefix1[]dnl
m4_if(m4_eval(m4_Cursor > m4_len(m4_Prefix)), m4_if(m4_eval(m4_Cursor > m4_len(m4_Prefix)),
1, [m4_define([m4_Cursor], m4_len(m4_Prefix)) 1, [m4_define([m4_Cursor], m4_len(m4_Prefix))
m4_Prefix])[]dnl m4_Prefix])[]dnl
m4_foreach([m4_Word], m4_quote(m4_split(m4_normalize([$1]))), m4_foreach_w([m4_Word], [$1],
[m4_define([m4_Cursor], m4_eval(m4_Cursor + m4_len(m4_defn([m4_Word])) + 1))dnl [m4_define([m4_Cursor], m4_eval(m4_Cursor + m4_len(m4_defn([m4_Word])) + 1))dnl
dnl New line if too long, else insert a space unless it is the first dnl New line if too long, else insert a space unless it is the first
dnl of the words. dnl of the words.
@@ -1661,6 +1601,21 @@ m4_define([m4_text_box],
]) ])
# m4_qlen(STRING)
# ---------------
# Expands to the length of STRING after autom4te converts all quadrigraphs.
m4_define([m4_qlen],
[m4_len(m4_bpatsubsts([[$1]], [@\(<:\|:>\|S|\|%:\)@], [P], [@&t@]))])
# m4_qdelta(STRING)
# -----------------
# Expands to the net change in the length of STRING from autom4te converting the
# quadrigraphs in STRING. This number is always negative or zero.
m4_define([m4_qdelta],
[m4_eval(m4_qlen([$1]) - m4_len([$1]))])
## ----------------------- ## ## ----------------------- ##
## 10. Number processing. ## ## 10. Number processing. ##
@@ -1746,13 +1701,23 @@ m4_define([m4_version_compare],
(m4_split(m4_version_unletter([$2]), [\.])))]) (m4_split(m4_version_unletter([$2]), [\.])))])
# m4_PACKAGE_NAME
# m4_PACKAGE_TARNAME
# m4_PACKAGE_VERSION
# m4_PACKAGE_STRING
# m4_PACKAGE_BUGREPORT
# --------------------
#m4_include([m4sugar/version.m4]) # This is needed for Autoconf, but not Bison.
# m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL]) # m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL])
# ---------------------------------------------------- # ----------------------------------------------------
# Check this Autoconf version against VERSION. # Check this Autoconf version against VERSION.
m4_define([m4_version_prereq], m4_define([m4_version_prereq],
[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), -1, [m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), -1,
[m4_default([$3], [m4_default([$3],
[m4_fatal([Autoconf version $1 or higher is required])])], [m4_fatal([Autoconf version $1 or higher is required],
63)])],
[$2])[]dnl [$2])[]dnl
]) ])
@@ -1795,8 +1760,7 @@ m4_pattern_forbid([^dnl$])
# Check the divert push/pop perfect balance. # Check the divert push/pop perfect balance.
m4_wrap([m4_ifdef([_m4_divert_diversion], m4_wrap([m4_ifdef([_m4_divert_diversion],
[m4_fatal([$0: unbalanced m4_divert_push:] [m4_fatal([$0: unbalanced m4_divert_push:]_m4_divert_n_stack)])[]])
m4_defn([m4_divert_stack]))])[]])
m4_divert_push([KILL]) m4_divert_push([KILL])
m4_wrap([m4_divert_pop([KILL])[]]) m4_wrap([m4_divert_pop([KILL])[]])
+330 -168
View File
@@ -1,7 +1,8 @@
m4_divert(-1) -*- C -*- m4_divert(-1) -*- C -*-
# Yacc compatible skeleton for Bison # Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@@ -16,8 +17,8 @@ m4_divert(-1) -*- C -*-
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02111-1307 USA # 02110-1301 USA
@@ -93,7 +94,7 @@ m4_define([b4_int_type],
# -------------------- # --------------------
# Expansion of $<TYPE>$. # Expansion of $<TYPE>$.
m4_define([b4_lhs_value], m4_define([b4_lhs_value],
[yyval[]m4_ifval([$1], [.$1])]) [(yyval[]m4_ifval([$1], [.$1]))])
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE]) # b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
@@ -101,7 +102,7 @@ m4_define([b4_lhs_value],
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH # Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
# symbols on RHS. # symbols on RHS.
m4_define([b4_rhs_value], m4_define([b4_rhs_value],
[yyvsp@{m4_eval([$2 - $1])@}m4_ifval([$3], [.$3])]) [(yyvsp@{m4_eval([$2 - $1])@}m4_ifval([$3], [.$3]))])
@@ -113,7 +114,7 @@ m4_define([b4_rhs_value],
# ----------------- # -----------------
# Expansion of @$. # Expansion of @$.
m4_define([b4_lhs_location], m4_define([b4_lhs_location],
[yyloc]) [(yyloc)])
# b4_rhs_location(RULE-LENGTH, NUM) # b4_rhs_location(RULE-LENGTH, NUM)
@@ -121,7 +122,7 @@ m4_define([b4_lhs_location],
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols # Expansion of @NUM, where the current rule has RULE-LENGTH symbols
# on RHS. # on RHS.
m4_define([b4_rhs_location], m4_define([b4_rhs_location],
[yylsp@{m4_eval([$2 - $1])@}]) [(yylsp@{m4_eval([$2 - $1])@})])
@@ -134,7 +135,7 @@ m4_changecom()
m4_divert(0)dnl m4_divert(0)dnl
@output @output_parser_name@ @output @output_parser_name@
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004])[ [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005])[
/* As a special exception, when this file is copied by Bison into a /* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction. Bison output file, you may use that output file without restriction.
@@ -153,8 +154,7 @@ b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
]b4_identification ]b4_identification
m4_if(b4_prefix[], [yy], [], m4_if(b4_prefix[], [yy], [],
[/* If NAME_PREFIX is specified substitute the variables and functions [/* Substitute the variable and function names. */
names. */
#define yyparse b4_prefix[]parse #define yyparse b4_prefix[]parse
#define yylex b4_prefix[]lex #define yylex b4_prefix[]lex
#define yyerror b4_prefix[]error #define yyerror b4_prefix[]error
@@ -164,7 +164,7 @@ m4_if(b4_prefix[], [yy], [],
#define yynerrs b4_prefix[]nerrs #define yynerrs b4_prefix[]nerrs
b4_location_if([#define yylloc b4_prefix[]lloc])])[ b4_location_if([#define yylloc b4_prefix[]lloc])])[
]b4_token_defines(b4_tokens)[ ]b4_token_enums_defines(b4_tokens)[
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
]b4_pre_prologue[ ]b4_pre_prologue[
@@ -182,9 +182,14 @@ b4_location_if([#define yylloc b4_prefix[]lloc])])[
# define YYERROR_VERBOSE ]b4_error_verbose[ # define YYERROR_VERBOSE ]b4_error_verbose[
#endif #endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE ]b4_token_table[
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
]m4_ifdef([b4_stype], ]m4_ifdef([b4_stype],
[b4_syncline([b4_stype_line], [b4_filename]) [b4_syncline([b4_stype_line], [b4_file_name])
typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE; typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE;
/* Line __line__ of yacc.c. */ /* Line __line__ of yacc.c. */
b4_syncline([@oline@], [@ofile@])], b4_syncline([@oline@], [@ofile@])],
@@ -214,27 +219,46 @@ typedef struct YYLTYPE
/* Line __line__ of yacc.c. */ /* Line __line__ of yacc.c. */
b4_syncline([@oline@], [@ofile@])[ b4_syncline([@oline@], [@ofile@])[
#if ! defined (yyoverflow) || YYERROR_VERBOSE #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
# ifndef YYFREE #ifndef YY_
# define YYFREE free # if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif # endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# endif # endif
# ifndef YY_
# define YY_(msgid) msgid
# endif
#endif
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */ /* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA # ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# endif
# else
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__ # ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca # define YYSTACK_ALLOC __builtin_alloca
# else
# define YYSTACK_ALLOC alloca
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYINCLUDED_STDLIB_H
# endif
# endif # endif
# endif # endif
# endif # endif
@@ -242,13 +266,39 @@ b4_syncline([@oline@], [@ofile@])[
# ifdef YYSTACK_ALLOC # ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */ /* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else # ifndef YYSTACK_ALLOC_MAXIMUM
# if defined (__STDC__) || defined (__cplusplus) /* The OS might guarantee only one guard page at the bottom of the stack,
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ and a page size can be as small as 4096 bytes. So we cannot safely
# define YYSIZE_T size_t invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
# endif # endif
# else
# define YYSTACK_ALLOC YYMALLOC # define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE # define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
# endif
# ifdef __cplusplus
extern "C" {
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
&& (defined (__STDC__) || defined (__cplusplus)))
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
&& (defined (__STDC__) || defined (__cplusplus)))
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifdef __cplusplus
}
# endif
# endif # endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
@@ -290,7 +340,7 @@ union yyalloc
# define YYCOPY(To, From, Count) \ # define YYCOPY(To, From, Count) \
do \ do \
{ \ { \
register YYSIZE_T yyi; \ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \ for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \ (To)[yyi] = (From)[yyi]; \
} \ } \
@@ -370,8 +420,8 @@ static const ]b4_int_type_for([b4_rline])[ yyrline[] =
}; };
#endif #endif
#if YYDEBUG || YYERROR_VERBOSE #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] = static const char *const yytname[] =
{ {
@@ -450,22 +500,6 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
]b4_stos[ ]b4_stos[
}; };
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY) #define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2) #define YYEMPTY (-2)
@@ -496,25 +530,58 @@ do \
} \ } \
else \ else \
{ \ { \
yyerror (]b4_yyerror_args["syntax error: cannot back up");\ yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
YYERROR; \ YYERROR; \
} \ } \
while (0) while (0)
#define YYTERROR 1 #define YYTERROR 1
#define YYERRCODE 256 #define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run). */
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT #ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \ # define YYLLOC_DEFAULT(Current, Rhs, N) \
((Current).first_line = (Rhs)[1].first_line, \ do \
(Current).first_column = (Rhs)[1].first_column, \ if (N) \
(Current).last_line = (Rhs)[N].last_line, \ { \
(Current).last_column = (Rhs)[N].last_column) (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (0)
#endif #endif
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif
/* YYLEX -- calling `yylex' with the right arguments. */ /* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM #ifdef YYLEX_PARAM
@@ -537,19 +604,13 @@ do { \
YYFPRINTF Args; \ YYFPRINTF Args; \
} while (0) } while (0)
# define YYDSYMPRINT(Args) \ # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
yysymprint Args; \
} while (0)
# define YYDSYMPRINTF(Title, Token, Value, Location) \
do { \ do { \
if (yydebug) \ if (yydebug) \
{ \ { \
YYFPRINTF (stderr, "%s ", Title); \ YYFPRINTF (stderr, "%s ", Title); \
yysymprint (stderr, \ yysymprint (stderr, \
Token, Value]b4_location_if([, Location])[); \ Type, Value]b4_location_if([, Location])[); \
YYFPRINTF (stderr, "\n"); \ YYFPRINTF (stderr, "\n"); \
} \ } \
} while (0) } while (0)
@@ -584,13 +645,13 @@ do { \
[[int yyrule], [yyrule]])[ [[int yyrule], [yyrule]])[
{ {
int yyi; int yyi;
unsigned int yylno = yyrline[yyrule]; unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
yyrule - 1, yylno); yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */ /* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
} }
# define YY_REDUCE_PRINT(Rule) \ # define YY_REDUCE_PRINT(Rule) \
@@ -604,8 +665,7 @@ do { \
int yydebug; int yydebug;
#else /* !YYDEBUG */ #else /* !YYDEBUG */
# define YYDPRINTF(Args) # define YYDPRINTF(Args)
# define YYDSYMPRINT(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top) # define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule) # define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */ #endif /* !YYDEBUG */
@@ -620,13 +680,9 @@ int yydebug;
if the built-in stack extension method is used). if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */ evaluated with infinite-precision integer arithmetic. */
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH #ifndef YYMAXDEPTH
# define YYMAXDEPTH ]b4_stack_depth_max[ # define YYMAXDEPTH ]b4_stack_depth_max[
#endif #endif
@@ -648,7 +704,7 @@ yystrlen (yystr)
const char *yystr; const char *yystr;
# endif # endif
{ {
register const char *yys = yystr; const char *yys = yystr;
while (*yys++ != '\0') while (*yys++ != '\0')
continue; continue;
@@ -673,8 +729,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc; const char *yysrc;
# endif # endif
{ {
register char *yyd = yydest; char *yyd = yydest;
register const char *yys = yysrc; const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0') while ((*yyd++ = *yys++) != '\0')
continue; continue;
@@ -684,7 +740,55 @@ yystpcpy (yydest, yysrc)
# endif # endif
# endif # endif
#endif /* !YYERROR_VERBOSE */ # ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
contains an apostrophe, a comma, or backslash (other than
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
size_t yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
case '"':
if (yyres)
yyres[yyn] = '\0';
return yyn;
}
do_not_strip_quotes: ;
}
if (! yyres)
return yystrlen (yystr);
return yystpcpy (yyres, yystr) - yyres;
}
# endif
#endif /* YYERROR_VERBOSE */
@@ -713,15 +817,15 @@ m4_divert_push([KILL])# ======================== M4 code.
# Declare the variables that are global, or local to YYPARSE if # Declare the variables that are global, or local to YYPARSE if
# pure-parser. # pure-parser.
m4_define([b4_declare_parser_variables], m4_define([b4_declare_parser_variables],
[/* The lookahead symbol. */ [/* The look-ahead symbol. */
int yychar; int yychar;
/* The semantic value of the lookahead symbol. */ /* The semantic value of the look-ahead symbol. */
YYSTYPE yylval; YYSTYPE yylval;
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
int yynerrs;b4_location_if([ int yynerrs;b4_location_if([
/* Location data for the lookahead symbol. */ /* Location data for the look-ahead symbol. */
YYLTYPE yylloc;]) YYLTYPE yylloc;])
]) ])
m4_divert_pop([KILL])dnl# ====================== End of M4 code. m4_divert_pop([KILL])dnl# ====================== End of M4 code.
@@ -746,12 +850,12 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
#endif #endif
{[ {[
]b4_pure_if([b4_declare_parser_variables])[ ]b4_pure_if([b4_declare_parser_variables])[
register int yystate; int yystate;
register int yyn; int yyn;
int yyresult; int yyresult;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0; int yytoken = 0;
/* Three stacks and their tools: /* Three stacks and their tools:
@@ -765,19 +869,20 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
/* The state stack. */ /* The state stack. */
short int yyssa[YYINITDEPTH]; short int yyssa[YYINITDEPTH];
short int *yyss = yyssa; short int *yyss = yyssa;
register short int *yyssp; short int *yyssp;
/* The semantic value stack. */ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp; YYSTYPE *yyvsp;
]b4_location_if( ]b4_location_if(
[[ /* The location stack. */ [[ /* The location stack. */
YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa; YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp; YYLTYPE *yylsp;
YYLTYPE *yylerrsp;]])[ /* The locations where the error started and ended. */
YYLTYPE yyerror_range[2];]])[
#define YYPOPSTACK (yyvsp--, yyssp--]b4_location_if([, yylsp--])[) #define YYPOPSTACK (yyvsp--, yyssp--]b4_location_if([, yylsp--])[)
@@ -806,17 +911,27 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
yyssp = yyss; yyssp = yyss;
yyvsp = yyvs; yyvsp = yyvs;
]b4_location_if([ yylsp = yyls;])[ ]b4_location_if([[ yylsp = yyls;
]m4_ifdef([b4_initial_action], [ #if YYLTYPE_IS_TRIVIAL
m4_pushdef([b4_at_dollar], [(*yylsp)])dnl /* Initialize the default location before parsing starts. */
m4_pushdef([b4_dollar_dollar], [(*yyvsp)])dnl yylloc.first_line = yylloc.last_line = 1;
yylloc.first_column = yylloc.last_column = 0;
#endif
]])
m4_ifdef([b4_initial_action], [
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
/* User initialization code. */ /* User initialization code. */
b4_initial_action b4_initial_action
m4_popdef([b4_dollar_dollar])dnl m4_popdef([b4_dollar_dollar])dnl
m4_popdef([b4_at_dollar])dnl m4_popdef([b4_at_dollar])dnl
/* Line __line__ of yacc.c. */ /* Line __line__ of yacc.c. */
b4_syncline([@oline@], [@ofile@])])dnl b4_syncline([@oline@], [@ofile@])
])dnl
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
]])dnl
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
]])dnl
[ goto yysetstate; [ goto yysetstate;
/*------------------------------------------------------------. /*------------------------------------------------------------.
@@ -849,7 +964,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */ be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow", yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp), &yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp), &yyvs1, yysize * sizeof (*yyvsp),
]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[ ]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[
@@ -860,11 +975,11 @@ b4_syncline([@oline@], [@ofile@])])dnl
} }
#else /* no yyoverflow */ #else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE # ifndef YYSTACK_RELOCATE
goto yyoverflowlab; goto yyexhaustedlab;
# else # else
/* Extend the stack our own way. */ /* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize) if (YYMAXDEPTH <= yystacksize)
goto yyoverflowlab; goto yyexhaustedlab;
yystacksize *= 2; yystacksize *= 2;
if (YYMAXDEPTH < yystacksize) if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH; yystacksize = YYMAXDEPTH;
@@ -874,7 +989,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
union yyalloc *yyptr = union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr) if (! yyptr)
goto yyoverflowlab; goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs); YYSTACK_RELOCATE (yyvs);
]b4_location_if([ YYSTACK_RELOCATE (yyls);])[ ]b4_location_if([ YYSTACK_RELOCATE (yyls);])[
@@ -906,18 +1021,18 @@ b4_syncline([@oline@], [@ofile@])])dnl
yybackup: yybackup:
/* Do appropriate processing given the current state. */ /* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */ /* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */ /* yyresume: */
/* First try to decide what to do without reference to lookahead token. */ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn == YYPACT_NINF) if (yyn == YYPACT_NINF)
goto yydefault; goto yydefault;
/* Not known => get a lookahead token if don't already have one. */ /* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY) if (yychar == YYEMPTY)
{ {
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
@@ -932,7 +1047,7 @@ yybackup:
else else
{ {
yytoken = YYTRANSLATE (yychar); yytoken = YYTRANSLATE (yychar);
YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
} }
/* If the proper action on seeing token YYTOKEN is to reduce or to /* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -952,8 +1067,8 @@ yybackup:
if (yyn == YYFINAL) if (yyn == YYFINAL)
YYACCEPT; YYACCEPT;
/* Shift the lookahead token. */ /* Shift the look-ahead token. */
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */ /* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF) if (yychar != YYEOF)
@@ -999,12 +1114,13 @@ yyreduce:
yyval = yyvsp[1-yylen]; yyval = yyvsp[1-yylen];
]b4_location_if( ]b4_location_if(
[ /* Default location. */ [[ /* Default location. */
YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);])[ YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);]])[
YY_REDUCE_PRINT (yyn); YY_REDUCE_PRINT (yyn);
switch (yyn) switch (yyn)
]{ ]{
b4_actions b4_actions
default: break;
} }
/* Line __line__ of yacc.c. */ /* Line __line__ of yacc.c. */
@@ -1047,12 +1163,36 @@ yyerrlab:
if (YYPACT_NINF < yyn && yyn < YYLAST) if (YYPACT_NINF < yyn && yyn < YYLAST)
{ {
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar); int yytype = YYTRANSLATE (yychar);
const char* yyprefix; YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
char *yymsg; YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
char *yymsg = 0;
# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx; int yyx;
#if 0
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s");
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
#endif
char *yyfmt;
char const *yyf;
static char const yyunexpected[] = "syntax error, unexpected %s";
static char const yyexpecting[] = ", expecting %s";
static char const yyor[] = " or %s";
char yyformat[sizeof yyunexpected
+ sizeof yyexpecting - 1
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
* (sizeof yyor - 1))];
char const *yyprefix = yyexpecting;
/* Start YYX at -YYN if negative to avoid negative indexes in /* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */ YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0; int yyxbegin = yyn < 0 ? -yyn : 0;
@@ -1060,81 +1200,91 @@ yyerrlab:
/* Stay within bounds of both yycheck and yytname. */ /* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn; int yychecklim = YYLAST - yyn;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 0; int yycount = 1;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
yyprefix = ", expecting ";
for (yyx = yyxbegin; yyx < yyxend; ++yyx) for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{ {
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
yycount += 1;
if (yycount == 5)
{ {
yysize = 0; yycount = 1;
yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break; break;
} }
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
} }
yysize += (sizeof ("syntax error, unexpected ")
+ yystrlen (yytname[yytype]));
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
yyp = yystpcpy (yyp, yytname[yytype]);
if (yycount < 5) yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= yysize1 < yysize;
yysize = yysize1;
if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg)
{ {
yyprefix = ", expecting "; /* Avoid sprintf, as that infringes on the user's name space.
for (yyx = yyxbegin; yyx < yyxend; ++yyx) Don't have undefined behavior even if the translation
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) produced a string with the wrong number of "%s"s. */
char *yyp = yymsg;
int yyi = 0;
while ((*yyp = *yyf))
{ {
yyp = yystpcpy (yyp, yyprefix); if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
yyp = yystpcpy (yyp, yytname[yyx]); {
yyprefix = " or "; yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
} }
} }
yyerror (]b4_yyerror_args[yymsg); yyerror (]b4_yyerror_args[yymsg);
YYSTACK_FREE (yymsg); YYSTACK_FREE (yymsg);
} }
else else
yyerror (]b4_yyerror_args["syntax error; also virtual memory exhausted"); {
yyerror (]b4_yyerror_args[YY_("syntax error"));
goto yyexhaustedlab;
}
} }
else else
#endif /* YYERROR_VERBOSE */ #endif /* YYERROR_VERBOSE */
yyerror (]b4_yyerror_args["syntax error"); yyerror (]b4_yyerror_args[YY_("syntax error"));
} }
]b4_location_if([ yylerrsp = yylsp;])[ ]b4_location_if([[ yyerror_range[0] = yylloc;]])[
if (yyerrstatus == 3) if (yyerrstatus == 3)
{ {
/* If just tried and failed to reuse lookahead token after an /* If just tried and failed to reuse look-ahead token after an
error, discard it. */ error, discard it. */
if (yychar <= YYEOF) if (yychar <= YYEOF)
{ {
/* If at end of input, pop the error token, /* Return failure if at end of input. */
then the rest of the stack, then return failure. */
if (yychar == YYEOF) if (yychar == YYEOF)
for (;;)
{
YYPOPSTACK;
if (yyssp == yyss)
YYABORT; YYABORT;
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
}
} }
else else
{ {
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); yydestruct ("Error: discarding", yytoken, &yylval]b4_location_if([, &yylloc])[);
yydestruct (yytoken, &yylval]b4_location_if([, &yylloc])[);
yychar = YYEMPTY; yychar = YYEMPTY;
]b4_location_if([ *++yylerrsp = yylloc;])[
} }
} }
/* Else will try to reuse lookahead token after shifting the error /* Else will try to reuse look-ahead token after shifting the error
token. */ token. */
goto yyerrlab1; goto yyerrlab1;
@@ -1144,20 +1294,18 @@ yyerrlab:
`---------------------------------------------------*/ `---------------------------------------------------*/
yyerrorlab: yyerrorlab:
#ifdef __GNUC__ /* Pacify compilers like GCC when the user code never invokes
/* Pacify GCC when the user code never invokes YYERROR and the label YYERROR and the label yyerrorlab therefore never appears in user
yyerrorlab therefore never appears in user code. */ code. */
if (0) if (0)
goto yyerrorlab; goto yyerrorlab;
#endif
yyvsp -= yylen; ]b4_location_if([[ yyerror_range[0] = yylsp[1-yylen];
yylsp -= yylen;
]])[yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
yystate = *yyssp; yystate = *yyssp;
]b4_location_if([yylerrsp = yylsp; goto yyerrlab1;
*++yylerrsp = yyloc;
yylsp -= yylen;
])[goto yyerrlab1;
/*-------------------------------------------------------------. /*-------------------------------------------------------------.
@@ -1184,8 +1332,8 @@ yyerrlab1:
if (yyssp == yyss) if (yyssp == yyss)
YYABORT; YYABORT;
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ]b4_location_if([[ yyerror_range[0] = *yylsp;]])[
yydestruct (yystos[yystate], yyvsp]b4_location_if([, yylsp])[); yydestruct ("Error: popping", yystos[yystate], yyvsp]b4_location_if([, yylsp])[);
YYPOPSTACK; YYPOPSTACK;
yystate = *yyssp; yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
@@ -1194,11 +1342,16 @@ yyerrlab1:
if (yyn == YYFINAL) if (yyn == YYFINAL)
YYACCEPT; YYACCEPT;
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval; *++yyvsp = yylval;
]b4_location_if([ YYLLOC_DEFAULT (yyloc, yylsp, yylerrsp - yylsp); ]b4_location_if([[
*++yylsp = yyloc;])[ yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the look-ahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2);
*++yylsp = yyloc;]])[
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn; yystate = yyn;
goto yynewstate; goto yynewstate;
@@ -1219,16 +1372,25 @@ yyabortlab:
goto yyreturn; goto yyreturn;
#ifndef yyoverflow #ifndef yyoverflow
/*----------------------------------------------. /*-------------------------------------------------.
| yyoverflowlab -- parser overflow comes here. | | yyexhaustedlab -- memory exhaustion comes here. |
`----------------------------------------------*/ `-------------------------------------------------*/
yyoverflowlab: yyexhaustedlab:
yyerror (]b4_yyerror_args["parser stack overflow"); yyerror (]b4_yyerror_args[YY_("memory exhausted"));
yyresult = 2; yyresult = 2;
/* Fall through. */ /* Fall through. */
#endif #endif
yyreturn: yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval]b4_location_if([, &yylloc])[);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
YYPOPSTACK;
}
#ifndef yyoverflow #ifndef yyoverflow
if (yyss != yyssa) if (yyss != yyssa)
YYSTACK_FREE (yyss); YYSTACK_FREE (yyss);
@@ -1241,18 +1403,18 @@ b4_epilogue
m4_if(b4_defines_flag, 0, [], m4_if(b4_defines_flag, 0, [],
[@output @output_header_name@ [@output @output_header_name@
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004]) [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005])
/* As a special exception, when this file is copied by Bison into a /* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction. Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */ in version 1.24 of Bison. */
b4_token_defines(b4_tokens) b4_token_enums_defines(b4_tokens)
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
m4_ifdef([b4_stype], m4_ifdef([b4_stype],
[b4_syncline([b4_stype_line], [b4_filename]) [b4_syncline([b4_stype_line], [b4_file_name])
typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE; typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE;
/* Line __line__ of yacc.c. */ /* Line __line__ of yacc.c. */
b4_syncline([@oline@], [@ofile@])], b4_syncline([@oline@], [@ofile@])],
+6 -3
View File
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*- ## Process this file with automake to produce Makefile.in -*-Makefile-*-
## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ## Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify ## 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 ## it under the terms of the GNU General Public License as published by
@@ -13,8 +13,8 @@
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02111-1307 USA ## 02110-1301 USA
AM_MAKEINFOFLAGS = --no-split AM_MAKEINFOFLAGS = --no-split
info_TEXINFOS = bison.texinfo info_TEXINFOS = bison.texinfo
@@ -25,6 +25,9 @@ EXTRA_DIST = FAQ bison.1 refcard.tex
CLEANFILES = refcard.dvi refcard.log refcard.ps bison.fns CLEANFILES = refcard.dvi refcard.log refcard.ps bison.fns
clean-local:
rm -rf *.t2d
refcard.dvi: refcard.tex refcard.dvi: refcard.tex
tex refcard.tex tex refcard.tex
+59 -36
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am. # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -33,6 +33,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = doc subdir = doc
DIST_COMMON = $(bison_TEXINFOS) $(srcdir)/Makefile.am \ DIST_COMMON = $(bison_TEXINFOS) $(srcdir)/Makefile.am \
@@ -40,35 +41,40 @@ DIST_COMMON = $(bison_TEXINFOS) $(srcdir)/Makefile.am \
$(srcdir)/version.texi $(srcdir)/version.texi
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/bison-i18n.m4 $(top_srcdir)/m4/cxx.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext_gl.m4 \
$(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \ $(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/inttypes_h_gl.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/lib-ld_gl.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix_gl.m4 $(top_srcdir)/m4/m4.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \ $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/po_gl.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stpcpy.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h_gl.m4 \
$(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/subpipe.m4 $(top_srcdir)/m4/timevar.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/warning.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/subpipe.m4 \
$(top_srcdir)/m4/timevar.m4 $(top_srcdir)/m4/uintmax_t_gl.m4 \
$(top_srcdir)/m4/ulonglong_gl.m4 \
$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/warning.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
INFO_DEPS = $(srcdir)/bison.info INFO_DEPS = $(srcdir)/bison.info
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/config am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
DVIS = bison.dvi DVIS = bison.dvi
PDFS = bison.pdf PDFS = bison.pdf
PSS = bison.ps PSS = bison.ps
@@ -95,6 +101,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOM4TE = @AUTOM4TE@ AUTOM4TE = @AUTOM4TE@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BISON_CXX_WORKS = @BISON_CXX_WORKS@
BISON_LOCALEDIR = @BISON_LOCALEDIR@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -112,6 +120,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
GCC = @GCC@ GCC = @GCC@
GETOPT_H = @GETOPT_H@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
HAVE__BOOL = @HAVE__BOOL@ HAVE__BOOL = @HAVE__BOOL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@@ -119,6 +128,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
@@ -136,6 +146,7 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@ MSGMERGE = @MSGMERGE@
O0CFLAGS = @O0CFLAGS@ O0CFLAGS = @O0CFLAGS@
O0CXXFLAGS = @O0CXXFLAGS@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -164,6 +175,7 @@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
aclocaldir = @aclocaldir@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -171,6 +183,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@ bindir = @bindir@
build = @build@ build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
@@ -240,16 +254,14 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
.texinfo.info: .texinfo.info:
restore=: && \ restore=: && backupdir="$(am__leading_dot)am$$$$" && \
backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && cd $(srcdir) && \ am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \ rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
mv $$f $$backupdir; \
restore=mv; \
fi; \
done; \ done; \
else :; fi && \
cd "$$am__cwd"; \ cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ $<; \ -o $@ $<; \
@@ -261,8 +273,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && \ cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \ fi; \
rm -rf $$backupdir; \ rm -rf $$backupdir; exit $$rc
exit $$rc
.texinfo.dvi: .texinfo.dvi:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
@@ -275,10 +286,18 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(TEXI2PDF) $< $(TEXI2PDF) $<
.texinfo.html: .texinfo.html:
$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ rm -rf $(@:.html=.htp)
-o $@ $< if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
if test ! -d $@ && test -d $(@:.html=); then \ -o $(@:.html=.htp) $<; \
mv $(@:.html=) $@; else :; fi then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
else \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
$(srcdir)/bison.info: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS) $(srcdir)/bison.info: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS) bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
bison.pdf: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS) bison.pdf: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
@@ -286,7 +305,7 @@ bison.html: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
$(srcdir)/version.texi: $(srcdir)/stamp-vti $(srcdir)/version.texi: $(srcdir)/stamp-vti
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure $(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure
@(dir=.; test -f ./bison.texinfo || dir=$(srcdir); \ @(dir=.; test -f ./bison.texinfo || dir=$(srcdir); \
set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/bison.texinfo`; \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/bison.texinfo`; \
echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \ echo "@set EDITION $(VERSION)"; \
@@ -303,10 +322,11 @@ mostlyclean-vti:
maintainer-clean-vti: maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
.dvi.ps: .dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $< $(DVIPS) -o $@ $<
uninstall-info-am: uninstall-info-am:
$(PRE_UNINSTALL) @$(PRE_UNINSTALL)
@if (install-info --version && \ @if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \ list='$(INFO_DEPS)'; \
@@ -322,7 +342,7 @@ uninstall-info-am:
relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if cd "$(DESTDIR)$(infodir)"; then \ (if cd "$(DESTDIR)$(infodir)"; then \
echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \ else :; fi); \
done done
@@ -462,14 +482,14 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
clean: clean-am clean: clean-am
clean-am: clean-generic mostlyclean-am clean-am: clean-generic clean-local mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -f Makefile -rm -f Makefile
@@ -548,12 +568,12 @@ uninstall-am: uninstall-info-am uninstall-man
uninstall-man: uninstall-man1 uninstall-man: uninstall-man1
.PHONY: all all-am check check-am clean clean-generic dist-info \ .PHONY: all all-am check check-am clean clean-generic clean-local \
distclean distclean-generic distdir dvi dvi-am html html-am \ dist-info distclean distclean-generic distdir dvi dvi-am html \
info info-am install install-am install-data install-data-am \ html-am info info-am install install-am install-data \
install-exec install-exec-am install-info install-info-am \ install-data-am install-exec install-exec-am install-info \
install-man install-man1 install-strip installcheck \ install-info-am install-man install-man1 install-strip \
installcheck-am installdirs maintainer-clean \ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-aminfo maintainer-clean-generic \
maintainer-clean-vti mostlyclean mostlyclean-aminfo \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \
mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
@@ -561,6 +581,9 @@ uninstall-man: uninstall-man1
uninstall-man1 uninstall-man1
clean-local:
rm -rf *.t2d
refcard.dvi: refcard.tex refcard.dvi: refcard.tex
tex refcard.tex tex refcard.tex
+1668 -623
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -7,7 +7,7 @@
@display @display
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@@ -420,8 +420,8 @@ license notices just after the title page:
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation; or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
A copy of the license is included in the section entitled ``GNU Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''. Free Documentation License''.
@end group @end group
@end smallexample @end smallexample
+2 -2
View File
@@ -6,7 +6,7 @@
@display @display
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc. Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@@ -352,7 +352,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@end smallexample @end smallexample
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
+6 -6
View File
@@ -35,8 +35,8 @@
% %
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with either Flex or Bison; see the file COPYING. If not, write % along with either Flex or Bison; see the file COPYING. If not, write
% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
% Boston, MA 02111-1307, USA. % Boston, MA 02110-1301, USA.
% %
% This file is intended to be processed by plain TeX (TeX82). % This file is intended to be processed by plain TeX (TeX82).
% %
@@ -96,9 +96,9 @@ For information, write to the:
\vskip .2\baselineskip \vskip .2\baselineskip
\centerline{Free Software Foundation, Inc.} \centerline{Free Software Foundation, Inc.}
\vskip .2\baselineskip \vskip .2\baselineskip
\centerline{59 Temple Place - Suite 330} \centerline{51 Franklin Street, Fifth Floor}
\vskip .2\baselineskip \vskip .2\baselineskip
\centerline{Boston, MA 02111-1307 USA} \centerline{Boston, MA 02110-1301 USA}
\endgroup} \endgroup}
%%%% smallcopyrightnotice for two column printing on one page. %%%% smallcopyrightnotice for two column printing on one page.
@@ -121,9 +121,9 @@ For information, write to the:
\vskip .2\baselineskip \vskip .2\baselineskip
\centerline{Free Software Foundation, Inc.} \centerline{Free Software Foundation, Inc.}
\vskip .2\baselineskip \vskip .2\baselineskip
\centerline{59 Temple Place - Suite 330} \centerline{51 Franklin Street, Fifth Floor}
\vskip .2\baselineskip \vskip .2\baselineskip
\centerline{Boston, MA 02111-1307 USA} \centerline{Boston, MA 02110-1301 USA}
\endgroup} \endgroup}
% make \bye not \outer so that the \def\bye in the \else clause below % make \bye not \outer so that the \def\bye in the \else clause below
+4 -4
View File
@@ -1,4 +1,4 @@
@set UPDATED 30 March 2004 @set UPDATED 16 September 2005
@set UPDATED-MONTH March 2004 @set UPDATED-MONTH September 2005
@set EDITION 1.875d @set EDITION 2.1
@set VERSION 1.875d @set VERSION 2.1
+4 -4
View File
@@ -1,4 +1,4 @@
@set UPDATED 30 March 2004 @set UPDATED 16 September 2005
@set UPDATED-MONTH March 2004 @set UPDATED-MONTH September 2005
@set EDITION 1.875d @set EDITION 2.1
@set VERSION 1.875d @set VERSION 2.1
+4
View File
@@ -14,9 +14,12 @@ StaticLibrary bison :
bitsetv-print.c bitsetv-print.c
bitsetv.c bitsetv.c
dirname.c dirname.c
dup-safer.c
ebitset.c ebitset.c
error.c error.c
exitfail.c exitfail.c
fd-safer.c
fopen-safer.c
get-errno.c get-errno.c
getopt.c getopt.c
getopt1.c getopt1.c
@@ -37,6 +40,7 @@ StaticLibrary bison :
timevar.c timevar.c
vbitset.c vbitset.c
xmalloc.c xmalloc.c
xalloc-die.c
xstrdup.c xstrdup.c
xstrndup.c xstrndup.c
; ;
+2 -2
View File
@@ -12,8 +12,8 @@
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02111-1307 USA ## 02110-1301 USA
AM_CFLAGS = $(WARNING_CFLAGS) AM_CFLAGS = $(WARNING_CFLAGS)
+80 -72
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.5 from Makefile.am. # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@
@SET_MAKE@ @SET_MAKE@
SOURCES = $(libbison_a_SOURCES) $(liby_a_SOURCES) # This file is generated automatically by "bootstrap".
srcdir = @srcdir@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
@@ -36,37 +36,54 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/gnulib.mk alloca.c error.c error.h malloc.c \ $(srcdir)/gnulib.mk alloca.c dirname.c dirname.h dup-safer.c \
obstack.c obstack.h realloc.c stpcpy.c strndup.c strnlen.c error.c error.h exitfail.c exitfail.h fd-safer.c fopen-safer.c \
getopt.c getopt1.c hard-locale.c hard-locale.h hash.c hash.h \
malloc.c obstack.c obstack.h pipe-safer.c quote.c quote.h \
quotearg.c quotearg.h stdio--.h stdio-safer.h stpcpy.c \
strdup.c strdup.h strndup.c strndup.h strnlen.c strnlen.h \
unistd--.h unistd-safer.h xalloc.h xmalloc.c
subdir = lib subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/bison-i18n.m4 $(top_srcdir)/m4/cxx.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dmalloc.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext_gl.m4 \
$(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \ $(top_srcdir)/m4/gnulib.m4 $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/inttypes_h_gl.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/lib-ld_gl.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix_gl.m4 $(top_srcdir)/m4/m4.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \ $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/po_gl.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stpcpy.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h_gl.m4 \
$(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/subpipe.m4 $(top_srcdir)/m4/timevar.m4 \ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/warning.m4 \ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/subpipe.m4 \
$(top_srcdir)/m4/timevar.m4 $(top_srcdir)/m4/uintmax_t_gl.m4 \
$(top_srcdir)/m4/ulonglong_gl.m4 \
$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/warning.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xstrndup.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" am__installdirs = "$(DESTDIR)$(libdir)"
libLIBRARIES_INSTALL = $(INSTALL_DATA) libLIBRARIES_INSTALL = $(INSTALL_DATA)
LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES)
@@ -82,11 +99,8 @@ am__objects_2 = bitsetv-print.$(OBJEXT)
am__objects_3 = timevar.$(OBJEXT) am__objects_3 = timevar.$(OBJEXT)
am__objects_4 = get-errno.$(OBJEXT) subpipe.$(OBJEXT) $(am__objects_1) \ am__objects_4 = get-errno.$(OBJEXT) subpipe.$(OBJEXT) $(am__objects_1) \
$(am__objects_2) $(am__objects_3) argmatch.$(OBJEXT) \ $(am__objects_2) $(am__objects_3) argmatch.$(OBJEXT) \
dirname.$(OBJEXT) basename.$(OBJEXT) stripslash.$(OBJEXT) \ basename.$(OBJEXT) stripslash.$(OBJEXT) mbswidth.$(OBJEXT) \
exitfail.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \ xalloc-die.$(OBJEXT) xstrndup.$(OBJEXT)
hard-locale.$(OBJEXT) hash.$(OBJEXT) mbswidth.$(OBJEXT) \
quote.$(OBJEXT) quotearg.$(OBJEXT) xmalloc.$(OBJEXT) \
xstrdup.$(OBJEXT) xstrndup.$(OBJEXT)
am_libbison_a_OBJECTS = $(am__objects_4) am_libbison_a_OBJECTS = $(am__objects_4)
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS) libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
liby_a_AR = $(AR) $(ARFLAGS) liby_a_AR = $(AR) $(ARFLAGS)
@@ -94,27 +108,8 @@ liby_a_LIBADD =
am_liby_a_OBJECTS = main.$(OBJEXT) yyerror.$(OBJEXT) am_liby_a_OBJECTS = main.$(OBJEXT) yyerror.$(OBJEXT)
liby_a_OBJECTS = $(am_liby_a_OBJECTS) liby_a_OBJECTS = $(am_liby_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error.Po \
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/obstack.Po \
@AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \
@AMDEP_TRUE@ $(DEPDIR)/strndup.Po $(DEPDIR)/strnlen.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/abitset.Po ./$(DEPDIR)/argmatch.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/basename.Po ./$(DEPDIR)/bitset.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/bitset_stats.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/bitsetv-print.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/bitsetv.Po ./$(DEPDIR)/dirname.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/ebitset.Po ./$(DEPDIR)/exitfail.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/get-errno.Po ./$(DEPDIR)/getopt.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/hard-locale.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/lbitset.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/mbswidth.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/quote.Po ./$(DEPDIR)/quotearg.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/stripslash.Po ./$(DEPDIR)/subpipe.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/timevar.Po ./$(DEPDIR)/vbitset.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/xmalloc.Po ./$(DEPDIR)/xstrdup.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/xstrndup.Po ./$(DEPDIR)/yyerror.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
@@ -135,6 +130,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOM4TE = @AUTOM4TE@ AUTOM4TE = @AUTOM4TE@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BISON_CXX_WORKS = @BISON_CXX_WORKS@
BISON_LOCALEDIR = @BISON_LOCALEDIR@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@@ -152,6 +149,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
GCC = @GCC@ GCC = @GCC@
GETOPT_H = @GETOPT_H@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
HAVE__BOOL = @HAVE__BOOL@ HAVE__BOOL = @HAVE__BOOL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@@ -159,6 +157,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
@@ -176,6 +175,7 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@ MSGMERGE = @MSGMERGE@
O0CFLAGS = @O0CFLAGS@ O0CFLAGS = @O0CFLAGS@
O0CXXFLAGS = @O0CXXFLAGS@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -204,6 +204,7 @@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@ ac_ct_STRIP = @ac_ct_STRIP@
aclocaldir = @aclocaldir@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -211,6 +212,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@ bindir = @bindir@
build = @build@ build = @build@
build_alias = @build_alias@ build_alias = @build_alias@
@@ -240,21 +243,20 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
AM_CFLAGS = $(WARNING_CFLAGS) AM_CFLAGS = $(WARNING_CFLAGS)
BUILT_SOURCES = $(ALLOCA_H) $(GETOPT_H) $(STDBOOL_H)
# This file is generated automatically by "bootstrap". EXTRA_DIST = alloca_.h getopt_.h getopt_int.h stdbool_.h
BUILT_SOURCES = $(ALLOCA_H) $(STDBOOL_H) MOSTLYCLEANFILES = alloca.h alloca.h-t getopt.h getopt.h-t stdbool.h \
EXTRA_DIST = alloca_.h stdbool_.h stdbool.h-t
MOSTLYCLEANFILES = alloca.h alloca.h-t stdbool.h stdbool.h-t
lib_LIBRARIES = $(YACC_LIBRARY) lib_LIBRARIES = $(YACC_LIBRARY)
EXTRA_LIBRARIES = liby.a EXTRA_LIBRARIES = liby.a
noinst_LIBRARIES = libbison.a noinst_LIBRARIES = libbison.a
liby_a_SOURCES = main.c yyerror.c liby_a_SOURCES = main.c yyerror.c
libbison_a_SOURCES = $(lib_SOURCES) libbison_a_SOURCES = $(lib_SOURCES)
lib_SOURCES = \ lib_SOURCES = get-errno.h get-errno.c subpipe.h subpipe.c \
get-errno.h get-errno.c \ $(bitsets_sources) $(additional_bitsets_sources) \
subpipe.h subpipe.c \ $(timevars_sources) argmatch.h argmatch.c basename.c \
$(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)\ stripslash.c exit.h gettext.h mbswidth.h mbswidth.c stpcpy.h \
argmatch.h argmatch.c dirname.h dirname.c basename.c stripslash.c exit.h exitfail.h exitfail.c getopt.h getopt.c getopt1.c getopt_int.h gettext.h hard-locale.h hard-locale.c hash.h hash.c mbswidth.h mbswidth.c quote.h quote.c quotearg.h quotearg.c stpcpy.h strndup.h unlocked-io.h xalloc.h xmalloc.c xstrdup.c xstrndup.h xstrndup.c xalloc-die.c xstrndup.h xstrndup.c
# Implementation of bitsets # Implementation of bitsets
bitsets_sources = \ bitsets_sources = \
@@ -313,7 +315,7 @@ install-libLIBRARIES: $(lib_LIBRARIES)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LIBRARIES)'; for p in $$list; do \ @list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \ f=$(am__strip_dir) \
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \ else :; fi; \
@@ -321,7 +323,7 @@ install-libLIBRARIES: $(lib_LIBRARIES)
@$(POST_INSTALL) @$(POST_INSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \ @list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
p="`echo $$p | sed -e 's|^.*/||'`"; \ p=$(am__strip_dir) \
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
else :; fi; \ else :; fi; \
@@ -330,7 +332,7 @@ install-libLIBRARIES: $(lib_LIBRARIES)
uninstall-libLIBRARIES: uninstall-libLIBRARIES:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \ @list='$(lib_LIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \ p=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
rm -f "$(DESTDIR)$(libdir)/$$p"; \ rm -f "$(DESTDIR)$(libdir)/$$p"; \
done done
@@ -356,13 +358,26 @@ distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dirname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dup-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/exitfail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fd-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fopen-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hard-locale.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pipe-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abitset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abitset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@
@@ -370,25 +385,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitset_stats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitset_stats.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitsetv-print.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitsetv-print.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitsetv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitsetv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebitset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebitset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-errno.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbitset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbitset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbswidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbswidth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subpipe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subpipe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbitset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbitset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrdup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yyerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yyerror.Po@am__quote@
@@ -396,16 +402,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am: uninstall-info-am:
@@ -513,7 +517,7 @@ mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@@ -582,16 +586,20 @@ uninstall-am: uninstall-info-am uninstall-libLIBRARIES
uninstall-libLIBRARIES uninstall-libLIBRARIES
# We need the following in order to create an <alloca.h> when the system # We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(ALLOCA_H)
alloca.h: alloca_.h alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@-t cp $(srcdir)/alloca_.h $@-t
mv $@-t $@ mv $@-t $@
# We need the following in order to create an <stdbool.h> when the system # We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt_.h
cp $(srcdir)/getopt_.h $@-t
mv $@-t $@
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works. # doesn't have one that works.
all-local $(lib_OBJECTS): $(STDBOOL_H)
stdbool.h: stdbool_.h stdbool.h: stdbool_.h
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
mv $@-t $@ mv $@-t $@
+1 -1
View File
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ABITSET_H #ifndef _ABITSET_H
#define _ABITSET_H #define _ABITSET_H
+6 -8
View File
@@ -15,15 +15,13 @@
You should have received a copy of the GNU General Public You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */ USA. */
/* When this file is included, it may be preceded only by preprocessor /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
declarations. Thanks to AIX. Therefore we include it right after means there is a real alloca function. */
"config.h", not later. */ #ifndef _GNULIB_ALLOCA_H
# define _GNULIB_ALLOCA_H
#ifndef _ALLOCA_H
# define _ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory /* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns. allocated on the stack, which will last until the function returns.
@@ -51,4 +49,4 @@ extern "C"
void *alloca (size_t); void *alloca (size_t);
#endif #endif
#endif /* _ALLOCA_H */ #endif /* _GNULIB_ALLOCA_H */
+27 -23
View File
@@ -1,6 +1,6 @@
/* argmatch.c -- find a match for a string in an array /* argmatch.c -- find a match for a string in an array
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004 Free Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc. Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by David MacKenzie <[email protected]> /* Written by David MacKenzie <[email protected]>
Modified by Akim Demaille <demaille@inf.enst.fr> */ Modified by Akim Demaille <demaille@inf.enst.fr> */
@@ -27,6 +27,7 @@
/* Specification. */ /* Specification. */
#include "argmatch.h" #include "argmatch.h"
#include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -38,7 +39,10 @@
#include "exit.h" #include "exit.h"
#include "quotearg.h" #include "quotearg.h"
#include "quote.h" #include "quote.h"
#include "unlocked-io.h"
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
/* When reporting an invalid argument, show nonprinting characters /* When reporting an invalid argument, show nonprinting characters
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
@@ -69,7 +73,7 @@ argmatch_exit_fn argmatch_die = __argmatch_die;
/* If ARG is an unambiguous match for an element of the /* If ARG is an unambiguous match for an element of the
null-terminated array ARGLIST, return the index in ARGLIST NULL-terminated array ARGLIST, return the index in ARGLIST
of the matched element, else -1 if it does not match any element of the matched element, else -1 if it does not match any element
or -2 if it is ambiguous (is a prefix of more than one element). or -2 if it is ambiguous (is a prefix of more than one element).
@@ -79,14 +83,14 @@ argmatch_exit_fn argmatch_die = __argmatch_die;
"no", "nope" -> 1 "no", "nope" -> 1
"y" is a valid argument, for `0', and "n" for `1'. */ "y" is a valid argument, for `0', and "n" for `1'. */
int ptrdiff_t
argmatch (const char *arg, const char *const *arglist, argmatch (const char *arg, const char *const *arglist,
const char *vallist, size_t valsize) const char *vallist, size_t valsize)
{ {
int i; /* Temporary index in ARGLIST. */ size_t i; /* Temporary index in ARGLIST. */
size_t arglen; /* Length of ARG. */ size_t arglen; /* Length of ARG. */
int matchind = -1; /* Index of first nonexact match. */ ptrdiff_t matchind = -1; /* Index of first nonexact match. */
int ambiguous = 0; /* If nonzero, multiple nonexact match(es). */ bool ambiguous = false; /* If true, multiple nonexact match(es). */
arglen = strlen (arg); arglen = strlen (arg);
@@ -110,7 +114,7 @@ argmatch (const char *arg, const char *const *arglist,
{ {
/* There is a real ambiguity, or we could not /* There is a real ambiguity, or we could not
disambiguate. */ disambiguate. */
ambiguous = 1; ambiguous = true;
} }
} }
} }
@@ -127,7 +131,7 @@ argmatch (const char *arg, const char *const *arglist,
PROBLEM is the return value from argmatch. */ PROBLEM is the return value from argmatch. */
void void
argmatch_invalid (const char *context, const char *value, int problem) argmatch_invalid (const char *context, const char *value, ptrdiff_t problem)
{ {
char const *format = (problem == -1 char const *format = (problem == -1
? _("invalid argument %s for %s") ? _("invalid argument %s for %s")
@@ -145,7 +149,7 @@ void
argmatch_valid (const char *const *arglist, argmatch_valid (const char *const *arglist,
const char *vallist, size_t valsize) const char *vallist, size_t valsize)
{ {
int i; size_t i;
const char *last_val = NULL; const char *last_val = NULL;
/* We try to put synonyms on the same line. The assumption is that /* We try to put synonyms on the same line. The assumption is that
@@ -171,13 +175,13 @@ argmatch_valid (const char *const *arglist,
"--version-control", or "$VERSION_CONTROL" etc.). Upon failure, "--version-control", or "$VERSION_CONTROL" etc.). Upon failure,
calls the (supposed never to return) function EXIT_FN. */ calls the (supposed never to return) function EXIT_FN. */
int ptrdiff_t
__xargmatch_internal (const char *context, __xargmatch_internal (const char *context,
const char *arg, const char *const *arglist, const char *arg, const char *const *arglist,
const char *vallist, size_t valsize, const char *vallist, size_t valsize,
argmatch_exit_fn exit_fn) argmatch_exit_fn exit_fn)
{ {
int res = argmatch (arg, arglist, vallist, valsize); ptrdiff_t res = argmatch (arg, arglist, vallist, valsize);
if (res >= 0) if (res >= 0)
/* Success. */ /* Success. */
return res; return res;
@@ -197,7 +201,7 @@ argmatch_to_argument (const char *value,
const char *const *arglist, const char *const *arglist,
const char *vallist, size_t valsize) const char *vallist, size_t valsize)
{ {
int i; size_t i;
for (i = 0; arglist[i]; i++) for (i = 0; arglist[i]; i++)
if (!memcmp (value, vallist + valsize * i, valsize)) if (!memcmp (value, vallist + valsize * i, valsize))
@@ -215,17 +219,17 @@ char *program_name;
enum backup_type enum backup_type
{ {
/* Never make backups. */ /* Never make backups. */
none, no_backups,
/* Make simple backups of every file. */ /* Make simple backups of every file. */
simple, simple_backups,
/* Make numbered backups of files that already have numbered backups, /* Make numbered backups of files that already have numbered backups,
and simple backups of the others. */ and simple backups of the others. */
numbered_existing, numbered_existing_backups,
/* Make numbered backups of every file. */ /* Make numbered backups of every file. */
numbered numbered_backups
}; };
/* Two tables describing arguments (keys) and their corresponding /* Two tables describing arguments (keys) and their corresponding
@@ -241,17 +245,17 @@ static const char *const backup_args[] =
static const enum backup_type backup_vals[] = static const enum backup_type backup_vals[] =
{ {
none, none, none, no_backups, no_backups, no_backups,
simple, simple, simple_backups, simple_backups,
numbered_existing, numbered_existing, numbered_existing_backups, numbered_existing_backups,
numbered, numbered numbered_backups, numbered_backups
}; };
int int
main (int argc, const char *const *argv) main (int argc, const char *const *argv)
{ {
const char *cp; const char *cp;
enum backup_type backup_type = none; enum backup_type backup_type = no_backups;
program_name = (char *) argv[0]; program_name = (char *) argv[0];
+5 -4
View File
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by David MacKenzie <[email protected]> /* Written by David MacKenzie <[email protected]>
Modified by Akim Demaille <demaille@inf.enst.fr> */ Modified by Akim Demaille <demaille@inf.enst.fr> */
@@ -49,7 +49,7 @@
false ambiguities (i.e., different matches of ARG but corresponding false ambiguities (i.e., different matches of ARG but corresponding
to the same values in VALLIST). */ to the same values in VALLIST). */
int argmatch (char const *arg, char const *const *arglist, ptrdiff_t argmatch (char const *arg, char const *const *arglist,
char const *vallist, size_t valsize); char const *vallist, size_t valsize);
# define ARGMATCH(Arg, Arglist, Vallist) \ # define ARGMATCH(Arg, Arglist, Vallist) \
@@ -63,7 +63,8 @@ extern argmatch_exit_fn argmatch_die;
/* Report on stderr why argmatch failed. Report correct values. */ /* Report on stderr why argmatch failed. Report correct values. */
void argmatch_invalid (char const *context, char const *value, int problem); void argmatch_invalid (char const *context, char const *value,
ptrdiff_t problem);
/* Left for compatibility with the old name invalid_arg */ /* Left for compatibility with the old name invalid_arg */
@@ -85,7 +86,7 @@ void argmatch_valid (char const *const *arglist,
/* Same as argmatch, but upon failure, reports a explanation on the /* Same as argmatch, but upon failure, reports a explanation on the
failure, and exits using the function EXIT_FN. */ failure, and exits using the function EXIT_FN. */
int __xargmatch_internal (char const *context, ptrdiff_t __xargmatch_internal (char const *context,
char const *arg, char const *const *arglist, char const *arg, char const *const *arglist,
char const *vallist, size_t valsize, char const *vallist, size_t valsize,
argmatch_exit_fn exit_fn); argmatch_exit_fn exit_fn);
+5 -5
View File
@@ -1,7 +1,7 @@
/* basename.c -- return the last element in a path /* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003 Free Software Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
Foundation, Inc. Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
# include <config.h> # include <config.h>
@@ -35,7 +35,7 @@
char * char *
base_name (char const *name) base_name (char const *name)
{ {
char const *base = name + FILESYSTEM_PREFIX_LEN (name); char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
char const *p; char const *p;
for (p = base; *p; p++) for (p = base; *p; p++)
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _BBITSET_H #ifndef _BBITSET_H
#define _BBITSET_H #define _BBITSET_H
+4 -4
View File
@@ -1,5 +1,5 @@
/* General bitsets. /* General bitsets.
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz). Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@@ -138,7 +138,7 @@ bitset_alloc (bitset_bindex n_bits, enum bitset_type type)
bytes = bitset_bytes (type, n_bits); bytes = bitset_bytes (type, n_bits);
bset = (bitset) xcalloc (1, bytes); bset = xcalloc (1, bytes);
/* The cache is disabled until some elements are allocated. If we /* The cache is disabled until some elements are allocated. If we
have variable length arrays, then we may need to allocate a dummy have variable length arrays, then we may need to allocate a dummy
@@ -307,7 +307,7 @@ bitset_print (FILE *file, bitset bset, bool verbose)
pos = 0; pos = 0;
} }
fprintf (file, "%d ", i); fprintf (file, "%lu ", (unsigned long int) i);
pos += 1 + (i >= 10) + (i >= 100); pos += 1 + (i >= 10) + (i >= 100);
}; };
+3 -4
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _BITSET_H #ifndef _BITSET_H
#define _BITSET_H #define _BITSET_H
@@ -371,10 +371,10 @@ extern void bitset_stats_enable (void);
extern void bitset_stats_disable (void); extern void bitset_stats_disable (void);
/* Read bitset stats file of accummulated stats. */ /* Read bitset stats file of accummulated stats. */
void bitset_stats_read (const char *filename); void bitset_stats_read (const char *file_name);
/* Write bitset stats file of accummulated stats. */ /* Write bitset stats file of accummulated stats. */
void bitset_stats_write (const char *filename); void bitset_stats_write (const char *file_name);
/* Dump bitset stats. */ /* Dump bitset stats. */
extern void bitset_stats_dump (FILE *); extern void bitset_stats_dump (FILE *);
@@ -386,4 +386,3 @@ extern void debug_bitset (bitset);
extern void debug_bitset_stats (void); extern void debug_bitset_stats (void);
#endif /* _BITSET_H */ #endif /* _BITSET_H */
+14 -14
View File
@@ -1,5 +1,5 @@
/* Bitset statistics. /* Bitset statistics.
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz). Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
/* This file is a wrapper bitset implementation for the other bitset /* This file is a wrapper bitset implementation for the other bitset
@@ -241,17 +241,17 @@ bitset_stats_disable (void)
/* Read bitset statistics file. */ /* Read bitset statistics file. */
void void
bitset_stats_read (const char *filename) bitset_stats_read (const char *file_name)
{ {
FILE *file; FILE *file;
if (!bitset_stats_info) if (!bitset_stats_info)
return; return;
if (!filename) if (!file_name)
filename = BITSET_STATS_FILE; file_name = BITSET_STATS_FILE;
file = fopen (filename, "r"); file = fopen (file_name, "r");
if (file) if (file)
{ {
if (fread (&bitset_stats_info_data, sizeof (bitset_stats_info_data), if (fread (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
@@ -271,17 +271,17 @@ bitset_stats_read (const char *filename)
/* Write bitset statistics file. */ /* Write bitset statistics file. */
void void
bitset_stats_write (const char *filename) bitset_stats_write (const char *file_name)
{ {
FILE *file; FILE *file;
if (!bitset_stats_info) if (!bitset_stats_info)
return; return;
if (!filename) if (!file_name)
filename = BITSET_STATS_FILE; file_name = BITSET_STATS_FILE;
file = fopen (filename, "w"); file = fopen (file_name, "w");
if (file) if (file)
{ {
if (fwrite (&bitset_stats_info_data, sizeof (bitset_stats_info_data), if (fwrite (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
@@ -698,25 +698,25 @@ bitset_stats_init (bitset bset, bitset_bindex n_bits, enum bitset_type type)
{ {
case BITSET_ARRAY: case BITSET_ARRAY:
bytes = abitset_bytes (n_bits); bytes = abitset_bytes (n_bits);
sbset = (bitset) xcalloc (1, bytes); sbset = xcalloc (1, bytes);
abitset_init (sbset, n_bits); abitset_init (sbset, n_bits);
break; break;
case BITSET_LIST: case BITSET_LIST:
bytes = lbitset_bytes (n_bits); bytes = lbitset_bytes (n_bits);
sbset = (bitset) xcalloc (1, bytes); sbset = xcalloc (1, bytes);
lbitset_init (sbset, n_bits); lbitset_init (sbset, n_bits);
break; break;
case BITSET_TABLE: case BITSET_TABLE:
bytes = ebitset_bytes (n_bits); bytes = ebitset_bytes (n_bits);
sbset = (bitset) xcalloc (1, bytes); sbset = xcalloc (1, bytes);
ebitset_init (sbset, n_bits); ebitset_init (sbset, n_bits);
break; break;
case BITSET_VARRAY: case BITSET_VARRAY:
bytes = vbitset_bytes (n_bits); bytes = vbitset_bytes (n_bits);
sbset = (bitset) xcalloc (1, bytes); sbset = xcalloc (1, bytes);
vbitset_init (sbset, n_bits); vbitset_init (sbset, n_bits);
break; break;
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _BITSET_STATS_H #ifndef _BITSET_STATS_H
#define _BITSET_STATS_H #define _BITSET_STATS_H
+2 -2
View File
@@ -15,8 +15,8 @@ for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to the Free along with Bison; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02111-1307, USA. */ 02110-1301, USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _BITSETV_PRINT_H #ifndef _BITSETV_PRINT_H
#define _BITSETV_PRINT_H #define _BITSETV_PRINT_H
+4 -4
View File
@@ -1,5 +1,5 @@
/* Bitset vectors. /* Bitset vectors.
Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
@@ -15,8 +15,8 @@ for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02111-1307, USA. */ 02110-1301, USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@@ -47,7 +47,7 @@ bitsetv_alloc (bitset_bindex n_vecs, bitset_bindex n_bits,
/* Allocate vector table at head of bitset array. */ /* Allocate vector table at head of bitset array. */
vector_bytes = (n_vecs + 1) * sizeof (bitset) + bytes - 1; vector_bytes = (n_vecs + 1) * sizeof (bitset) + bytes - 1;
vector_bytes -= vector_bytes % bytes; vector_bytes -= vector_bytes % bytes;
bsetv = (bitset *) xcalloc (1, vector_bytes + bytes * n_vecs); bsetv = xcalloc (1, vector_bytes + bytes * n_vecs);
for (i = 0; i < n_vecs; i++) for (i = 0; i < n_vecs; i++)
{ {
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _BITSETV_H #ifndef _BITSETV_H
#define _BITSETV_H #define _BITSETV_H
+24 -22
View File
@@ -1,5 +1,7 @@
/* dirname.c -- return all but the last element in a path /* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -13,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
# include <config.h> # include <config.h>
@@ -24,40 +26,40 @@
#include <string.h> #include <string.h>
#include "xalloc.h" #include "xalloc.h"
/* Return the length of `dirname (PATH)', or zero if PATH is /* Return the length of `dirname (FILE)', or zero if FILE is
in the working directory. Works properly even if in the working directory. Works properly even if
there are trailing slashes (by effectively ignoring them). */ there are trailing slashes (by effectively ignoring them). */
size_t size_t
dir_len (char const *path) dir_len (char const *file)
{ {
size_t prefix_length = FILESYSTEM_PREFIX_LEN (path); size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
size_t length; size_t length;
/* Strip the basename and any redundant slashes before it. */ /* Strip the basename and any redundant slashes before it. */
for (length = base_name (path) - path; prefix_length < length; length--) for (length = base_name (file) - file; prefix_length < length; length--)
if (! ISSLASH (path[length - 1])) if (! ISSLASH (file[length - 1]))
return length; return length;
/* But don't strip the only slash from "/". */ /* But don't strip the only slash from "/". */
return prefix_length + ISSLASH (path[prefix_length]); return prefix_length + ISSLASH (file[prefix_length]);
} }
/* Return the leading directories part of PATH, /* Return the leading directories part of FILE,
allocated with xmalloc. allocated with xmalloc.
Works properly even if there are trailing slashes Works properly even if there are trailing slashes
(by effectively ignoring them). */ (by effectively ignoring them). */
char * char *
dir_name (char const *path) dir_name (char const *file)
{ {
size_t length = dir_len (path); size_t length = dir_len (file);
int append_dot = (length == FILESYSTEM_PREFIX_LEN (path)); bool append_dot = (length == FILE_SYSTEM_PREFIX_LEN (file));
char *newpath = xmalloc (length + append_dot + 1); char *dir = xmalloc (length + append_dot + 1);
memcpy (newpath, path, length); memcpy (dir, file, length);
if (append_dot) if (append_dot)
newpath[length++] = '.'; dir[length++] = '.';
newpath[length] = 0; dir[length] = 0;
return newpath; return dir;
} }
#ifdef TEST_DIRNAME #ifdef TEST_DIRNAME
@@ -106,13 +108,13 @@ main (int argc, char *argv[])
buff[MAX_BUFF_LEN] = 0; buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0]) while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
{ {
char path[MAX_BUFF_LEN]; char file[MAX_BUFF_LEN];
char expected_result[MAX_BUFF_LEN]; char expected_result[MAX_BUFF_LEN];
char const *result; char const *result;
sscanf (buff, "%s %s", path, expected_result); sscanf (buff, "%s %s", file, expected_result);
result = dir_name (path); result = dir_name (file);
if (strcmp (result, expected_result)) if (strcmp (result, expected_result))
printf ("%s: got %s, expected %s\n", path, result, expected_result); printf ("%s: got %s, expected %s\n", file, result, expected_result);
} }
return 0; return 0;
} }
+13 -9
View File
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names. /* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003 Free Software Foundation, Inc. Copyright (C) 1998, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -14,11 +14,12 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef DIRNAME_H_ #ifndef DIRNAME_H_
# define DIRNAME_H_ 1 # define DIRNAME_H_ 1
# include <stdbool.h>
# include <stddef.h> # include <stddef.h>
# ifndef DIRECTORY_SEPARATOR # ifndef DIRECTORY_SEPARATOR
@@ -29,15 +30,18 @@
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
# endif # endif
# ifndef FILESYSTEM_PREFIX_LEN # ifndef FILE_SYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0 # define FILE_SYSTEM_PREFIX_LEN(File_name) 0
# endif # endif
char *base_name (char const *path); # define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
char *dir_name (char const *path); # define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
size_t base_len (char const *path);
size_t dir_len (char const *path);
int strip_trailing_slashes (char *path); char *base_name (char const *file);
char *dir_name (char const *file);
size_t base_len (char const *file);
size_t dir_len (char const *file);
bool strip_trailing_slashes (char *file);
#endif /* not DIRNAME_H_ */ #endif /* not DIRNAME_H_ */
+46
View File
@@ -0,0 +1,46 @@
/* Invoke dup, but avoid some glitches.
Copyright (C) 2001, 2004, 2005 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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "unistd-safer.h"
#include <fcntl.h>
#include <unistd.h>
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
STDERR_FILENO. */
int
dup_safer (int fd)
{
#ifdef F_DUPFD
return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
#else
/* fd_safer calls us back, but eventually the recursion unwinds and
does the right thing. */
return fd_safer (dup (fd));
#endif
}
+4 -4
View File
@@ -1,5 +1,5 @@
/* Functions to support expandable bitsets. /* Functions to support expandable bitsets.
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz). Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
@@ -115,11 +115,11 @@ static ebitset_elt *ebitset_free_list; /* Free list of bitset elements. */
((BSET)->b.cindex = (EINDEX) * EBITSET_ELT_WORDS, \ ((BSET)->b.cindex = (EINDEX) * EBITSET_ELT_WORDS, \
(BSET)->b.cdata = EBITSET_WORDS (EBITSET_ELTS (BSET) [EINDEX])) (BSET)->b.cdata = EBITSET_WORDS (EBITSET_ELTS (BSET) [EINDEX]))
#undef min
#undef max
#define min(a, b) ((a) > (b) ? (b) : (a)) #define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
static bitset_bindex static bitset_bindex
ebitset_resize (bitset src, bitset_bindex n_bits) ebitset_resize (bitset src, bitset_bindex n_bits)
{ {
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _EBITSET_H #ifndef _EBITSET_H
#define _EBITSET_H #define _EBITSET_H
+6 -12
View File
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities /* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2002, 2003 Free Software Foundation, Inc. Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by David MacKenzie <[email protected]>. */ /* Written by David MacKenzie <[email protected]>. */
@@ -29,9 +29,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef _LIBC #if !_LIBC && ENABLE_NLS
# include <libintl.h>
#else
# include "gettext.h" # include "gettext.h"
#endif #endif
@@ -40,7 +38,7 @@
# define mbsrtowcs __mbsrtowcs # define mbsrtowcs __mbsrtowcs
#endif #endif
#if !_LIBC #if USE_UNLOCKED_IO
# include "unlocked-io.h" # include "unlocked-io.h"
#endif #endif
@@ -106,7 +104,7 @@ extern char *program_name;
static void static void
print_errno_message (int errnum) print_errno_message (int errnum)
{ {
char const *s; char const *s = NULL;
#if defined HAVE_STRERROR_R || _LIBC #if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024]; char errbuf[1024];
@@ -115,15 +113,11 @@ print_errno_message (int errnum)
# else # else
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
s = errbuf; s = errbuf;
else
s = 0;
# endif # endif
#else
s = strerror (errnum);
#endif #endif
#if !_LIBC #if !_LIBC
if (! s) if (! s && ! (s = strerror (errnum)))
s = _("Unknown system error"); s = _("Unknown system error");
#endif #endif
+1 -1
View File
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ERROR_H #ifndef _ERROR_H
#define _ERROR_H 1 #define _ERROR_H 1
+1 -1
View File
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _EXIT_H #ifndef _EXIT_H
#define _EXIT_H #define _EXIT_H
+1 -1
View File
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. along with this program; see the file COPYING.
If not, write to the Free Software Foundation, If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
# include <config.h> # include <config.h>
+1 -1
View File
@@ -15,6 +15,6 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. along with this program; see the file COPYING.
If not, write to the Free Software Foundation, If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
extern int volatile exit_failure; extern int volatile exit_failure;
+59
View File
@@ -0,0 +1,59 @@
/* Return a safer copy of a file descriptor.
Copyright (C) 2005 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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "unistd-safer.h"
#include <errno.h>
#include <unistd.h>
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
/* Return FD, unless FD would be a copy of standard input, output, or
error; in that case, return a duplicate of FD, closing FD. On
failure to duplicate, close FD, set errno, and return -1. Preserve
errno if FD is negative, so that the caller can always inspect
errno when the returned value is negative.
This function is usefully wrapped around functions that return file
descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */
int
fd_safer (int fd)
{
if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
{
int f = dup_safer (fd);
int e = errno;
close (fd);
errno = e;
fd = f;
}
return fd;
}
+69
View File
@@ -0,0 +1,69 @@
/* Invoke fopen, but avoid some glitches.
Copyright (C) 2001, 2004, 2005 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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "stdio-safer.h"
#include <errno.h>
#include <unistd.h>
#include "unistd-safer.h"
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
/* Like fopen, but do not return stdin, stdout, or stderr. */
FILE *
fopen_safer (char const *file, char const *mode)
{
FILE *fp = fopen (file, mode);
if (fp)
{
int fd = fileno (fp);
if (0 <= fd && fd <= STDERR_FILENO)
{
int f = dup_safer (fd);
if (f < 0)
{
int e = errno;
fclose (fp);
errno = e;
return NULL;
}
if (fclose (fp) != 0
|| ! (fp = fdopen (f, mode)))
{
int e = errno;
close (f);
errno = e;
return NULL;
}
}
}
return fp;
}
+1 -1
View File
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */ /* Written by Paul Eggert. */
+1 -1
View File
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
extern int get_errno (void); extern int get_errno (void);
extern void set_errno (int); extern void set_errno (int);
+33 -46
View File
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */ Ditto for AIX 3.2 and <stdlib.h>. */
@@ -32,25 +32,6 @@
#include <stdio.h> #include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
# include <gnu-versions.h>
# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
# define ELIDE_CODE
# endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include /* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */ to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__ #ifdef __GNU_LIBRARY__
@@ -81,16 +62,16 @@
# define attribute_hidden # define attribute_hidden
#endif #endif
/* This version of `getopt' appears to the caller like standard Unix `getopt' /* Unlike standard Unix `getopt', functions like `getopt_long'
but it behaves differently for the user, since it allows the user let the user intersperse the options with the other arguments.
to intersperse the options with the other arguments.
As `getopt' works, it permutes the elements of ARGV so that, As `getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order. all application programs are extended to handle flexible argument order.
Setting the environment variable POSIXLY_CORRECT disables permutation. Using `getopt' or setting the environment variable POSIXLY_CORRECT
Then the behavior is completely standard. disables permutation.
Then the application's behavior is completely standard.
GNU application programs can use a third alternative mode in which GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */ they can distinguish the relative order of options and other arguments. */
@@ -269,8 +250,8 @@ exchange (char **argv, struct _getopt_data *d)
/* Initialize the internal data when the first call is made. */ /* Initialize the internal data when the first call is made. */
static const char * static const char *
_getopt_initialize (int argc, char *const *argv, const char *optstring, _getopt_initialize (int argc, char **argv, const char *optstring,
struct _getopt_data *d) int posixly_correct, struct _getopt_data *d)
{ {
/* Start processing options with ARGV-element 1 (since ARGV-element 0 /* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped is the program name); the sequence of previously skipped
@@ -280,7 +261,7 @@ _getopt_initialize (int argc, char *const *argv, const char *optstring,
d->__nextchar = NULL; d->__nextchar = NULL;
d->__posixly_correct = !!getenv ("POSIXLY_CORRECT"); d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
/* Determine how to handle the ordering of options and nonoptions. */ /* Determine how to handle the ordering of options and nonoptions. */
@@ -374,10 +355,6 @@ _getopt_initialize (int argc, char *const *argv, const char *optstring,
`flag' field is nonzero, the value of the option's `val' field `flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero. if the `flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
LONGOPTS is a vector of `struct option' terminated by an LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero. element containing a name which is zero.
@@ -386,12 +363,15 @@ _getopt_initialize (int argc, char *const *argv, const char *optstring,
recent call. recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce If LONG_ONLY is nonzero, '-' as well as '--' can introduce
long-named options. */ long-named options.
If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT
environment variable were set. */
int int
_getopt_internal_r (int argc, char *const *argv, const char *optstring, _getopt_internal_r (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind, const struct option *longopts, int *longind,
int long_only, struct _getopt_data *d) int long_only, int posixly_correct, struct _getopt_data *d)
{ {
int print_errors = d->opterr; int print_errors = d->opterr;
if (optstring[0] == ':') if (optstring[0] == ':')
@@ -406,7 +386,8 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
{ {
if (d->optind == 0) if (d->optind == 0)
d->optind = 1; /* Don't scan ARGV[0], the program name. */ d->optind = 1; /* Don't scan ARGV[0], the program name. */
optstring = _getopt_initialize (argc, argv, optstring, d); optstring = _getopt_initialize (argc, argv, optstring,
posixly_correct, d);
d->__initialized = 1; d->__initialized = 1;
} }
@@ -1154,16 +1135,17 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
} }
int int
_getopt_internal (int argc, char *const *argv, const char *optstring, _getopt_internal (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind, int long_only) const struct option *longopts, int *longind,
int long_only, int posixly_correct)
{ {
int result; int result;
getopt_data.optind = optind; getopt_data.optind = optind;
getopt_data.opterr = opterr; getopt_data.opterr = opterr;
result = _getopt_internal_r (argc, argv, optstring, longopts, result = _getopt_internal_r (argc, argv, optstring, longopts, longind,
longind, long_only, &getopt_data); long_only, posixly_correct, &getopt_data);
optind = getopt_data.optind; optind = getopt_data.optind;
optarg = getopt_data.optarg; optarg = getopt_data.optarg;
@@ -1172,16 +1154,21 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
return result; return result;
} }
/* glibc gets a LSB-compliant getopt.
Standalone applications get a POSIX-compliant getopt. */
#if _LIBC
enum { POSIXLY_CORRECT = 0 };
#else
enum { POSIXLY_CORRECT = 1 };
#endif
int int
getopt (int argc, char *const *argv, const char *optstring) getopt (int argc, char *const *argv, const char *optstring)
{ {
return _getopt_internal (argc, argv, optstring, return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0,
(const struct option *) 0, POSIXLY_CORRECT);
(int *) 0,
0);
} }
#endif /* Not ELIDE_CODE. */
#ifdef TEST #ifdef TEST
+61 -10
View File
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GETOPT_H #ifndef _GETOPT_H
@@ -23,6 +23,64 @@
# define _GETOPT_H 1 # define _GETOPT_H 1
#endif #endif
/* Standalone applications should #define __GETOPT_PREFIX to an
identifier that prefixes the external functions and variables
defined in this header. When this happens, include the
headers that might declare getopt so that they will not cause
confusion if included after this file. Then systematically rename
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# include <stdlib.h>
# include <stdio.h>
# if HAVE_UNISTD_H
# include <unistd.h>
# endif
# undef __need_getopt
# undef getopt
# undef getopt_long
# undef getopt_long_only
# undef optarg
# undef opterr
# undef optind
# undef optopt
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
# define getopt __GETOPT_ID (getopt)
# define getopt_long __GETOPT_ID (getopt_long)
# define getopt_long_only __GETOPT_ID (getopt_long_only)
# define optarg __GETOPT_ID (optarg)
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
#endif
/* Standalone applications get correct prototypes for getopt_long and
getopt_long_only; they declare "char **argv". libc uses prototypes
with "char *const *argv" that are incorrect because getopt_long and
getopt_long_only can permute argv; this is required for backward
compatibility (e.g., for LSB 2.0.1).
This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
but it caused redefinition warnings if both unistd.h and getopt.h were
included, since unistd.h includes getopt.h having previously defined
__need_getopt.
The only place where __getopt_argv_const is used is in definitions
of getopt_long and getopt_long_only below, but these are visible
only if __need_getopt is not defined, so it is quite safe to rewrite
the conditional as follows:
*/
#if !defined __need_getopt
# if defined __GETOPT_PREFIX
# define __getopt_argv_const /* empty */
# else
# define __getopt_argv_const const
# endif
#endif
/* If __GNU_LIBRARY__ is not already defined, either we are being used /* If __GNU_LIBRARY__ is not already defined, either we are being used
standalone, or this is the first header included in the source file. standalone, or this is the first header included in the source file.
If we are being used with glibc, we need to include <features.h>, but If we are being used with glibc, we need to include <features.h>, but
@@ -144,22 +202,15 @@ struct option
arguments to the option '\0'. This behavior is specific to the GNU arguments to the option '\0'. This behavior is specific to the GNU
`getopt'. */ `getopt'. */
#ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW; __THROW;
#else /* not __GNU_LIBRARY__ */
extern int getopt ();
#endif /* __GNU_LIBRARY__ */
#ifndef __need_getopt #ifndef __need_getopt
extern int getopt_long (int ___argc, char *const *___argv, extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts, const char *__shortopts,
const struct option *__longopts, int *__longind) const struct option *__longopts, int *__longind)
__THROW; __THROW;
extern int getopt_long_only (int ___argc, char *const *___argv, extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts, const char *__shortopts,
const struct option *__longopts, int *__longind) const struct option *__longopts, int *__longind)
__THROW; __THROW;
+12 -29
View File
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@@ -30,25 +30,6 @@
#include <stdio.h> #include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
#include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE
#endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include /* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */ to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__ #ifdef __GNU_LIBRARY__
@@ -60,19 +41,20 @@
#endif #endif
int int
getopt_long (int argc, char *const *argv, const char *options, getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
const struct option *long_options, int *opt_index) const struct option *long_options, int *opt_index)
{ {
return _getopt_internal (argc, argv, options, long_options, opt_index, 0); return _getopt_internal (argc, (char **) argv, options, long_options,
opt_index, 0, 0);
} }
int int
_getopt_long_r (int argc, char *const *argv, const char *options, _getopt_long_r (int argc, char **argv, const char *options,
const struct option *long_options, int *opt_index, const struct option *long_options, int *opt_index,
struct _getopt_data *d) struct _getopt_data *d)
{ {
return _getopt_internal_r (argc, argv, options, long_options, opt_index, return _getopt_internal_r (argc, argv, options, long_options, opt_index,
0, d); 0, 0, d);
} }
/* Like getopt_long, but '-' as well as '--' can indicate a long option. /* Like getopt_long, but '-' as well as '--' can indicate a long option.
@@ -81,22 +63,23 @@ _getopt_long_r (int argc, char *const *argv, const char *options,
instead. */ instead. */
int int
getopt_long_only (int argc, char *const *argv, const char *options, getopt_long_only (int argc, char *__getopt_argv_const *argv,
const char *options,
const struct option *long_options, int *opt_index) const struct option *long_options, int *opt_index)
{ {
return _getopt_internal (argc, argv, options, long_options, opt_index, 1); return _getopt_internal (argc, (char **) argv, options, long_options,
opt_index, 1, 0);
} }
int int
_getopt_long_only_r (int argc, char *const *argv, const char *options, _getopt_long_only_r (int argc, char **argv, const char *options,
const struct option *long_options, int *opt_index, const struct option *long_options, int *opt_index,
struct _getopt_data *d) struct _getopt_data *d)
{ {
return _getopt_internal_r (argc, argv, options, long_options, opt_index, return _getopt_internal_r (argc, argv, options, long_options, opt_index,
1, d); 1, 0, d);
} }
#endif /* Not ELIDE_CODE. */
#ifdef TEST #ifdef TEST
+11 -9
View File
@@ -15,15 +15,15 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GETOPT_INT_H #ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1 #define _GETOPT_INT_H 1
extern int _getopt_internal (int ___argc, char *const *___argv, extern int _getopt_internal (int ___argc, char **___argv,
const char *__shortopts, const char *__shortopts,
const struct option *__longopts, int *__longind, const struct option *__longopts, int *__longind,
int __long_only); int __long_only, int __posixly_correct);
/* Reentrant versions which can handle parsing multiple argument /* Reentrant versions which can handle parsing multiple argument
@@ -64,7 +64,7 @@ struct _getopt_data
This is what Unix does. This is what Unix does.
This mode of operation is selected by either setting the environment This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character variable POSIXLY_CORRECT, or using `+' as the first character
of the list of option characters. of the list of option characters, or by calling getopt.
PERMUTE is the default. We permute the contents of ARGV as we PERMUTE is the default. We permute the contents of ARGV as we
scan, so that eventually all the non-options are at the end. scan, so that eventually all the non-options are at the end.
@@ -87,7 +87,8 @@ struct _getopt_data
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} __ordering; } __ordering;
/* If the POSIXLY_CORRECT environment variable is set. */ /* If the POSIXLY_CORRECT environment variable is set
or getopt was called. */
int __posixly_correct; int __posixly_correct;
@@ -110,17 +111,18 @@ struct _getopt_data
default values and to clear the initialization flag. */ default values and to clear the initialization flag. */
#define _GETOPT_DATA_INITIALIZER { 1, 1 } #define _GETOPT_DATA_INITIALIZER { 1, 1 }
extern int _getopt_internal_r (int ___argc, char *const *___argv, extern int _getopt_internal_r (int ___argc, char **___argv,
const char *__shortopts, const char *__shortopts,
const struct option *__longopts, int *__longind, const struct option *__longopts, int *__longind,
int __long_only, struct _getopt_data *__data); int __long_only, int __posixly_correct,
struct _getopt_data *__data);
extern int _getopt_long_r (int ___argc, char *const *___argv, extern int _getopt_long_r (int ___argc, char **___argv,
const char *__shortopts, const char *__shortopts,
const struct option *__longopts, int *__longind, const struct option *__longopts, int *__longind,
struct _getopt_data *__data); struct _getopt_data *__data);
extern int _getopt_long_only_r (int ___argc, char *const *___argv, extern int _getopt_long_only_r (int ___argc, char **___argv,
const char *__shortopts, const char *__shortopts,
const struct option *__longopts, const struct option *__longopts,
int *__longind, int *__longind,
+12 -2
View File
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>. /* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _LIBGETTEXT_H #ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1 #define _LIBGETTEXT_H 1
@@ -36,6 +36,16 @@
# include <locale.h> # include <locale.h>
#endif #endif
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include <cstdlib>
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
# include <libintl.h>
# endif
#endif
/* Disabled NLS. /* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions. for invalid uses of the value returned from these functions.
+19 -15
View File
@@ -1,10 +1,10 @@
# This file is generated automatically by "bootstrap". # This file is generated automatically by "bootstrap".
BUILT_SOURCES += $(ALLOCA_H) BUILT_SOURCES += $(ALLOCA_H)
EXTRA_DIST += alloca_.h EXTRA_DIST += alloca_.h
# We need the following in order to create an <alloca.h> when the system # We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler. # doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(ALLOCA_H)
alloca.h: alloca_.h alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@-t cp $(srcdir)/alloca_.h $@-t
mv $@-t $@ mv $@-t $@
@@ -12,50 +12,54 @@ MOSTLYCLEANFILES += alloca.h alloca.h-t
lib_SOURCES += argmatch.h argmatch.c lib_SOURCES += argmatch.h argmatch.c
lib_SOURCES += dirname.h dirname.c basename.c stripslash.c lib_SOURCES += basename.c stripslash.c
lib_SOURCES += exit.h lib_SOURCES += exit.h
lib_SOURCES += exitfail.h exitfail.c
lib_SOURCES += getopt.h getopt.c getopt1.c getopt_int.h BUILT_SOURCES += $(GETOPT_H)
EXTRA_DIST += getopt_.h getopt_int.h
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt_.h
cp $(srcdir)/getopt_.h $@-t
mv $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t
lib_SOURCES += gettext.h lib_SOURCES += gettext.h
lib_SOURCES += hard-locale.h hard-locale.c
lib_SOURCES += hash.h hash.c
lib_SOURCES += mbswidth.h mbswidth.c lib_SOURCES += mbswidth.h mbswidth.c
lib_SOURCES += quote.h quote.c
lib_SOURCES += quotearg.h quotearg.c
BUILT_SOURCES += $(STDBOOL_H) BUILT_SOURCES += $(STDBOOL_H)
EXTRA_DIST += stdbool_.h EXTRA_DIST += stdbool_.h
# We need the following in order to create an <stdbool.h> when the system # We need the following in order to create <stdbool.h> when the system
# doesn't have one that works. # doesn't have one that works.
all-local $(lib_OBJECTS): $(STDBOOL_H)
stdbool.h: stdbool_.h stdbool.h: stdbool_.h
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
mv $@-t $@ mv $@-t $@
MOSTLYCLEANFILES += stdbool.h stdbool.h-t MOSTLYCLEANFILES += stdbool.h stdbool.h-t
lib_SOURCES += stpcpy.h lib_SOURCES += stpcpy.h
lib_SOURCES += strndup.h
lib_SOURCES += unlocked-io.h
lib_SOURCES += xalloc.h xmalloc.c xstrdup.c
lib_SOURCES += xalloc-die.c
lib_SOURCES += xstrndup.h xstrndup.c lib_SOURCES += xstrndup.h xstrndup.c
+25 -24
View File
@@ -1,6 +1,7 @@
/* hard-locale.c -- Determine whether a locale is hard. /* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -14,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
# include <config.h> # include <config.h>
@@ -22,36 +23,38 @@
#include "hard-locale.h" #include "hard-locale.h"
#if HAVE_LOCALE_H #include <locale.h>
# include <locale.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
/* Return nonzero if the current CATEGORY locale is hard, i.e. if you #include "strdup.h"
#ifdef __GLIBC__
# define GLIBC_VERSION __GLIBC__
#else
# define GLIBC_VERSION 0
#endif
/* Return true if the current CATEGORY locale is hard, i.e. if you
can't get away with assuming traditional C or POSIX behavior. */ can't get away with assuming traditional C or POSIX behavior. */
int bool
hard_locale (int category) hard_locale (int category)
{ {
#if ! HAVE_SETLOCALE bool hard = true;
return 0; char const *p = setlocale (category, NULL);
#else
int hard = 1;
char const *p = setlocale (category, 0);
if (p) if (p)
{ {
# if defined __GLIBC__ && 2 <= __GLIBC__ if (2 <= GLIBC_VERSION)
{
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
hard = 0; hard = false;
# else }
char *locale = malloc (strlen (p) + 1); else
{
char *locale = strdup (p);
if (locale) if (locale)
{ {
strcpy (locale, p);
/* Temporarily set the locale to the "C" and "POSIX" locales /* Temporarily set the locale to the "C" and "POSIX" locales
to find their names, so that we can determine whether one to find their names, so that we can determine whether one
or the other is the caller's locale. */ or the other is the caller's locale. */
@@ -59,16 +62,14 @@ hard_locale (int category)
&& strcmp (p, locale) == 0) && strcmp (p, locale) == 0)
|| ((p = setlocale (category, "POSIX")) || ((p = setlocale (category, "POSIX"))
&& strcmp (p, locale) == 0)) && strcmp (p, locale) == 0))
hard = 0; hard = false;
/* Restore the caller's locale. */ /* Restore the caller's locale. */
setlocale (category, locale); setlocale (category, locale);
free (locale); free (locale);
} }
# endif }
} }
return hard; return hard;
#endif
} }
+5 -3
View File
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard. /* Determine whether a locale is hard.
Copyright (C) 1999, 2003 Free Software Foundation, Inc. Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -14,11 +14,13 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef HARD_LOCALE_H_ #ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1 # define HARD_LOCALE_H_ 1
int hard_locale (int); # include <stdbool.h>
bool hard_locale (int);
#endif /* HARD_LOCALE_H_ */ #endif /* HARD_LOCALE_H_ */
+9 -7
View File
@@ -1,7 +1,7 @@
/* hash - hashing table processing. /* hash - hashing table processing.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
Foundation, Inc. Software Foundation, Inc.
Written by Jim Meyering, 1992. Written by Jim Meyering, 1992.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* A generic hash table package. */ /* A generic hash table package. */
@@ -400,9 +400,10 @@ hash_string (const char *string, size_t n_buckets)
((Byte) + ROTATE_LEFT (Value, 7)) ((Byte) + ROTATE_LEFT (Value, 7))
size_t value = 0; size_t value = 0;
unsigned char ch;
for (; *string; string++) for (; (ch = *string); string++)
value = HASH_ONE_CHAR (value, (unsigned char) *string); value = HASH_ONE_CHAR (value, ch);
return value % n_buckets; return value % n_buckets;
# undef ROTATE_LEFT # undef ROTATE_LEFT
@@ -420,9 +421,10 @@ size_t
hash_string (const char *string, size_t n_buckets) hash_string (const char *string, size_t n_buckets)
{ {
size_t value = 0; size_t value = 0;
unsigned char ch;
while (*string) for (; (ch = *string); string++)
value = (value * 31 + (unsigned char) *string++) % n_buckets; value = (value * 31 + ch) % n_buckets;
return value; return value;
} }
+1 -1
View File
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* A generic hash table package. */ /* A generic hash table package. */
+1 -1
View File
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
+1 -1
View File
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _LBITSET_H #ifndef _LBITSET_H
#define _LBITSET_H #define _LBITSET_H
+1 -1
View File
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Bison depends on libiberty's implementation of bitsets, which /* Bison depends on libiberty's implementation of bitsets, which
+2 -2
View File
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. */ Boston, MA 02110-1301, USA. */
#include <config.h> #include <config.h>
+2 -2
View File
@@ -1,4 +1,4 @@
/* Work around bug on some systems where malloc (0) fails. /* malloc() function that is glibc compatible.
Copyright (C) 1997, 1998 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* written by Jim Meyering */ /* written by Jim Meyering */
+6 -4
View File
@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a string. /* Determine the number of screen columns needed for a string.
Copyright (C) 2000-2004 Free Software Foundation, Inc. Copyright (C) 2000-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Bruno Haible <[email protected]>. */ /* Written by Bruno Haible <[email protected]>. */
@@ -91,7 +91,8 @@ int wcwidth ();
character string pointed to by STRING. If a non-printable character character string pointed to by STRING. If a non-printable character
occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned. occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned.
With flags = MBSW_REJECT_INVALID | MBSW_REJECT_UNPRINTABLE, this is With flags = MBSW_REJECT_INVALID | MBSW_REJECT_UNPRINTABLE, this is
the multibyte analogon of the wcswidth function. */ the multibyte analogue of the wcswidth function.
If STRING is not of length < INT_MAX / 2, integer overflow can occur. */
int int
mbswidth (const char *string, int flags) mbswidth (const char *string, int flags)
{ {
@@ -101,7 +102,8 @@ mbswidth (const char *string, int flags)
/* Returns the number of columns needed to represent the multibyte /* Returns the number of columns needed to represent the multibyte
character string pointed to by STRING of length NBYTES. If a character string pointed to by STRING of length NBYTES. If a
non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is
specified, -1 is returned. */ specified, -1 is returned.
If NBYTES is not < INT_MAX / 2, integer overflow can occur. */
int int
mbsnwidth (const char *string, size_t nbytes, int flags) mbsnwidth (const char *string, size_t nbytes, int flags)
{ {
+11 -1
View File
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stddef.h> #include <stddef.h>
@@ -30,6 +30,11 @@
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
/* Optional flags to influence mbswidth/mbsnwidth behavior. */ /* Optional flags to influence mbswidth/mbsnwidth behavior. */
/* If this bit is set, return -1 upon finding an invalid or incomplete /* If this bit is set, return -1 upon finding an invalid or incomplete
@@ -49,3 +54,8 @@ extern int mbswidth (const char *string, int flags);
/* Returns the number of screen columns needed for the NBYTES bytes /* Returns the number of screen columns needed for the NBYTES bytes
starting at BUF. */ starting at BUF. */
extern int mbsnwidth (const char *buf, size_t nbytes, int flags); extern int mbsnwidth (const char *buf, size_t nbytes, int flags);
#ifdef __cplusplus
}
#endif
+29 -8
View File
@@ -1,7 +1,7 @@
/* obstack.c - subroutines used implicitly by object stack macros /* obstack.c - subroutines used implicitly by object stack macros
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
Inc. Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
@@ -24,6 +24,7 @@
#ifdef _LIBC #ifdef _LIBC
# include <obstack.h> # include <obstack.h>
# include <shlib-compat.h>
#else #else
# include "obstack.h" # include "obstack.h"
#endif #endif
@@ -59,19 +60,31 @@
#ifndef ELIDE_CODE #ifndef ELIDE_CODE
# if HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# if HAVE_STDINT_H || defined _LIBC
# include <stdint.h>
# endif
/* Determine default alignment. */ /* Determine default alignment. */
union fooround union fooround
{ {
long int i; uintmax_t i;
long double d; long double d;
void *p; void *p;
}; };
struct fooalign
{
char c;
union fooround u;
};
/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT. /* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
But in fact it might be less smart and round addresses to as much as But in fact it might be less smart and round addresses to as much as
DEFAULT_ROUNDING. So we prepare for it to do that. */ DEFAULT_ROUNDING. So we prepare for it to do that. */
enum enum
{ {
DEFAULT_ALIGNMENT = offsetof (struct { char c; union fooround u; }, u), DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
DEFAULT_ROUNDING = sizeof (union fooround) DEFAULT_ROUNDING = sizeof (union fooround)
}; };
@@ -103,10 +116,13 @@ int obstack_exit_failure = EXIT_FAILURE;
# endif # endif
# ifdef _LIBC # ifdef _LIBC
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
/* A looong time ago (before 1994, anyway; we're not sure) this global variable /* A looong time ago (before 1994, anyway; we're not sure) this global variable
was used by non-GNU-C macros to avoid multiple evaluation. The GNU C was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
library still exports it because somebody might use it. */ library still exports it because somebody might use it. */
struct obstack *_obstack; struct obstack *_obstack_compat;
compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
# endif
# endif # endif
/* Define a macro that either calls functions with the traditional malloc/free /* Define a macro that either calls functions with the traditional malloc/free
@@ -173,7 +189,8 @@ _obstack_begin (struct obstack *h,
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk) if (!chunk)
(*obstack_alloc_failed_handler) (); (*obstack_alloc_failed_handler) ();
h->next_free = h->object_base = chunk->contents; h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
alignment - 1);
h->chunk_limit = chunk->limit h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size; = (char *) chunk + h->chunk_size;
chunk->prev = 0; chunk->prev = 0;
@@ -220,7 +237,8 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment,
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk) if (!chunk)
(*obstack_alloc_failed_handler) (); (*obstack_alloc_failed_handler) ();
h->next_free = h->object_base = chunk->contents; h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
alignment - 1);
h->chunk_limit = chunk->limit h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size; = (char *) chunk + h->chunk_size;
chunk->prev = 0; chunk->prev = 0;
@@ -287,7 +305,10 @@ _obstack_newchunk (struct obstack *h, int length)
/* If the object just copied was the only data in OLD_CHUNK, /* If the object just copied was the only data in OLD_CHUNK,
free that chunk and remove it from the chain. free that chunk and remove it from the chain.
But not if that chunk might contain an empty object. */ But not if that chunk might contain an empty object. */
if (h->object_base == old_chunk->contents && ! h->maybe_empty_object) if (! h->maybe_empty_object
&& (h->object_base
== __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
h->alignment_mask)))
{ {
new_chunk->prev = old_chunk->prev; new_chunk->prev = old_chunk->prev;
CALL_FREEFUN (h, old_chunk); CALL_FREEFUN (h, old_chunk);
+10 -4
View File
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Summary: /* Summary:
@@ -206,7 +206,7 @@ extern int obstack_exit_failure;
Note that this might not be the final address of the object Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */ because a new chunk might be needed to hold the final size. */
#define obstack_base(h) ((h)->object_base) #define obstack_base(h) ((void *) (h)->object_base)
/* Size for allocating ordinary chunks. */ /* Size for allocating ordinary chunks. */
@@ -287,7 +287,10 @@ __extension__ \
# define obstack_empty_p(OBSTACK) \ # define obstack_empty_p(OBSTACK) \
__extension__ \ __extension__ \
({ struct obstack const *__o = (OBSTACK); \ ({ struct obstack const *__o = (OBSTACK); \
(__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) (__o->chunk->prev == 0 \
&& __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
__o->chunk->contents, \
__o->alignment_mask)); })
# define obstack_grow(OBSTACK,where,length) \ # define obstack_grow(OBSTACK,where,length) \
__extension__ \ __extension__ \
@@ -411,7 +414,10 @@ __extension__ \
(unsigned) ((h)->chunk_limit - (h)->next_free) (unsigned) ((h)->chunk_limit - (h)->next_free)
# define obstack_empty_p(h) \ # define obstack_empty_p(h) \
((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) ((h)->chunk->prev == 0 \
&& (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
(h)->chunk->contents, \
(h)->alignment_mask))
/* Note that the call to _obstack_newchunk is enclosed in (..., 0) /* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions so that we can avoid having void expressions

Some files were not shown because too many files have changed in this diff Show More