Skip ./configure When Source Directory Has Not Changed

Home » Asterisk Users » Skip ./configure When Source Directory Has Not Changed
Asterisk Users 8 Comments

Hi,

A silly question bouncing in my head for a long time :
when I’m installing-configuring a new Asterisk system, I’m using a script that issue the usual ./configure, make and make install commands to install Asterisk from source.

When installation fails for any reason, I would re-run my installation script which in turn, among many things, would launch the above ./configure command.

Is there a smart way to accelerate things a bit and skip ./configure when source files have not changed since last configure command was previously run ?

Regards

8 thoughts on - Skip ./configure When Source Directory Has Not Changed

  • You do not need to call ./configure when building the package fails. Just call “make”, maybe
    “make –jobs=4”.

    If your build fails because of a missing library, then you may (need) to call configure again.

    jg

  • That probably isn’t what you really want to do.

    The most common reason why a build fails is because a -dev package is missing.
    Alternatively, some required component might be present, but located somewhere away from the usual search path.

    Once either of these situations is resolved, you are going to need to re-run the configure script anyway.

  • 2014-03-25 10:18 GMT+01:00 A J Stiles :

    That’s true but if you compare this with Makefile’s ability to check files last modification date …

    Maybe I’ll just leave it to the man running the script to decide when to run configure and it’s not needed.

    Thanks for sharing on this anyway.

  • I, and possibly others, got some unwanted mail from this thread. Somebody is abusing the email addresses…

    jg

  • 2014-03-25 18:42 GMT+01:00 jg :

    Maybe but asking question which relates to asterisk is IMHO, an expensive way to harvest email addresses.

  • You kind of have it backwards there. You would only be able to skip ./configure if you changed the source files but didn’t change anything else on the system (e.g., libraries or utilities). But there’s no way for a build script to know if anything on the system changed without running ./configure. That’s what ./configure does. So the only sensible thing to do is to run it every time.