[vsipl++] [patch] fix for generating ALF dependencies
Jules Bergmann
jules at codesourcery.com
Fri May 18 20:49:03 UTC 2007
Don McCoy wrote:
> This patch corrects a problem generating the dependencies for ALF source
> files when building for Cell/B.E. The problem did not affect the way
> the source files were built, but the fix eliminates an error complaining
> about missing header files.
>
> Ok to commit?
Sorry for the late review, I know this has already been checked in.
It looks like this moves the C dependency rule from the top-level
makefile to the ALF makefile, and customizes it for the ALF flags. IIUC
This only works if the only C files we have in the library are for ALF
(which is currently the case -- we C files in FFTW, ATLAS, and CLAPACK,
but they get built with separate makefiles).
In retrospect, we should either:
- qualify this rule to only apply for C files in ALF, or
- keep the original general rule and use the fancy per-directory
variable thing "$(call dir_var,$(dir $<),CFLAGS)" to use the ALF flags
for C files in the ALF directories.
I think the former solution is the easiest (and it is consistent with
how we build the ALF C files). Replacing:
> +%.d: %.c
> + $(make_alf_dep)
> +
With:
alf_depends := $(patsubst $(srcdir)/%.c, %.d, $(alf_src))
$(alf_depends): %d: %c
$(make_alf_dep)
should do the trick.
Does that sound OK?
If so, I'll fold it into a patch that fixes C++ dependencies on MCOE.
(This is purely defensive programming -- we've gone 2+ years before
adding C files to the library, it will probably be another 2+ years
before we add more and really have to fix this!)
-- Jules
--
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
More information about the vsipl++
mailing list