#1755: Include arbitrary .c and .h files in distutils dynpmc build
-------------------------+--------------------------------------------------
Reporter: whiteknight | Owner: fperrad
Type: feature | Status: new
Priority: normal | Milestone:
Component: tools | Version: 2.6.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: all |
-------------------------+--------------------------------------------------
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.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1755>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets