1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

Allow several `SNARF_INIT ()' per CPP output line.

* libguile/guile-snarf.in (modern_snarf): Allow several `SNARF_INIT ()'
  per line.  This makes it possible to write snarffing macros that
  contain several `SNARF_INIT ()' invocations.
This commit is contained in:
Ludovic Courtès 2009-01-31 21:06:40 +01:00
parent b68095f091
commit 6eca5d2b9b

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Extract the initialization actions from source files. # Extract the initialization actions from source files.
# #
# Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc. # Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004, 2006, 2008, 2009 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
@ -51,7 +51,7 @@ modern_snarf () # writes stdout
## empty file. ## empty file.
echo "/* cpp arguments: $@ */" ; echo "/* cpp arguments: $@ */" ;
${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && cpp_ok_p=true ${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && cpp_ok_p=true
grep "^ *\^ *\^" ${temp} | sed -e "s/^ *\^ *\^//" -e "s/\^\ *:\ *\^.*/;/" grep "^ *\^ *\^" ${temp} | sed -e "s/ *\^ *\^//g" -e "s/\^ *: *\^/;/g"
} }
## main ## main