gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] Indent rules


From: Teun Burgers
Subject: [gnugo-devel] Indent rules
Date: Sat, 30 Aug 2003 18:11:33 +0200

Since there have been some e-mail to the list about how code
should be formatted, I thought it might be a good idea to add
some rules to the Make that use indent to format the code.

The indent flags are set in configure.in.

make indent in the toplevel directory after this patch format
the source in the engine subdir for a start.

- add makefile rules for indenting code with indent

Teun

diff -u -r1.4 Makefile.am
--- Makefile.am 19 Apr 2002 23:45:18 -0000      1.4
+++ Makefile.am 30 Aug 2003 15:57:27 -0000
@@ -2,6 +2,9 @@
 
 SUBDIRS = utils sgf engine patterns interface doc regression
 
+indent:
+       cd engine && $(MAKE) indent
+
 DISTCLEANFILES = *~
 
 EXTRA_DIST = gnugo.dsw config.vc makevcdist.pl WINDOWS
diff -u -r1.92 configure.in
--- configure.in        2 Aug 2003 14:17:52 -0000       1.92
+++ configure.in        30 Aug 2003 15:57:47 -0000
@@ -532,7 +532,8 @@
 
 dnl FIXME: please add warnings for other compilers !
 
-
+INDENT_FLAGS='-gnu -npcs -br'
+AC_SUBST(INDENT_FLAGS)
 
 #AM_GNU_GETTEXT
 #AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
diff -u -r1.21 Makefile.am
--- engine/Makefile.am  10 Aug 2003 17:56:50 -0000      1.21
+++ engine/Makefile.am  30 Aug 2003 15:57:48 -0000
@@ -59,3 +59,6 @@
       boardlib.c \
       hash.c \
       printutils.c
+
+indent: $(SOURCES)
+       indent $(INDENT_FLAGS) $^




reply via email to

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