guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, ttn/misc-maint, updated. release_1-9-1


From: Thien-Thi Nguyen
Subject: [Guile-commits] GNU Guile branch, ttn/misc-maint, updated. release_1-9-11-74-g73c2099
Date: Tue, 15 Jun 2010 20:37:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=73c20998430b4179b18193ad9404b8e4dbf0e9ec

The branch, ttn/misc-maint has been updated
       via  73c20998430b4179b18193ad9404b8e4dbf0e9ec (commit)
      from  edb3cfc37de8c216e3b1c06970ef39e3638560be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 73c20998430b4179b18193ad9404b8e4dbf0e9ec
Author: Thien-Thi Nguyen <address@hidden>
Date:   Tue Jun 15 22:34:27 2010 +0200

    [build] Overhaul <errno.h>, <signal.h> cpp symbol extraction/checking.
    
    * libguile/Makefile.am (BUILT_SOURCES): Delete cpp_err_symbols.c,
      cpp_sig_symbols.c; add cpp-E.c, cpp-SIG.c.
      (EXTRA_DIST): Delete cpp_signal.c, cpp_errno.c, cpp_err_symbols.in,
      cpp_err_symbols.c, cpp_sig_symbols.c, cpp_sig_symbols.in, cpp_cnvt.awk;
      add cpp-E.syms, cpp-E.c, cpp-SIG.syms, cpp-SIG.c.
      (error.x, posix.x): Update prereq list.
      (cpp_err_symbols.c, cpp_sig_symbols.c): Delete targets.
      (check_signals, check_errnos): Likewise.
      (.syms.c): New pattern rule.
      (chknew-E, chknew-SIG): New targets.
      (MOSTLYCLEANFILES): Delete cpp_err_symbols_here, cpp_err_symbols_diff,
      cpp_err_symbols_new, cpp_sig_symbols_here, cpp_sig_symbols_diff,
      cpp_sig_symbols_new.
    * libguile/cpp-E.syms: Rename from libguile/cpp_err_symbols.in.
    * libguile/cpp-SIG.syms: Rename from libguile/cpp_sig_symbols.in.
    * libguile/error.c (scm_init_error): #include "libguile/cpp-E.c".
    * libguile/posix.c (scm_init_posix): #include "libguile/cpp-SIG.c".
    * libguile/cpp_cnvt.awk: Delete file.
    * libguile/cpp_errno.c: Delete file.
    * libguile/cpp_signal.c: Delete file.

-----------------------------------------------------------------------

Summary of changes:
 libguile/Makefile.am                          |   82 ++++++++++--------------
 libguile/{cpp_err_symbols.in => cpp-E.syms}   |    0
 libguile/{cpp_sig_symbols.in => cpp-SIG.syms} |    0
 libguile/cpp_cnvt.awk                         |    7 --
 libguile/cpp_errno.c                          |    9 ---
 libguile/cpp_signal.c                         |    9 ---
 libguile/error.c                              |    2 +-
 libguile/posix.c                              |    2 +-
 8 files changed, 36 insertions(+), 75 deletions(-)
 rename libguile/{cpp_err_symbols.in => cpp-E.syms} (100%)
 rename libguile/{cpp_sig_symbols.in => cpp-SIG.syms} (100%)
 delete mode 100644 libguile/cpp_cnvt.awk
 delete mode 100644 libguile/cpp_errno.c
 delete mode 100644 libguile/cpp_signal.c

diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 90d8b61..261eb47 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -408,7 +408,7 @@ DOT_I_FILES = vm-i-system.i vm-i-scheme.i vm-i-loader.i
 .c.i:
        $(GREP) '^VM_DEFINE' $< > $@
 
-BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h \
+BUILT_SOURCES = cpp-E.c cpp-SIG.c libpath.h \
     version.h scmconfig.h \
     $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
 
@@ -589,9 +589,8 @@ bin_SCRIPTS = guile-snarf
 noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check
 
 EXTRA_DIST = ChangeLog-scm ChangeLog-threads           \
-    ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c     \
-    cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c                   \
-    cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk                  \
+    ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008  \
+    cpp-E.syms cpp-E.c cpp-SIG.syms cpp-SIG.c                  \
     c-tokenize.lex version.h.in                                                
\
     scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map
 #    $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
@@ -666,8 +665,8 @@ $(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h 
guile-snarf.in
 
 $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES): scmconfig.h snarf.h 
guile-snarf-docs.in guile_filter_doc_snarfage$(EXEEXT)
 
-error.x: cpp_err_symbols.c
-posix.x: cpp_sig_symbols.c
+error.x: cpp-E.c
+posix.x: cpp-SIG.c
 load.x: libpath.h
 
 alldotdocfiles    = $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES)
@@ -702,50 +701,37 @@ schemelib_DATA = guile-procedures.txt
 ## Add -MG to make the .x magic work with auto-dep code.
 MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
 
