Re: conversion to git

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
Eric Blake <ebb9 <at> byu.net> writes:

> 
> Now that gnulib has converted to git[1], I'm working on doing the same for M4.
> 
> The initial git conversion is complete.  Feel free to check it out:
> 
> http://git.savannah.gnu.org/gitweb/?p=m4.git

I'm checking in this followup, to both CVS and git, for the branch, and a 
variant of it to the head, to add the .gitignore files necessary for clean 'git 
status' on a checkout.  I left mention of the .gitignore files out of 
ChangeLog, since the .cvsignore files have been treated likewise (neither of 
those files show up in a distribution tarball, whereas ChangeLog tends to track 
releasable changes).

From: Eric Blake <[email protected]>
Date: Mon, 24 Sep 2007 10:59:29 -0600
Subject: [PATCH] Create .gitignore alongside .cvsignore.

* bootstrap (LC_ALL): Set up front.
(version control) Borrow idea from head, to avoid churn in
m4/.*ignore files modified by gnulib-tool.
---
 .gitignore          |   33 ++++++++++++++++++
 ChangeLog           |    7 ++++
 bootstrap           |   50 ++++++++++++++++++++++------
 checks/.gitignore   |    3 ++
 doc/.gitignore      |   15 ++++++++
 examples/.gitignore |    2 +
 m4/.cvsignore       |   91 ---------------------------------------------------
 src/.gitignore      |    4 ++
 8 files changed, 104 insertions(+), 101 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 checks/.gitignore
 create mode 100644 doc/.gitignore
 create mode 100644 examples/.gitignore
 delete mode 100644 m4/.cvsignore
 create mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e150cad
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,33 @@
+*~
+*.orig
+*.rej
+*.tar.bz2
+*.tar.gz
+aclocal.m4
+autom4te.cache
+config.cache
+config.guess
+config.h
+config.log
+config.status
+config.sub
+config-h.in
+configure
+configure.lineno
+COPYING
+CVS
+depcomp
+gendocs.sh
+gnupload
+INSTALL
+install-sh
+lib
+link-warning.h
+m4-*
+Makefile.in
+Makefile
+missing
+stamp-h
+stamp-h1
+stamp-h.in
+tests
diff --git a/ChangeLog b/ChangeLog
index 5fa1e35..0cea5b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-24  Eric Blake  <[email protected]>
+
+	Create .gitignore alongside .cvsignore.
+	* bootstrap (LC_ALL): Set up front.
+	(version control) Borrow idea from head, to avoid churn in
+	m4/.*ignore files modified by gnulib-tool.
+
 2007-09-13  Eric Blake  <[email protected]>
 
 	* AUTHORS: Fix typo.
diff --git a/bootstrap b/bootstrap
index b68f338..0387059 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# bootstrap (GNU M4) version 2007-07-24
+# bootstrap (GNU M4) version 2007-09-24
 # Written by Gary V. Vaughan  <[email protected]>
 
 # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@@ -28,12 +28,12 @@
 
 # You can also set the following variables to help $progname
 # locate the right tools:
-#   AUTORECONF, GNULIB_TOOL, RM, SED
+#   AUTORECONF, GNULIB_TOOL, M4, RM, SED
 
-# This script bootstraps a CVS checkout of GNU M4 by correctly
+# This script bootstraps a git or CVS checkout of GNU M4 by correctly
 # calling out to parts of the GNU Build Platform.  Currently this
 # requires GNU Autoconf 2.60, GNU Automake 1.9.6, and bleeding edge
-# CVS snapshots of GNU Gnulib.
+# git or CVS snapshots of GNU Gnulib.
 
 # Report bugs to <[email protected]>
 
@@ -42,6 +42,12 @@
 : ${RM=rm -f}
 : ${SED=sed}
 
+# Ensure file names are sorted consistently across platforms.
+LC_ALL=C
+export LC_ALL
+
+config_macro_dir=m4
+
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,g"
 
@@ -121,7 +127,7 @@ func_missing_arg ()
 func_usage ()
 {
     $SED '/^# Usage:/,/# -h/ {
-        s/^# //; s/^# *$//;
+	s/^# //; s/^# *$//;
 	s/\$progname/'$progname'/;
 	p;
     }; d' < "$progpath"
@@ -135,7 +141,7 @@ func_usage ()
 func_help ()
 {
     $SED '/^# Usage:/,/# Report bugs to/ {
-        s/^# //; s/^# *$//;
+	s/^# //; s/^# *$//;
 	s/\$progname/'$progname'/;
 	p;
      }; d' < "$progpath"
@@ -147,9 +153,9 @@ func_help ()
 func_version ()
 {
     $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //; s/^# *$//;
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
-        p;
+	s/^# //; s/^# *$//;
+	s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
+	p;
      }; d' < "$progpath"
      exit $EXIT_SUCCESS
 }
