From: Vitaly Ostanin <vyt@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Makefile: using second prerequisite
Date: Sun, 07 Sep 2008 18:51:11 +0400
Message-ID: <48C3EA5F.2080001@altlinux.org> (raw)
In-Reply-To: <774a4f4a0809070658j8e8263h330bd5d9b31dc4d8@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
Artem Zolochevskiy пишет:
> hi all
>
> Господа, я не силён в make, поэтому прошу помощи.
>
> Как/возможно ли использовать second prerequisite в команде?
>
> target : file1 file2
> prog -a file1 -b file2 > target
>
> хочется заменить, используя automatic variables, но это не очень у
> меня получается.
>
> target : file1 file2
> prog -a $< -b тут_не_знаю > $@
Если у вас известно, что есть только file1 и file2, то почему не
использовать явные переменные?
file1 = file1
file2 = file2
target : $(file1) $(file2)
prog -a $(file1) -b $(file2) > $@
Если количество файлов неизвестно, нужно разбирать $?, $^ или $|.
--
Regards, Vyt
mailto: vyt@altlinux.org
JID: vitaly.ostanin@gmail.com
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2008-09-07 14:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-07 13:58 Artem Zolochevskiy
2008-09-07 14:51 ` Vitaly Ostanin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48C3EA5F.2080001@altlinux.org \
--to=vyt@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git