www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/04/02:17:52

Date: Sun, 4 Jun 1995 01:29:33 -0400
From: dj (DJ Delorie)
To: pdasilva AT tpone DOT telepac DOT pt
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: MAKE jumps?

> 1. How can I put unconditional executable commands in a make file?

Try this:

	foo := $(shell run-this-command)

Or, with dependencies:

	all : always

	.PHONY: always
	always:
		run-this-command
		and-this-one

> 2. How can I make some commands dependend on a parameter?
>    For example: I need to generate a PPP.exe file and delete
>    the intermediate file PPP only when there is no need
>    to debug it. Besides, the compiler options must also be different
>    in this case (-g). I took a look to some examples I have and
>    all of them ask, in a comment line, to edit some vars settings.
>    Isn't there a better way to do this?

#ifneq (${PARAMETER},)
extra-stuff-if-parm-given
#endif

PPP.exe : PPP
	coff2exe PPP
#ifeq (${DEBUG},)
	rm PPP
#endif

then:

make DEBUG=y

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019