*** empty log message ***
[bpt/guile.git] / HACKING
diff --git a/HACKING b/HACKING
index fda5899..3aac223 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -1,3 +1,20 @@
+Guile Hacking Guide
+Copyright (c) 1996, 1997, 1998, 1999, 2000 Free software Foundation, Inc.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last changed them,
+   and that any new or changed statements about the activities
+   of the Free Software Foundation are approved by the Foundation.
+
+
 Hacking It Yourself ==================================================
 
 As distributed, Guile needs only an ANSI C compiler and a Unix system
@@ -23,7 +40,7 @@ Automake 1.4 --- a system for automatically generating Makefiles that
        `guile.m4' from the top directory of the Guile core disty to
        `/usr/local/share/aclocal.
 
-libtool 1.3.4 --- a system for managing the zillion hairy options needed
+libtool 1.3.5 --- a system for managing the zillion hairy options needed
        on various systems to produce shared libraries.  Available in
        "ftp://ftp.gnu.org/pub/gnu/libtool"
 
@@ -36,7 +53,7 @@ Contributing Your Changes ============================================
 
 - If you have put together a change that meets the coding standards
 described below, we encourage you to submit it to Guile.  The best
-place to post it is guile@sourceware.cygnus.com.  Please don't send it
+place to post it is guile-devel@gnu.org.  Please don't send it
 directly to me; I often don't have time to look things over.  If you
 have tested your change, then you don't need to be shy.
 
@@ -53,14 +70,14 @@ we're just going to regenerate those files anyway.
 CVS conventions ======================================================
 
 - We use CVS to manage the Guile sources.  The repository lives on
-egcs.cygnus.com, in /cvs/guile; you will need an
+subversions.gnu.org, in /cvs; you will need an
 account on that machine to access the repository.  Also, for security
-reasons, egcs presently only supports CVS connections via the SSH
+reasons, subversions presently only supports CVS connections via the SSH
 protocol, so you must first install the SSH client.  Then, you should
 set your CVS_RSH environment variable to ssh, and use the following as
 your CVS root:
 
-       :ext:USER@egcs.cygnus.com:/cvs/guile
+       :ext:USER@subversions.gnu.org:/cvs
 
 Either set your CVSROOT environment variable to that, or give it as
 the value of the global -d option to CVS when you check out a working
@@ -73,7 +90,6 @@ The Guile sources live in several modules:
   - guile-core --- the interpreter, QuickThreads, and ice-9
   - guile-doc --- documentation in progress.  When complete, this will
        be incorporated into guile-core.
-  - guile-oops --- The Guile Object-Oriented Programming System (talk to mdj)
   - guile-tcltk --- the Guile/Tk interface
   - guile-tk --- the new Guile/Tk interface, based on STk's modified Tk
   - guile-rgx-ctax --- the Guile/Rx interface, and the ctax implementation
@@ -82,12 +98,23 @@ The Guile sources live in several modules:
 
 There is a mailing list for CVS commit messages; see README for details.
 
