Thanks,
unit path is the option I was looking for. I have a C background. But I forgot to mention that this is a library. So there's no main file. And the C part is needed to make some C macros and defines visible. It's a wrapper for the brand new allegro library. The keytypes are a long list of key names needed in two places. I decided to separate and include it. .I'm aware of --automake, and It makes the process much easier. But it's far to weak to replace a Makefile.
Maybe some of the following things are wrong(hopefully):
- no install target - no clean target - no support for building documentation - no dependency checking. (In my case allegro-4.9 for the examples)
What's the way to go, when you like to release a library? For C I would use autotools and pkg-config. And I think It would be nice if there are going to be some macros for the use with autotools like an AC_PROG_CC equivalent AC_PROG_GPC which checks for the gpc compiler.
Martin Kalbfuß a écrit :
Thanks,
unit path is the option I was looking for. I have a C background. But I forgot to mention that this is a library. So there's no main file. And the C part is needed to make some C macros and defines visible. It's a wrapper for the brand new allegro library. The keytypes are a long list of key names needed in two places. I decided to separate and include it. .I'm aware of --automake, and It makes the process much easier. But it's far to weak to replace a Makefile.
Maybe some of the following things are wrong(hopefully):
- no install target
- no clean target
- no support for building documentation
- no dependency checking. (In my case allegro-4.9 for the examples)
Indeed, automake is used only to compile pascal programs, taking care of dependencies (including those to C functions and libraries). This is possible because all needed information is contained in the sources, if properly written (except some directory information, whence the --unit-path= ...) Notice that the gp utility takes care of cleaning via the two options --clean (cleans all) and --clean-objects (all except the executable), so that you do not have to bother to gather dependencies both in compiling and in cleaning.
Maurice
Maurice Lombardi wrote:
Martin Kalbfuß a écrit :
Thanks,
unit path is the option I was looking for. I have a C background. But I forgot to mention that this is a library. So there's no main file. And the C part is needed to make some C macros and defines visible. It's a wrapper for the brand new allegro library. The keytypes are a long list of key names needed in two places. I decided to separate and include it. .I'm aware of --automake, and It makes the process much easier. But it's far to weak to replace a Makefile.
Maybe some of the following things are wrong(hopefully):
- no install target
- no clean target
- no support for building documentation
- no dependency checking. (In my case allegro-4.9 for the examples)
Indeed, automake is used only to compile pascal programs, taking care of dependencies (including those to C functions and libraries). This is possible because all needed information is contained in the sources, if properly written (except some directory information, whence the --unit-path= ...) Notice that the gp utility takes care of cleaning via the two options --clean (cleans all) and --clean-objects (all except the executable), so that you do not have to bother to gather dependencies both in compiling and in cleaning.
If you are building a library with gp, the following link may be interesting http://www.gnu-pascal.de/crystal/gpc/en/mail14280.html..
Regards,
Adriaan van Os
gpc works very similar to gcc in makefiles. Just replace gcc with gpc wherever there's a pascal file. Does autotools and pkg-config generate a Makefile somewhere?
On Fri, Sep 4, 2009 at 3:24 AM, Martin Kalbfuß ma.kalbfuss@web.de wrote:
Thanks,
unit path is the option I was looking for. I have a C background. But I forgot to mention that this is a library. So there's no main file. And the C part is needed to make some C macros and defines visible. It's a wrapper for the brand new allegro library. The keytypes are a long list of key names needed in two places. I decided to separate and include it. .I'm aware of --automake, and It makes the process much easier. But it's far to weak to replace a Makefile.
Maybe some of the following things are wrong(hopefully):
- no install target
- no clean target
- no support for building documentation
- no dependency checking. (In my case allegro-4.9 for the examples)
What's the way to go, when you like to release a library? For C I would use autotools and pkg-config. And I think It would be nice if there are going to be some macros for the use with autotools like an AC_PROG_CC equivalent AC_PROG_GPC which checks for the gpc compiler.
Martin Kalbfuà wrote:
I'm aware of --automake, and It makes the process much easier. But it's far to weak to replace a Makefile.
--automake and the gp utility are not meant to replace a Makefile. (gp is meant to replace --automake, though.)
Maybe some of the following things are wrong(hopefully):
- no install target
- no clean target
- no support for building documentation
- no dependency checking. (In my case allegro-4.9 for the examples)
Except for clean with gp, as Maurice mentioned, that's right.
Indeed, it may be useful to call gp from a Makefile, while the Makefile does the rest (dependencies, documentation, install). That's what I do in some of my projects where I, e.g., need to build documentation.
What's the way to go, when you like to release a library? For C I would use autotools and pkg-config. And I think It would be nice if there are going to be some macros for the use with autotools like an AC_PROG_CC equivalent AC_PROG_GPC which checks for the gpc compiler.
I'm not aware of such macros, but if you're familiar with autoconf, it should not be too difficult to write them. (I've worked on the autoconf for the GPC Run Time System, but I've never really liked it too much, and it was some years ago, so I'm not actually that familiar with it at the moment, I'm afraid ...)
Frank