help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for critique on a small makefile


From: Edward Z. Yang
Subject: Re: Request for critique on a small makefile
Date: Tue, 12 Dec 2006 17:20:03 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.6.0.104

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

Philip Guenther wrote:
> Good eye.  It's preferable, but not necessary. [snip] But yes, it's good
> practice.

I guess I'll do it then. It's only an extra line.

> Correct.  Regarding $<, we turn to the info pages again:

Is there a specific reason, then, that you use $< rather than $^?
Suppose you added another object file to the compilation step but forgot
to change the variable: it seems that using $^ wouldn't do any harm.

> Ah.  Hmm.  My *guess* is that g++ will only add the .exe suffix if
> there isn't already such a suffix present.  If so, then following the
> three points I listed should work.

This seems to be the case. I'm currently working around it by cleaning
up *.exe files with make clean. On Unix, ${programs} does the dirty
work. I think this is a satisfactory solution (and not a hack).

> There's a standard configure option for adding a prefix to the
> executable name when installed.  I use that because I use OpenBSD and
> need access to the 'make' included with the system for when I'm
> compiling the system itself or building stuff using its 'ports'
> system.

Hmm... I'll keep that in mind when I (eventually) get a *nix box working
(main problem is wireless support, but that's OT).

Thanks for all the help!

- --
 Edward Z. Yang      Personal: address@hidden
 SN:Ambush Commander Website: http://www.thewritingpot.com/
 GPGKey:0x869C48DA   http://www.thewritingpot.com/gpgpubkey.asc
 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFfysTqTO+fYacSNoRAtxnAJwLFQPjvAPUdLVcxBSpR5yG5VgllQCdEBj6
J9HPliyZZkU/mUi9N6LMXVA=
=sInA
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]