autoconf/automake/make ?



hi,

I have a make target in my Makefile.am:

BINDING_DEFS = guppi-axis.defs
BINDING_DEFS_IN = $(BINDING_DEFS).in

$(BINDING_DEFS): $(srcdir)/$(BINDING_DEFS_IN)
        sed -e 's|HACK_SRCDIR|$(srcdir)|' < $(srcdir)/$(BINDING_DEFS_IN)
> $(BINDING_DEFS)
$(autogenscm): $(BINDING_DEFS)
        $(SCM_BUILD_CMD) $(BINDING_DEFS)

This target works pretty well _but_:

If I configure in srcdir and make, the file BINDING_DEFS gets generated.
Now, if I configure again in directory foo so that builddir != srcdir,
what happens is that the BINDING_DEFS file is not generated again in
builddir: the build system uses the one in srcdir. Is there a way to
make sure th target is generated again at that time ? Another approach
would be to make sure the generated files are deleted from srcdir when
you rerun the configure script in builddir != srcdir but I have no idea
on how to do it.

I have tried using .PHONY but this seems to create a dependency loop for
make: the file is built and built again in loops.

anyone with ideas or hints ?

regards,
Mathieu


-- 
Mathieu Lacage <mathieu gnu org>
Portable: <lacage itineris net>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]