Robert Shearman rob@codeweavers.com writes:
This is useful for generated files such as *_i.c and *_p.c (when widl can generate them). diff --git a/Make.rules.in b/Make.rules.in index 9e7ec07..68544dc 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -8,6 +8,7 @@ # MODULE : name of the module bein # # Each individual makefile may define the following additional variables: # C_SRCS : C sources for the module +# C_GEN_SRCS : C sources that are generated for the module
You shouldn't need that. IDL files will be listed as sources and make depend will be able to handle that properly, just like it handles idl headers already.
Alexandre Julliard wrote:
Robert Shearman rob@codeweavers.com writes:
This is useful for generated files such as *_i.c and *_p.c (when widl can generate them). diff --git a/Make.rules.in b/Make.rules.in index 9e7ec07..68544dc 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -8,6 +8,7 @@ # MODULE : name of the module bein # # Each individual makefile may define the following additional variables: # C_SRCS : C sources for the module +# C_GEN_SRCS : C sources that are generated for the module
You shouldn't need that. IDL files will be listed as sources and make depend will be able to handle that properly, just like it handles idl headers already.
If I just add the file to C_SRCS then "make" works fine, but "make depend" doesn't because "make depend" doesn't have a dependency on C_SRCS.
robert-shearmans-computer:~/Documents/wine/dlls/oleaut32/tests rob$ make depend ../../../tools/makedep -C. -S../../.. -T../../.. olefont.c olepicture.c safearray.c tmarshal.c typelib.c usrmarshal.c varformat.c vartest.c vartype.c tmarshal_i.c tmarshal.rc tmarshal.idl tmarshal_i.c: No such file or directory
This patch was an attempt to work around this problem and still generate useful dependency information.
Robert Shearman rob@codeweavers.com writes:
If I just add the file to C_SRCS then "make" works fine, but "make depend" doesn't because "make depend" doesn't have a dependency on C_SRCS.
robert-shearmans-computer:~/Documents/wine/dlls/oleaut32/tests rob$ make depend ../../../tools/makedep -C. -S../../.. -T../../.. olefont.c olepicture.c safearray.c tmarshal.c typelib.c usrmarshal.c varformat.c vartest.c vartype.c tmarshal_i.c tmarshal.rc tmarshal.idl tmarshal_i.c: No such file or directory
This patch was an attempt to work around this problem and still generate useful dependency information.
Yes, but you need to do that without generating them, otherwise you need to build half the tree before you can even do a make depend. Makedep has to be taught how to generate dependencies for a _i.o given the original .idl.
Alexandre Julliard wrote:
Robert Shearman rob@codeweavers.com writes:
If I just add the file to C_SRCS then "make" works fine, but "make depend" doesn't because "make depend" doesn't have a dependency on C_SRCS.
This patch was an attempt to work around this problem and still generate useful dependency information.
Yes, but you need to do that without generating them, otherwise you need to build half the tree before you can even do a make depend. Makedep has to be taught how to generate dependencies for a _i.o given the original .idl.
This still doesn't completely fix the problem for tests though, since adding the file to CTESTS obviously won't work.
What should I use instead? EXTRA_OBJS? Change C_SRCS rule to use EXTRA_SRCS as well? Or add a new variable to use in the C_SRCS rule?
Robert Shearman rob@codeweavers.com writes:
This still doesn't completely fix the problem for tests though, since adding the file to CTESTS obviously won't work.
What should I use instead? EXTRA_OBJS? Change C_SRCS rule to use EXTRA_SRCS as well? Or add a new variable to use in the C_SRCS rule?
It can't be in C_SRCS, it's not C sources, it's IDL sources. It should be in IDL_SRCS (or probably IDL_I_SRCS, IDL_P_SRCS etc.) We don't really have the infrastructure in place simply because we don't have anything that needs it; but if you have a test that needs that sort of thing, submit it and I'll take care of the makefiles.