ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Makefile HELP!
@ 2005-01-21  7:23 Dmytro O. Redchuk
  2005-01-24  6:07 ` [Comm] " Vitaly Ostanin
  0 siblings, 1 reply; 4+ messages in thread
From: Dmytro O. Redchuk @ 2005-01-21  7:23 UTC (permalink / raw)
  To: ALT Community

Добрый  день.

   Вот возник вопрос -- не могу справиться.

   Скажите, можно ли (хочу надеяться, что "да") в Makefile понять,
   выполнялась ли какая-то определённая цель?

   Например:
    0  a_lot_of_files = foo moo bar
    1
    2  backup: $(a_lot_of_files)
    3  ifeq($(MAKECMDGOALS),check)
    4	   # да нет, никаких бэкапов, мы только проверяем...
    5  esle
    6      # пум-пурум, пам-парам...
    7  endif
    8
    9  check: backup
   10      # а выполнялся ли backup?!
   11      # если ДА, то бэкаповых файлов НЕТ.
   12      # если НЕТ, то всё ОК.


   Пробовал где-то в строке 4 писать что-то типа define NO_BACKUP, но
   потом запроблемилось его проверить где-то в строке 10 (как ни пробовал,
   не получается:)

   Можно, конечно, играться с переменной $?, но в ней может быть слишком
   много всего, а мне нужно проверить только одну цель, например.

   Куда глянуть, народ? make tutorial читаю, но пока не вылепилось...

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



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

end of thread, other threads:[~2005-01-24  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-21  7:23 [Comm] Makefile HELP! Dmytro O. Redchuk
2005-01-24  6:07 ` [Comm] " Vitaly Ostanin
2005-01-24  8:55   ` Dmytro O. Redchuk
2005-01-24  9:06     ` Vitaly Ostanin

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