@@ -199,6 +205,30 @@ func_update ()
   fi
 }
 
+## ---------------- ##
+## Version control. ##
+## ---------------- ##
+
+# gnulib-tool updates m4/.{git,cvs}ignore and lib/.{git,cvs}ignore, and
+# keeping generated files under version control does not make sense.
+# Since lib is entirely ignored, we only need to prepopulate the m4 ignore
+# files with generated files not tracked by gnulib-tool.
+if test -f $config_macro_dir/.gitignore ; then
+  :
+else
+  func_echo "creating initial $config_macro_dir/.cvsignore"
+  cat > $config_macro_dir/.cvsignore <<\EOF
+# files created by gnulib, but that gnulib doesn't track
+*~
+.cvsignore
+.gitignore
+gnulib-comp.m4
+# gnulib-tool edits below here
+EOF
+  func_echo "creating initial $config_macro_dir/.gitignore"
+  cp $config_macro_dir/.cvsignore $config_macro_dir/.gitignore
+fi
+
 ## ---------------------------- ##
 ## Find the gnulib module tree. ##
 ## ---------------------------- ##
@@ -215,7 +245,7 @@ while test -h "$gnulibdir"; do
     # Resolve symbolic link.
     sedexpr1='s, -> ,#%%#,'
     sedexpr2='s,^.*#%%#\(.*\)$,\1,p'
-    linkval=`LC_ALL=C ls -l "$gnulibdir" | $SED "$sedexpr1" | $SED -
n "$sedexpr2"`
+    linkval=`ls -l "$gnulibdir" | $SED "$sedexpr1" | $SED -n "$sedexpr2"`
     test -n "$linkval" || break
 
     case "$linkval" in
diff --git a/checks/.gitignore b/checks/.gitignore
new file mode 100644
index 0000000..cfdeddf
--- /dev/null
+++ b/checks/.gitignore
@@ -0,0 +1,3 @@
+[0-9][0-9][0-9].*
+Makefile
+stamp-checks
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..7836b14
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,15 @@
+fdl.texi
+gendocs_template
+gpl-3.0.texi
+m4.1
+m4.??
+m4.???
+m4.html
+m4.info*
+Makefile.in
+Makefile
+manual
+mdate-sh
+stamp-vti
+texinfo.tex
+version.texi
diff --git a/examples/.gitignore b/examples/.gitignore
new file mode 100644
index 0000000..3dda729
--- /dev/null
+++ b/examples/.gitignore
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/m4/.cvsignore b/m4/.cvsignore
deleted file mode 100644
index ab2e9f1..0000000
--- a/m4/.cvsignore
+++ /dev/null
@@ -1,91 +0,0 @@
-absolute-header.m4
-alloca.m4
-allocsa.m4
-assert.m4
-cloexec.m4
-close-stream.m4
-closein.m4
-closeout.m4
-codeset.m4
-config-h.m4
-eealloc.m4
-eoverflow.m4
-error.m4
-exitfail.m4
-extensions.m4
-fatal-signal.m4
-fflush.m4
-float_h.m4
-fpending.m4
-fpieee.m4
-fpurge.m4
-freading.m4
-free.m4
-frexp.m4
-frexpl.m4
-fseeko.m4
-ftello.m4
-getopt.m4
-gettimeofday.m4
-gl_list.m4
-glibc21.m4
-gnulib-common.m4
-gnulib-comp.m4
-gnulib-tool.m4
-include_next.m4
-inline.m4
-intmax_t.m4
-inttypes_h.m4
-isnan.m4
-isnanf.m4
-isnanl.m4
-ldexpl.m4
-localcharset.m4
-longdouble.m4
-longlong.m4
-lseek.m4
-malloca.m4
-math_h.m4
-mbrtowc.m4
-mbstate_t.m4
-mkdtemp.m4
-mkstemp.m4
-pathmax.m4
-printf-frexp.m4
-printf-frexpl.m4
-printf.m4
-quotearg.m4
-regex.m4
-sig_atomic_t.m4
-signal_h.m4
-signalblocking.m4
-signbit.m4
-size_max.m4
-ssize_t.m4
-stdarg.m4
-stdbool.m4
-stdint.m4
-stdint_h.m4
-stdio-safer.m4
-stdio_h.m4
-stdlib-safer.m4
-stdlib_h.m4
-strtol.m4
-sys_stat_h.m4
-sys_time_h.m4
-tempname.m4
-tmpdir.m4
-ulonglong.m4
-unistd-safer.m4
-unistd_h.m4
-unlocked-io.m4
-vasnprintf.m4
-vasprintf-posix.m4
-vasprintf.m4
-wchar.m4
-wchar_t.m4
-wctype.m4
-wint_t.m4
-xalloc.m4
-xsize.m4
-xvasprintf.m4
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..900782f
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,4 @@
+.deps
+*.o
+Makefile.in
+Makefile
-- 
1.5.3.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.