automake
[Top][All Lists]
Advanced

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

Re: integration of perl with automake


From: Ralf Wildenhues
Subject: Re: integration of perl with automake
Date: Thu, 15 Oct 2009 20:34:34 +0200
User-agent: Mutt/1.5.20 (2009-08-09)

Hello Andreas,

beside the advice already give to you:

* Andreas Otto wrote on Thu, Oct 15, 2009 at 12:59:39PM CEST:
>   to build a perl extension it's best to use the perl build-system based on
> 
>       perl Makefile.PL
> 
>    the command create a Makefile in the same directory of Makefile.PL self
>    and in the toplefel-position "perlmsgque/Makefile".
[...]

Generally, you have more than one possibility when integrating
non-Automake makefiles in your build system.  E.g., you can either
amend the makefile to have the needed targets, or rewrite it from
scratch, or put adjustment rules in the Makefile.am one level above
(and then call the subdir makefile manually, without listing it in
SUBDIRS).

  info Automake "Third-Party Makefiles"

has some more hints and suggestions.

>   1.   I need automake code to check if "perlmsgque/Makefile" is avilable
>       and build this makefile again if missing (after make clean) or extend
>       the toplevel Makefile to do a 
>               (cd perlmsgque;perl Makefile.PL)
>       after all "make clean" was done

It doesn't seem sensible to do this at the end of a "make clean".  It
should be done before the subdir is entered for any other recursive
target.

You can try out something like this:

  PERL = perl
  $(RECURSIVE_TARGETS): make-perl-makefile
  make-perl-makefile:
        cd perlmsgque && $(PERL) Makefile.PL

Note that it is likely that the perl-generated makefile is missing other
targets that automake adds automatically.  You could add them manually
after the above, e.g., continue the rule with
        echo 'distdir: ; cp foo bar $$(distdir)' >> perlmsgque/Makefile

and whatever else might need adding.  You can try 'make distcheck' to
find several things you'll need.

Please note that this relies on the undocumented $(RECURSIVE_TARGETS)
variable, so there is a small chance it could break with a future
Automake release.

>   2. related to this problem Is the initial build of the "perlmsgque/Makefile"
>       currently I use the autoconf to do the "perl Makefile.PL" but I thing
>       it should be better done on need in the toplevel makefile.

That should be fixed by any of the above as well.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]