[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make and ~ expansion
From: |
Dan Jacobson |
Subject: |
make and ~ expansion |
Date: |
18 Oct 2001 17:54:07 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Exibit A:
File: make.info, Node: Wildcards ...
... The character `~' at the beginning of a file name also has special
significance. If alone, or followed by a slash, it represents your home
directory. For example `~/bin' expands to `/home/you/bin'. If the `~'
is followed by a word, the string represents the home directory of the
user named by that word. For example `~john/bin' expands to
`/home/john/bin'. On systems which don't have a home directory for
each user (such as MS-DOS or MS-Windows), this functionality can be
simulated by setting the environment variable HOME.
Exhibit B: my Makefile
K=~/bin/dms
pzz:
$K 33 33; ls -l $K
~/bin/dms 33 33
Exhibit C: *compilation*
make pzz
~/bin/dms 33 33; ls -l ~/bin/dms
0.559167
-rwxr-xr-x 1 jidanni jidanni 147 Dec 27 2000 /home/jidanni/bin/dms
~/bin/dms 33 33
make: ~/bin/dms: Command not found
make: *** [pzz] Error 127
Ok Ok Ok, looks like I found a bug in GNU Make version 3.79.1
However, maybe I didn't read the small print or something, e.g.,
Wildcard expansion happens automatically in targets, in
prerequisites, and in commands (where the shell does the expansion).
In other contexts, wildcard expansion happens only if you request it
explicitly with the `wildcard' function.
which is part of Exhibit A. So maybe "it's all my fault"?
I mean doesn't it say "commands"?
wait: if I use a line
:; ~/bin/dms 33 33
then it works... hmmm
--
http://www.geocities.com/jidanni Tel+886-4-25854780
- make and ~ expansion,
Dan Jacobson <=