Re: Re: A bit of a makefile.frag situation...
| From: | Steph | Date: | Wed, 12 Oct 2005 17:56:07 +0000 |
| Subject: | Re: Re: A bit of a makefile.frag situation... | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-1786@lists.php.net to get a copy of this message | ||
> > Is there a way to check for files during make and delay further
processing
> > until they're all generated?
>
> Yes, you put such files as dependancy for the other file's build
rule.
That sounds a likely winner...
> > The *nix build system, on the other hand, generates the 8 base gen_*
files
> > from ext/gtk+/Makefile.frag, and then compiles them during
> > ext/gtk+/config.m4. This approach caused a problem in the *nix build
when
> > gen_gtk.c included gen_gtk.h before it existed. Andrei addressed that
> > problem by not including the gen_*.h files at all. This is fine for
> > building PHP-GTK 2 itself, on either system, but of course the library
> > produced in this way no longer contains PHP-GTK 2 exports. (The
gen_*.h
> > files consist solely of PHP_GTK_API extern PHP_GTK_EXPORT_CE()
> > declarations). That means we can't build PHP-GTK 2 extensions any more,
on
> > either system.
>
> Tell me how to reproduce the problem and I might be able to fix it
too.
> (this explanation does not make any sense to me)
You'd need to be able to build a php-gtk extension, and I don't know if
that's even possible on *nix at present. ext/libglade's in public CVS if
you want to try.
Basically we need to be able to add the line #include "php_gtk_api.h" to
gtk.overrides without breaking the *nix build of PHP-GTK itself (which might
even be OK on your system in the first place, but isn't for everyone).
Where there's the line
PHP_GTK_EXTENSION([gtk+], no, [php_gtk+.c], [gen_atk.c gen_pango.c gen_gdk.c
gen_gtk.c php_gtk+_types.c])
at the end of ext/gtk+/config.m4, there needs to be some kind of dependancy
check for the gen_*.c files to ensure that their gen_*.h equivalent actually
exists before the gen_*.c file is compiled. Although TBH it seems gen_gtk.c
is the only one really causing problems, it'd be better to err on the side
of caution.
Thanks Jani,
- Steph