Re: [PATCH] use new global, "Version", rather than macro, VERSION
From:
Ben Pfaff
Subject:
Re: [PATCH] use new global, "Version", rather than macro, VERSION
Date:
Thu, 28 Aug 2008 09:51:03 -0700
User-agent:
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
Jim Meyering <address@hidden> writes:
> +BUILT_SOURCES += version.c
> +version.c: Makefile
> + rm -f $@
> + printf '#include <config.h>\n' > address@hidden
> + printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> address@hidden
> + @chmod a-w address@hidden
> + mv address@hidden $@
According to the Automake manual, generated .c files do not need
to appear in BUILT_SOURCES:
`BUILT_SOURCES' is actually a bit of a misnomer, as any
file which must be created early in the build process can be
listed in this variable. Moreover, all built sources do not
necessarily have to be listed in `BUILT_SOURCES'. For
instance, a generated `.c' file doesn't need to appear in
`BUILT_SOURCES' (unless it is included by another source),
because it's a known dependency of the associated object.
--
Ben Pfaff
http://benpfaff.org