id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,lang,patch,platform
1755,Include arbitrary .c and .h files in distutils dynpmc build,whiteknight,fperrad,"I would like the ability to cleanly add arbitrary .c and .h files into a dynpmc library I am building using distutils. However, there is no easy way to do this. darbelo suggested a method he used for his DecNumber project where he manually compiles the .c files, and then adds the resulting .o files to the dynpmc_ldflags string to be included in linking the library. This mechanism mostly works for me, but is not without it's disadvantages:

1) We can't specify extra .h files as build prerequisites for the .pmc files. So if the .h file changes, the .pmc files won't be re-converted to C and won't be re-compiled.
2) The extra .c and .h files cannot reference the pmc_*.h files generated by pmc2c. If I compile the .c files first, the pmc_*.h files haven't been generated yet. If I compile the .c files second, I cannot link them into the dynpmc shared library, since it has already been built and linked.

I would like the ability to be able to specify a list of .c and .h files along with the list of .pmc files. I would like to be able to do something like this in my setup.nqp file:

{{{
%kv{'dynpmc'}{'mypmc_group'} := <
  src/pmc/foo.pmc
  src/pmc/bar.pmc
  src/lib/baz.c
>;
%kv{'dynpmc_h'}{'mypmc_group'} := <
  include/baz.h
>
}}}

I broke the .h files out into a separate set for illustrative purposes, but I would be perfectly happy if they were included in the same place as other files too.",feature,closed,normal,,tools,2.7.0,medium,fixed,,,,,all