-- We check Makefile.in and configure files into CVS, as well as the
-files they are built from (Makefile.am, configure.in); we do not check
-in Makefiles or header files generated by configuration scripts.  The
-general rule is that you should be able to check out a working
-directory of Guile from CVS, and then type "configure" and "make",
-without running any other tools.
+- We check Makefile.am and configure.in files into CVS, but the
+"autogen.sh" script must be run from the top-level to generate the
+actual "configure" script that then must be run to create the various
+Makefile-s to build guile. The general rule is that you should be able
+to check out a working directory of Guile from CVS, and then type
+"./autogen.sh", then "configure", and finally "make".  No
+automatically generated files should be checked into the CVS
+repository.
+
+- The .cvsignore file is contained in the repository, to provide a
+reasonable list of auto-generated files that should not be checked in.
+This, however, prohibits one from having local additions to the
+.cvsignore file (yes, you can modify it and never check it in, but
+that doesn't seem to be a good solution to me).  To get around this
+problem, you might want to patch your cvs program so that it uses a
+.cvsignore-local file (say) instead of the one from the repository.  A
+patch for this can be found at the very end of this file.
 
 - (Automake 1.4 only) Be sure to run automake at the top of the tree
 with no arguments.  Do not use `automake Makefile' to regenerate
@@ -110,6 +137,9 @@ CVS log entries from that.
 
 Coding standards =====================================================
 
+- Before contributing larger amounts of code to Guile, please read the
+documents in `guile-core/devel/policy' in the CVS source tree.
+
 - As for any part of Project GNU, changes to Guile should follow the
 GNU coding standards.  The standards are available via anonymous FTP
 from prep.ai.mit.edu, as /pub/gnu/standards/standards.texi and
@@ -117,12 +147,8 @@ make-stds.texi.
 
 - The Guile tree should compile without warnings under the following
 GCC switches, which are the default in the current configure script:
+
     -O2 -Wall -Wpointer-arith -Wmissing-prototypes
-The only warnings which can be tolerated are those about variables
-being clobbered by longjmp/vfork in eval.c.  The variables in question
-are critical to the interpreter's performance; as far as I can tell,
-it is difficult/annoying to avoid these warnings without slowing the
-system down substantially.  (If you can figure out a good fix, I'd be happy to see it.)
 
 Note that the warnings generated vary from one version of GCC to the
 next, and from one architecture to the next (apparently).  To provide
@@ -146,6 +172,32 @@ function properly on systems where they are missing.  This usually
 entails adding a test to configure.in, and then adding #ifdefs to your
 code to disable it if the system's features are missing.
 
+- The normal way of removing a function, macro or variable is to mark
+it as "deprecated", keep it for a while, and remove it in a later
+release.  If a function or macro is marked as "deprecated" it
+indicates that people shouldn't use it in new programs, and should try
+to remove it in old.  Make sure that an alternative exists unless it
+is our purpose to remove functionality.  Don't deprecate definitions
+if it is unclear when they will be removed.  (This is to ensure that a
+valid way of implementing some functionality always exists.)
+
+When deprecating a definition, always follow this procedure:
+
+1. Mark the definition using
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+...
+#endif
+
+2. Write a comment at the definition explaining how a programmer
+can manage without the deprecated definition.
+
+3. Add an entry that the definition has been deprecated in NEWS
+
+4. At the top of RELEASE, there is a list of releases with reminders
+about what to do at each release.  Add a reminder about the removal of
+the deprecated defintion at the appropriate release.
+
 - When you make a user-visible change (i.e. one that should be
 documented, and appear in NEWS, put an asterisk in column zero of the
 start of the ChangeLog entry, like so:
@@ -171,7 +223,7 @@ can never tell which name the entry will refer to.  Instead, write this:
 
 Changes like adding this line are special:
 
-    SCM_PROC (s_serial_map, "serial-map", 2, 0, 1, scm_map);
+    SCM_PROC (s_map_in_order, "map-in-order", 2, 0, 1, scm_map);
 
 Since the change here is about the name itself --- we're adding a new
 alias for scm_map that guarantees the order in which we process list
@@ -234,4 +286,99 @@ functions, feel free to use ANSI declarations, and please provide
 prototypes for everything.  You don't need to use SCM_P in new code.
 
 
-Jim Blandy
+Jim Blandy, and others
+
+
+Patches ===========================================================
+
+This one makes cvs-1.10 consider the file $CVSDOTIGNORE instead of
+.cvsignore when that environment variable is set.
+
+=== patch start ===
+diff -r -u cvs-1.10/src/cvs.h cvs-1.10.ignore-hack/src/cvs.h
+--- cvs-1.10/src/cvs.h Mon Jul 27 04:54:11 1998
++++ cvs-1.10.ignore-hack/src/cvs.h     Sun Jan 23 12:58:09 2000
+@@ -516,7 +516,7 @@
+ extern int ign_name PROTO ((char *name));
+ void ign_add PROTO((char *ign, int hold));
+-void ign_add_file PROTO((char *file, int hold));
++int ign_add_file PROTO((char *file, int hold));
+ void ign_setup PROTO((void));
+ void ign_dir_add PROTO((char *name));
+ int ignore_directory PROTO((char *name));
+diff -r -u cvs-1.10/src/ignore.c cvs-1.10.ignore-hack/src/ignore.c
+--- cvs-1.10/src/ignore.c      Mon Sep  8 01:04:15 1997
++++ cvs-1.10.ignore-hack/src/ignore.c  Sun Jan 23 12:57:50 2000
+@@ -99,9 +99,9 @@
+ /*
+  * Open a file and read lines, feeding each line to a line parser. Arrange
+  * for keeping a temporary list of wildcards at the end, if the "hold"
+- * argument is set.
++ * argument is set.  Return true when the file exists and has been handled.
+  */
+-void
++int
+ ign_add_file (file, hold)
+     char *file;
+     int hold;
+@@ -149,8 +149,8 @@
+     if (fp == NULL)
+     {
+       if (! existence_error (errno))
+-          error (0, errno, "cannot open %s", file);
+-      return;
++        error (0, errno, "cannot open %s", file);
++      return 0;
+     }
+     while (getline (&line, &line_allocated, fp) >= 0)
+       ign_add (line, hold);
+@@ -159,6 +159,7 @@
+     if (fclose (fp) < 0)
+       error (0, errno, "cannot close %s", file);
+     free (line);
++    return 1;
+ }
+ /* Parse a line of space-separated wildcards and add them to the list. */
+@@ -375,6 +376,7 @@
+     struct stat sb;
+     char *file;
+     char *xdir;
++    char *cvsdotignore;
+     /* Set SUBDIRS if we have subdirectory information in ENTRIES.  */
+     if (entries == NULL)
+@@ -397,7 +399,10 @@
+     if (dirp == NULL)
+       return;
+-    ign_add_file (CVSDOTIGNORE, 1);
++    cvsdotignore = getenv("CVSDOTIGNORE");
++    if (cvsdotignore == NULL || !ign_add_file (cvsdotignore, 1))
++      ign_add_file (CVSDOTIGNORE, 1);
++
+     wrap_add_file (CVSDOTWRAPPER, 1);
+     while ((dp = readdir (dirp)) != NULL)
+=== patch end ===
+
+This one is for pcl-cvs-2.9.2, so that `i' adds to the local
+.cvsignore file.
+
+=== patch start ===
+--- pcl-cvs.el~ Mon Nov  1 12:33:46 1999
++++ pcl-cvs.el  Tue Jan 25 21:46:27 2000
+@@ -1177,7 +1177,10 @@
+   "Append the file in FILEINFO to the .cvsignore file.
+ Can only be used in the *cvs* buffer."
+   (save-window-excursion
+-    (set-buffer (find-file-noselect (expand-file-name ".cvsignore" dir)))
++    (set-buffer (find-file-noselect 
++                (expand-file-name (or (getenv "CVSDOTIGNORE")
++                                      ".cvsignore")
++                                  dir)))
+     (goto-char (point-max))
+     (unless (zerop (current-column)) (insert "\n"))
+     (insert str "\n")
+=== patch end ===