-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Benoît Barbier wrote:
> Salut à tous,
> 
> Pour rappeler une commande dans un makefile il faut mettre :
> make nom_commande?

En fait, tu peux appeller ta 'fonction' make avec un nom de fichier, à
la suite des ':', tu peux appeller les fonctions dépendantes. Exemple
pour ton fichier plus bas...

> J'ai fait ça dans mon makefile
> eps2pdf:
>       rm -f $(GRAPHICSPATH)/*.pdf
>       @for eps in $(GRAPHICSPATH)/*.eps ;\
>       do                                \
>          epstopdf $$eps              ;\
>       done

On dirait que tu veux appeler la commande epstopdf sur tous les fichiers
eps dans le répertoire $(GRAPHICSPATH), mais avant ça, tu voudrais
effacer tous les pdf. Je te propose:

GRAPHICSPATH = le_repertoire
file := $(addsuffix .pdf, $(basename $(wildcard $(GRAPHICSPATH)/*.eps)))

eps2pdf: $(files)

$(files):
        epstopdf $@

clean:
        -rm -f $(GRAPHICSPATH)/*.pdf

> Puis, plus loin dans le fichier (pour générer un document pdf à partir
> des sources LaTeX):
> 
> pdf:
>       make eps2pdf
>       pdflatex $(NOM_CIBLE)
>       makeindex $(BASE_NOM).idx
>       bibtex $(BASE_NOM)
>       pdflatex $(NOM_CIBLE)
>       pdflatex $(NOM_CIBLE)

Tu peux dire que eps2pdf est une dépendance de pdf. Tu peux l'exprimer
comme ceci:

pdf: eps2pdf
        pdflatex $(NOM_CIBLE)
        ...

- --
Arnaud Vandyck, STE fi, ULg
Formateur Cellule Programmation.
Java Trap: http://www.gnu.org/philosophy/java-trap.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDtSuZ4vzFZu62tMIRAhReAJ419/hFbKiE4KgORxvhfd8Rsvpt0QCeLXK7
Yu18oI611Omadyx2TGPwg9Q=
=w7om
-----END PGP SIGNATURE-----
begin:vcard
fn:Arnaud Vandyck
n:Vandyck;Arnaud
org;quoted-printable:Universit=C3=A9 de Li=C3=A8ge;STE-Formations Informatiques
adr;quoted-printable;quoted-printable;quoted-printable:B=C3=A2timent C1;;Rue Armand St=C3=A9vard, 2;Li=C3=A8ge;;4000;Belgique
email;internet:[EMAIL PROTECTED]
title;quoted-printable:Attach=C3=A9 (formateur)
tel;work:+32 4 366 90 55
tel;fax:+32 4 366 90 59
tel;home:+32 4 349 09 69
tel;cell:+32 486 31 10 47
x-mozilla-html:FALSE
url:http://www.ste.fapse.ulg.ac.be/
version:2.1
end:vcard

_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux
Archives: http://www.mail-archive.com/linux@lists.unixtech.be
IRC: chat.unixtech.be:6667 - #unixtech
NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech

Répondre à