Re: besoin d'aide pour makefile

Page principale

Répondre à ce message
Auteur: anne aublanc
Date:  
À: guilde
Sujet: Re: besoin d'aide pour makefile

----- Original Message -----
From: "anne aublanc" <anne.aublanc@???>
To: <guilde@???>
Sent: Friday, August 05, 2005 6:37 PM
Subject: Re: besoin d'aide pour makefile

au départ les 2 lignes que je récupère  avec le grep :
#define VGETTY_LOG_PATH "/var/log/vgetty.log.%s"
      -e 's;@LOG_PATH@;/var/log/mgetty.log.ttyxx;g'\


Dans le makefile :
VOICE_LOG=$(shell basename $(shell grep 'VGETTY_LOG_PATH'
../../voice/include/paths.h | cut -d' ' -f3 ) .%s )
=> vgetty.log
LOG_PATH=$(shell basename $(shell grep 'LOG_PATH' ../../sedscript |
cut -d";" -f3 ) .ttyxx )
=> mgetty.log

C'est ok...
Mais j'aimerai beaucoup ne pas mettre "en dur" : .%s et .ttyxx

J'ai fait x essais...
VOICE_LOG3=$(basename $(shell grep 'VGETTY_LOG_PATH'
../../voice/include/paths.h | cut -d' ' -f3 ) )
VOICE_LOG2=$(shell basename $(VOICE_LOG3) )
VOICE_LOG1=$(shell basename $(basename $(shell grep 'VGETTY_LOG_PATH'
../../voice/include/paths.h | cut -d' ' -f3 ) ) )
VOICE_LOG4=$(basename $(shell grep 'VGETTY_LOG_PATH'
../../voice/include/paths.h | cut -d' ' -f3 ) )

caller_id: caller_id.in
        sed -e "s!@VOICE_LOG@!$(VOICE_LOG)!g" -e 
"s!@LOG_PATH@!$(LOG_PATH)!g" < caller_id.in  > caller_id


caller_id1: caller_id.in
        sed -e "s!@VOICE_LOG@!$(VOICE_LOG1)!g" -e 
"s!@LOG_PATH@!$(LOG_PATH)!g" < caller_id.in  > caller_id1


caller_id2: caller_id.in
        sed -e "s!@VOICE_LOG@!$(VOICE_LOG2)!g" -e 
"s!@LOG_PATH@!$(LOG_PATH)!g" < caller_id.in  > caller_id2


caller_id4: caller_id.in
        sed -e "s!@VOICE_LOG@!$(VOICE_LOG4)!g" -e 
"s!@LOG_PATH@!$(LOG_PATH)!g" < caller_id.in  > caller_id4


sed -e "s!@VOICE_LOG@!vgetty.log!g" -e "s!@LOG_PATH@!mgetty.log!g" <
caller_id.in > caller_id

/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 2: syntax error: unexpected end of file
sed -e "s!@VOICE_LOG@!!g" -e "s!@LOG_PATH@!mgetty.log!g" < caller_id.in >
caller_id1

/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 2: syntax error: unexpected end of file
sed -e "s!@VOICE_LOG@!!g" -e "s!@LOG_PATH@!mgetty.log!g" < caller_id.in >
caller_id2

sed -e "s!@VOICE_LOG@!"/var/log/vgetty.log!g" -e "s!@LOG_PATH@!mgetty.log!g"
< caller_id.in > caller_id4
/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 2: syntax error: unexpected end of file
make: *** [caller_id4] Erreur 2

anne