Re: Makefile and the usage of ~ ?
lothar.behrens@lollisoft.de schrieb am 10.02.05 15:25:45:
if I echo ~ on the console, I get the correct home directory.
If I use ~/lib or similar I do not get the correct path. Why can this be ?
Die Angaben sind ein wenig spaerlich. Bei solchen Problemen waere es schoen, wenn Du ein minimalistisches Makefile mitlieferst, mit dem sich Dein Problem nachvollziehen laesst. $> cat Makefile SHELL = /bin/bash list: ; @echo ~ $> make list /home/thomas $> Geht doch... CU, Th.
Hallo, Am Thu, 10 Feb 2005, Thomas Hertweck schrieb:
lothar.behrens@lollisoft.de schrieb am 10.02.05 15:25:45:
if I echo ~ on the console, I get the correct home directory.
If I use ~/lib or similar I do not get the correct path. Why can this be ?
Die Angaben sind ein wenig spaerlich. Bei solchen Problemen waere es schoen, wenn Du ein minimalistisches Makefile mitlieferst, mit dem sich Dein Problem nachvollziehen laesst.
$> cat Makefile SHELL = /bin/bash list: ; @echo ~ $> make list /home/thomas $>
Geht doch...
$ cat Makefile home:=$(shell getent passwd `id -u` | cut -d':' -f6) all: @echo "$(SHELL): $(HOME), $(home), $(wildcard ~), $(shell echo ~), ~," ~ $ for s in ash sh sash bash ksh zsh tcsh; do make SHELL="/bin/$s"; done /bin/ash: /home/dh, /home/dh, /home/dh, ~, ~, ~ /bin/sh: /home/dh, /home/dh, /home/dh, ~, ~, /home/dh /bin/sash: /home/dh, /home/dh, /home/dh, /home/dh, ~, /home/dh /bin/bash: /home/dh, /home/dh, /home/dh, /home/dh, ~, /home/dh /bin/ksh: /home/dh, /home/dh, /home/dh, /home/dh, ~, /home/dh /bin/zsh: /home/dh, /home/dh, /home/dh, /home/dh, ~, /home/dh /bin/tcsh: /home/dh, /home/dh, /home/dh, /home/dh, ~, /home/dh Man sollte auch noch testen, wie es ist, wenn man HOME und/oder USER make mitgibt: make HOME="/root"; ( export HOME="/root"; make; ) $ ( export HOME="/root"; export USER="root"; \ for s in ash sh sash bash ksh zsh tcsh; do \ make SHELL="/bin/$s" ; done; ) /bin/ash: /root, /home/dh, /root, ~, ~, ~ /bin/sh: /root, /home/dh, /root, ~, ~, /root /bin/sash: /root, /home/dh, /root, /root, ~, /root /bin/bash: /root, /home/dh, /root, /root, ~, /root /bin/ksh: /root, /home/dh, /root, /root, ~, /root /bin/zsh: /root, /home/dh, /root, /root, ~, /root /bin/tcsh: /root, /home/dh, /root, /root, ~, /root [die "ksh" ist die pdksh, die "sh" die bash im sh-Modus] Verwendet man aber ~ zusammen mit einem Dateinamen mit z.B. Leerzeichen gibt's Aerger, wenn man ~ nicht quoten darf. Ja, es geht, aber nur ekelhaft. -dnh -- Für einen P 90 muß man in oecher.flohmarkt schon Gummibärchen *anbieten*, damit man ihn losbekommt. Die Welt ist nicht mehr ausgelegt für Unter-100-EUR- Rechner, daß heißt es hakt dann überall. Und ich darf das sagen: Meine Diplom- arbeit habe ich 2001 auf einem 486 mit DOS 5.0 geschrieben. -- Torsten Bronger
participants (2)
-
David Haller
-
Thomas Hertweck