This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Cross-rpcgen patch, version 4
On Wed, 25 Apr 2012, Roland McGrath wrote:
> > +build-compile-command.c = $(BUILD_CC) $($(basename $(<F))-CFLAGS) \
> > + $(ALL_BUILD_CFLAGS) $< $(OUTPUT_OPTION)
>
> A variable of this name should include -c, since it's parallel to
> compile-command.c. If it's not going to include the dependency-generation
> flags, then it should be called build-compile.c instead, since it's really
> parallel to compile.c and not to compile-command.c.
The rationale for not including -c is that there is exactly one place
right now that has a use for it with -c (cross-rpcgen) and exactly one
that has a use for it without -c ($(native-compile)), so the above
(whatever the name) seems to be the limit of useful sharing between those
two cases.
> If it's not prohibitively hairy, making it do the automatic dependencies
> stuff would be nice.
I wondered about automatic dependency generation, since version 3 of the
patch included $(compile-mkdep-flags), but concluded that there was
nothing that would actually cause the dependency files generated by that
to be included by make, so no actual point in generating them. (And I
didn't see any obvious pattern for saying that something is an ad hoc .o
file whose dependency files should be included by make - that is, any
obvious variable that the patch was missing adding $(cross-rpcgen-objs)
to.)
--
Joseph S. Myers
joseph@codesourcery.com