patch for a verbose -fullversion

Alexandre Oliva oliva at
Fri Mar 10 01:05:27 PST 2000

On Mar 10, 2000, Patrick Tullmann <tullmann at> wrote:

> -Kaffe_SOURCES = main.c
> +Kaffe_SOURCES = main.c version.o
                                  ^ why not version.c ?

Since version-info.h is created, you should probably add a dependency
of version.o on it.  Or you could simply not create version.c, and
just add the #include and the new functions to main.c.  It's small
enough to afford re-compilation every time.

I don't like having phony targets that cause something to be built
every time I run `make'.  How about arranging for version-info.h to
depend on config.status and $(srcdir)/ChangeLog ?

You could extract the first line of ChangeLog like this:

version-info.h: config.status $(srcdir)/ChangeLog
        sed < $(srcdir)/ChangeLog \
          -e 's/^/#define VER_CHANGELOG_HEAD "/' \
          -e 's/$/"/'
          -e '1q' >> $@T
        -rm -f $@
        mv $@T $@

Note the use of a temporary file to hold the output, so that you never
use a partially-constructed file.  And note the use of `-' before the
`rm'; on some platforms, even `rm -f' may fails.

Alexandre Oliva     Enjoy Guaraná
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{,}   Write to mailing lists, not to me

More information about the kaffe mailing list