On Jan 20 2006 Andre Massing <[EMAIL PROTECTED]> wrote: > Daniel Leidert schrieb: > >> >> >> echo $$OSTYPE >> >> ist wohl das, was du suchst. > > Ja, danke, das funktioniert, aber "leider" nur, weil nun die Shell, an der > die Zeile übergeben wird, die Variable expandiert (und nicht make direkt), > und die Shell ja OSTYPE kennt. Dennoch ist mir der Selektionsmechanismus, > den Make bezüglich meiner Shell-Variablen an den Tag legt, nicht klar ( im > Zusammenhang mit den von printenv und set gezeigten Variablen). > > [...]
Schau Dir mal die info-pages zu make an: 6.9 Variables from the Environment ================================== Variables in `make' can come from the environment in which `make' is run. Every environment variable that `make' sees when it starts up is transformed into a `make' variable with the same name and value. However, an explicit assignment in the makefile, or with a command argument, overrides the environment. (If the `-e' flag is specified, then values from the environment override assignments in the makefile. *Note Summary of Options: Options Summary. But this is not recommended practice.) [...] Wenn ich bei mir das teste: ~:1> cat makefile all: echo $(OSTYPE) ~:1> echo $OSTYPE linux-gnu ~:1> make echo ~:1> export OSTYPE ~:1> make echo linux-gnu linux-gnu ~:1> export OSTYPE=foo ~:1> make echo foo foo $OSTYPE wird von der Shell (bei mir bash) standardmäßig nicht exportiert. OSTYPE steht in bash(1) in der Liste der Shell Variables, da ist aber keine Aussage zu finden ob die exportiert sind oder nicht. ~:1> printenv | grep OSTYPE ~:1> export OSTYPE ~:1> printenv | grep OSTYPE OSTYPE=linux-gnu Hth -- Peter -- [EMAIL PROTECTED] ConSol* Software GmbH Phone +49 89 45841-100 Consulting & Solutions Mobile +49 177 6040121 Franziskanerstr. 38 http://www.consol.de D-81669 München -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject "unsubscribe". Probleme? Mail an [EMAIL PROTECTED] (engl)