[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] Unmotivated rebuilding
From: |
Gunnar Farneback |
Subject: |
[gnugo-devel] Unmotivated rebuilding |
Date: |
Thu, 28 Mar 2002 23:48:21 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
As I guess many people have noticed and become irritated by, when you
make a second build many files are needlessly recompiled. More
exactly, if you do this:
download tarball, unpack, configure
make
make
the second make will, regardless whether you have changed anything,
rebuild a few files, including the somewhat time consuming joseki
database.
The problem is with the file sgf_properties.h, which is provided in
the distribution but also built by the program sgfgen from the
specification file sgf_properties.def. Furthermore, sgf_properties.h
is built *after* the source files for libsgf.a have been compiled.
Since the latter files depend on sgf_properties.h, the second make
will notice that sgf_properties.h is newer and rebuild them.
I can see four potential solutions:
1. Make sure sgf_properties.h is newer than sgfgen.c and
sgf_properties.def so that it normally doesn't have to be rebuilt.
2. Modify the makefile so that sgf_properties.h is built before the
libsgf.a source files are compiled.
3. Remove sgf_properties.h from the distribution and let it be
generated in the build.
4. Stop sgf_properties.h from being built at all by default. We'd want
to keep the make target so that people can rebuild the file if they
modify sgf_properties.def. This is quite unlikely though, so it's fine
if they have to run the make taret by hand.
I doubt 1 is practically feasible. 2 is a good solution if automake
makes it possible. I have no idea how to do it or whether it can be
done. 3 should be simple to implement, but maybe there's some
complication there which I fail to notice. 4 is possibly the best
solution and Dan thinks it can be done.
Can someone remind me why we are shipping a prebuilt sgf_properties.h
to begin with?
In the mean time, this patch makes a minor cleanup of sgf/Makefile.am.
/Gunnar
Index: sgf/Makefile.am
===================================================================
RCS file: /cvsroot/gnugo/gnugo/sgf/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- sgf/Makefile.am 6 Nov 2001 16:36:51 -0000 1.4
+++ sgf/Makefile.am 28 Mar 2002 22:45:53 -0000
@@ -2,7 +2,7 @@
sgfgen_SOURCES = sgfgen.c
-EXTRA_DIST = sgf_extras.def sgf_properties.def sgfgen.dsp sgf.dsp sgfgen.dsp
+EXTRA_DIST = sgf_extras.def sgf_properties.def sgfgen.dsp sgf.dsp
noinst_HEADERS = \
sgftree.h\
@@ -15,9 +15,7 @@
DISTCLEANFILES = *~
INCLUDES =\
- -I$(top_srcdir)/engine\
-I$(top_srcdir)/utils\
- -I$(top_srcdir)/interface
noinst_LIBRARIES = libsgf.a
- [gnugo-devel] Unmotivated rebuilding,
Gunnar Farneback <=