ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Conditional include in makefiles
@ 2003-08-11 14:02 Vitaly Ostanin
  2003-08-11 14:16 ` Dmytro O. Redchuk
  0 siblings, 1 reply; 4+ messages in thread
From: Vitaly Ostanin @ 2003-08-11 14:02 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Hello, All!

Подскажите, пожалуйста, можно ли узнать средствами Makefile имя
вызванной цели?

Это нужно для условного включения файла в Makefile - включать его
для всех целей, кроме указанных. Что-нибудь вроде:

ifneq ($@, depends)
    include "depends.tabular"
endif

В данном случае (сборка make в Website XSL) файл depends.tabular
создаётся целью depends. Но цель depends не отрабатывает, т.к.
нет depends.tabular для включения.

Автор Website предлагает делать
touch depends.tabular
каждый раз, когда его нету. Что криво и неудобно.

Пробовал делать проверку существования файла и создавать его
перед всеми правилами Makefile - не отрабатывает с руганью на
команды до правил.

-- 
Regards, Vyt
mailto:  vyt@vzljot.ru
JID:     vyt@vzljot.ru

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] Conditional include in makefiles
  2003-08-11 14:02 [Comm] Conditional include in makefiles Vitaly Ostanin
@ 2003-08-11 14:16 ` Dmytro O. Redchuk
  2003-08-11 15:48   ` [Comm] " Vitaly Ostanin
  0 siblings, 1 reply; 4+ messages in thread
From: Dmytro O. Redchuk @ 2003-08-11 14:16 UTC (permalink / raw)
  To: community

On Mon, Aug 11, 2003 at 06:02:04PM +0400, Vitaly Ostanin wrote:
> Hello, All!
> 
> Подскажите, пожалуйста, можно ли узнать средствами Makefile имя
> вызванной цели?
Кажись так:

ifeq ($(MAKECMDGOALS),sometarget)
 SOME = something
else
 SOME = anything
endif

> 
> -- 
> Regards, Vyt
> mailto:  vyt@vzljot.ru
> JID:     vyt@vzljot.ru

-- 
  _,-=._              /|_/|
  `-.}   `=._,.-=-._.,  @ @._,
     `._ _,-.   )      _,.-'
        `    G.m-"^m`m'        Dmytro O. Redchuk


XMMS:  ... silence.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Comm] Re: Conditional include in makefiles
  2003-08-11 14:16 ` Dmytro O. Redchuk
@ 2003-08-11 15:48   ` Vitaly Ostanin
  2003-08-12  5:47     ` Dmytro O. Redchuk
  0 siblings, 1 reply; 4+ messages in thread
From: Vitaly Ostanin @ 2003-08-11 15:48 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Mon, 11 Aug 2003 17:16:13 +0300
"Dmytro O. Redchuk" <dor@kiev-online.net> wrote:

> On Mon, Aug 11, 2003 at 06:02:04PM +0400, Vitaly Ostanin wrote:
> > Hello, All!
> > 
> > Подскажите, пожалуйста, можно ли узнать средствами Makefile
> > имя вызванной цели?
> Кажись так:
> 
> ifeq ($(MAKECMDGOALS),sometarget)
>  SOME = something
> else
>  SOME = anything
> endif

Шаман! Спасибо огромное! :))

<skipped/>

-- 
Regards, Vyt
mailto:  vyt@vzljot.ru
JID:     vyt@vzljot.ru

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] Re: Conditional include in makefiles
  2003-08-11 15:48   ` [Comm] " Vitaly Ostanin
@ 2003-08-12  5:47     ` Dmytro O. Redchuk
  0 siblings, 0 replies; 4+ messages in thread
From: Dmytro O. Redchuk @ 2003-08-12  5:47 UTC (permalink / raw)
  To: community

On Mon, Aug 11, 2003 at 07:48:22PM +0400, Vitaly Ostanin wrote:
> On Mon, 11 Aug 2003 17:16:13 +0300
> "Dmytro O. Redchuk" <dor@kiev-online.net> wrote:
> 
> > On Mon, Aug 11, 2003 at 06:02:04PM +0400, Vitaly Ostanin wrote:
> > > Hello, All!
> > > 
> > > Подскажите, пожалуйста, можно ли узнать средствами Makefile
> > > имя вызванной цели?
> > Кажись так:
> > 
> > ifeq ($(MAKECMDGOALS),sometarget)
> >  SOME = something
> > else
> >  SOME = anything
> > endif
> 
> Шаман! Спасибо огромное! :))
Та не...
Я, вообще-то, не программист...

Просто "для себя" иногда пользую make (достаточно давно -- ещё под
DOSом -- но не глубоко), а поэтому не поленился как-то прочитать make
tutorial (или как там его), который довольно просто найти где-то через
www.gnu.org.

Понял мало, но кое-что использую :-)

> 
> <skipped/>
> 
> -- 
> Regards, Vyt
> mailto:  vyt@vzljot.ru
> JID:     vyt@vzljot.ru

-- 
  _,-=._              /|_/|
  `-.}   `=._,.-=-._.,  @ @._,
     `._ _,-.   )      _,.-'
        `    G.m-"^m`m'        Dmytro O. Redchuk


You know how to win a victory, Hannibal, but not how to use it.
		-- Maharbal


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-12  5:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 14:02 [Comm] Conditional include in makefiles Vitaly Ostanin
2003-08-11 14:16 ` Dmytro O. Redchuk
2003-08-11 15:48   ` [Comm] " Vitaly Ostanin
2003-08-12  5:47     ` Dmytro O. Redchuk

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git