gnu make help

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri May 11 14:24:01 UTC 2007


On Fri, May 11, 2007 at 10:10:44AM -0400, Neil Watson wrote:
> Consider this code:
> 
> # makefile
> 
> # This file will build a boot strap client. 
> 
> SHELL=/bin/bash
> AWK=/bin/awk
> SVN=/usr/local/bin/svn
> 
> # Define public key based on varible input
> ifeq "${NETWORK}" "172_16_0_0"
>        PUBLICKEY=root-172.16.48.66.pub
> endif
> ifeq "${NETWORK}" "192_168_0_0"
>        PUBLICKEY=root-192.168.81.43.pub
> endif
> ifeq "${NETWORK}" "10_208_66_0"
>        PUBLICKEY=root-10.208.66.59.pub
>        NETWORK=172_16_0_0
> endif
> 
> WORKDIR=/var/cfengine
> BINDIR=/usr/local/sbin
> TARFILES=makefile \
>        bin/${VERSION}/cfagent\
>        bin/${VERSION}/cfkey \
>        bin/${VERSION}/cfexecd \
>        inputs/${NETWORK}/update.conf \
>        init.d/cfexecd.sv \
>        ppkeys/${PUBLICKEY} \
>        REVISION.txt
> 
> Now consider this make command and the error:
> 
> [nhwatson at tor-lx-config config]$ make client VERSION=redhat_as_4 
> NETWORK=10_208_66_0
> make: *** No rule to make target `inputs/10_208_66_0/update.conf', needed 
> by `client'.  Stop.
> 
> Why is the network variable not reassigned to '172_16_0_0'?

I see nothing in that makefile that is a target, ie:

client: dependancies
	commands to run
	stuff to do


Really doens't look much like a makefile without that.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list