Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.os.unix > #8072

Makefiles : arguments de fonctions

From Thomas <fantome.forums.tDeContes@free.fr.invalid>
Newsgroups fr.comp.os.unix
Subject Makefiles : arguments de fonctions
Date 2023-05-06 04:26 +0200
Organization A noiseless patient Spider
Message-ID <fantome.forums.tDeContes-F96732.04264106052023@news.eternal-september.org> (permalink)

Show all headers | View raw


bonjour :-)


f1 = $1 $2
f2 = $(call f1,$1)

$(info '$(f1)')
$(info '$(call f1,a,b)')
$(info '$(call f1,a)')
$(info '$(call f2,a)')
$(info '$(call f2,a,b)')


$ make 2='c'


chez moi ça donne :

' c'
'a b'
'a c'
'a c'
'a '

c'est bizarre, le fait d'appeler f2 avec 2 arguments écrase le 2 de la 
CLI, et est ensuite annulé par l'appel à f1 ... alors que l'appel à f1 
seul n'inquiète pas 2 !

pareil chez vous ?
une explication logique ?

-- 
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

Back to fr.comp.os.unix | Previous | Next | Find similar | Unroll thread


Thread

Makefiles : arguments de fonctions Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-05-06 04:26 +0200

csiph-web