-cpp_err_symbols.c: cpp_err_symbols.in cpp_cnvt.awk
-       $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \
-               cpp_err_symbols.tmp
-       mv cpp_err_symbols.tmp cpp_err_symbols.c
-
-cpp_sig_symbols.c: cpp_sig_symbols.in cpp_cnvt.awk
-       $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols.in > \
-               cpp_sig_symbols.tmp
-       mv cpp_sig_symbols.tmp cpp_sig_symbols.c
-
-## Create a new version of the cpp_sig_symbols.in file, including all SIGXXX
-## macros defined on this platform.
-check_signals:
-       gcc -undef -dM -E $(srcdir)/cpp_signal.c | $(EGREP) ' SIG[A-Z]+' \
-         | cut -f2 -d' ' | sort > cpp_sig_symbols_here
-       diff -u $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_here \
-          | $(EGREP) '^\+S' \
-         | cut -c2- > cpp_sig_symbols_diff
-       if test -s cpp_sig_symbols_diff ; then \
-         cat $(srcdir)/cpp_sig_symbols.in cpp_sig_symbols_diff \
-           | sort > cpp_sig_symbols_new ;\
-         echo "cpp_sig_symbols_new has the following additions:" ;\
-         cat cpp_sig_symbols_diff ;\
-       else echo "No new symbols found."; \
-       fi
-
-## Likewise for cpp_err_symbols.in.
-check_errnos:
-       gcc -undef -dM -E $(srcdir)/cpp_errno.c | $(EGREP) ' E.+' \
-         | cut -f2 -d' ' | sort > cpp_err_symbols_here
-       diff -u $(srcdir)/cpp_err_symbols.in cpp_err_symbols_here \
-          | $(EGREP) '^\+E' \
-         | cut -c2- > cpp_err_symbols_diff
-       if test -s cpp_err_symbols_diff ; then \
-         cat $(srcdir)/cpp_err_symbols.in cpp_err_symbols_diff \
-           | sort > cpp_err_symbols_new ;\
-         echo "cpp_err_symbols_new has the following additions:" ;\
-         cat cpp_err_symbols_diff ;\
-       else echo "No new symbols found."; \
-       fi
+# For each line in foo.syms, transform:
+#      SYMBOL
+# to:
+#      #ifdef SYMBOL
+#      scm_c_define ("SYMBOL", scm_from_int (SYMBOL));
+#      #endif
+# writing output to foo.c.
+.syms.c:
+       sed 's/.*/#ifdef &\nscm_c_define ("&", scm_from_int (&));\n#endif/' \
+         $< > address@hidden
+       mv address@hidden $@
+
+# Write $(srcdir)/cpp-{E,SIG}.syms.NEW if there are any not-yet-seen
+# ("new" to us) E* or SIG* symbols in <errno.h> or <signal.h>, respectively.
+chknew-E chknew-SIG:
+       @bit=`echo $@ | sed s/^chknew-//` ;                     \
+       old="$(srcdir)/cpp-$$bit.syms" ;                        \
+       echo "#include <$${bit}.h>"                             \
+        | sed 's/E/errno/;s/SIG/signal/'                       \
+        | gcc -undef -dM -E -                                  \
+        | sed 's/^#define //;/^'$$bit'[A-Z][A-Z]*/!d;s/ .*//'  \
+        | sort | diff -u $$old - | sed '1,2d;/^+/!d;s/^.//'    \
+        > TMP ;                                                \
+       if [ -s TMP ] ; then new="$$old.NEW" ;                  \
+         cat $$old TMP | sort > $$new ;                        \
+         echo "$$new: `sed -n '$$=' TMP` new symbol(s)." ;     \
+         sed 's/^/  /' TMP ;                                   \
+       else echo "No new symbols found." ;                     \
+       fi ; rm TMP
 
 MOSTLYCLEANFILES = \
-       cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
-       cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new \
        version.h version.h.tmp \
        scmconfig.h scmconfig.h.tmp
 
diff --git a/libguile/cpp_err_symbols.in b/libguile/cpp-E.syms
similarity index 100%
rename from libguile/cpp_err_symbols.in
rename to libguile/cpp-E.syms
diff --git a/libguile/cpp_sig_symbols.in b/libguile/cpp-SIG.syms
similarity index 100%
rename from libguile/cpp_sig_symbols.in
rename to libguile/cpp-SIG.syms
diff --git a/libguile/cpp_cnvt.awk b/libguile/cpp_cnvt.awk
deleted file mode 100644
index 1e6c094..0000000
--- a/libguile/cpp_cnvt.awk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Converts a list of symbols into C expressions which define the symbols
-# in Guile.
-{
-print "#ifdef " $0;
-print "scm_c_define (\""$0"\", scm_from_int ("$0"));";
-print "#endif"
-}
diff --git a/libguile/cpp_errno.c b/libguile/cpp_errno.c
deleted file mode 100644
index 32556a3..0000000
--- a/libguile/cpp_errno.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* this file is processed by gcc with special options to extract
-   a list of errno codes.  */
-#include <errno.h>
-
-/*
-  Local Variables:
-  c-file-style: "gnu"
-  End:
-*/
diff --git a/libguile/cpp_signal.c b/libguile/cpp_signal.c
deleted file mode 100644
index e740ba5..0000000
--- a/libguile/cpp_signal.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* this file is processed by gcc with special options to extract
-   a list of signal numbers.  */
-#include <signal.h>
-
-/*
-  Local Variables:
-  c-file-style: "gnu"
-  End:
-*/
diff --git a/libguile/error.c b/libguile/error.c
index bcbcd9c..a582c86 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -285,7 +285,7 @@ scm_misc_error (const char *subr, const char *message, SCM 
args)
 void
 scm_init_error ()
 {
-#include "libguile/cpp_err_symbols.c"
+#include "libguile/cpp-E.c"
 #include "libguile/error.x"
 }
 
diff --git a/libguile/posix.c b/libguile/posix.c
index 1fa9bb9..17a7eb4 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -2202,7 +2202,7 @@ scm_init_posix ()
   scm_c_define ("LOCK_NB", scm_from_int (LOCK_NB));
 #endif
 
-#include "libguile/cpp_sig_symbols.c"
+#include "libguile/cpp-SIG.c"
 #include "libguile/posix.x"
 }
 


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]