# Makefile not running ./configure



## oobayly (Sep 16, 2010)

After writing the CAPI4Hylafax howto, I've been attempting to get it to work on FreeBSD 7.3-RELEASE amd64. After getting the newest version to compile, I decided I really should look at getting the Makefile to work correctly.
The problem at the moment is that after executing *make patch* I need to manually run some of the automake tools to generate the configure script

```
# cd work/capi4hylafax-01.03.00
# aclocal
# libtoolize --force --copy
# automake --add-missing --copy
# autoreconf
```

I've put these in the _post-patch_ segment of the Makefile. However when I execute *make* I get the following message:

```
<snip>
===>   capi4hylafax-01.03.00 depends on executable: gmake - found
===>   capi4hylafax-01.03.00 depends on file: /usr/local/bin/perl5.10.1 - found
===>   capi4hylafax-01.03.00 depends on shared library: tiff.4 - found
===>  Configuring for capi4hylafax-01.03.00
===>  Building for capi4hylafax-01.03.00
gmake: Makefile: No such file or directory
gmake: *** No rule to make target `Makefile'.  Stop.
*** Error code 1

Stop in /var/tmp/comms/capi4hylafax.
```

As you can see, make says it configuring, but the configure script is never executed. If I enter the work source directory and execute the configure script, and then call *make *everything works.

The makefile was originally written for automake v.1.5, autoconf v.2.53 and libtool v.1.3
Can anyone suggest what the problem is?

Thank,
John


----------



## SirDice (Sep 16, 2010)

Did you read Porter's Handbook: 6.4 Using GNU autotools?


----------



## oobayly (Sep 16, 2010)

Hmm, that'll complement my current bedtime reading of Understanding Flying Weather! Thanks for the tip.


----------



## SirDice (Sep 16, 2010)

I think aclocal, automake and autoreconf is already 'build-in', you just need the correct variables in your Makefile. There's no real need to do those 'by hand' with post-patch.

Not sure about libtoolize though, you may need to experiment a little.


----------



## oobayly (Sep 16, 2010)

SirDice said:
			
		

> I think aclocal, automake and autoreconf is already 'build-in', you just need the correct variables in your Makefile. There's no real need to do those 'by hand' with post-patch.
> 
> Not sure about libtoolize though, you may need to experiment a little.



Using the "Building Mechanisims" & "GNU autotools" chapters, I was able to tidy up the post-patch executes. However libtoolize left me scratching my head, so I've had to leave it in post-patch.

As for the configure script not running, there was no *GNU_CONFIGURE= yes* set. The whole package compiles effortlessly now.


----------

