[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Saving and restoring parameters
From: |
Boris Kolpackov |
Subject: |
Re: Saving and restoring parameters |
Date: |
20 Jan 2005 18:56:40 GMT |
User-agent: |
nn/6.6.5+RFC1522 |
Sensei <noone@nowhere.org> writes:
> all:
> OLD_CFLAGS=$CFLAGS
> OLD_CXXFLAGS=$CXXFLAGS
> OLD_LDFLAGS=$LDFLAGS
> export CFLAGS=""
> export CXXFLAGS=""
> export LDFLAGS=""
> @echo "CFLAGS:$(CFLAGS) CXXFLAGS:$(CXXFLAGS) LDFLAGS:$(LDFLAGS)"
> @./configure --prefix=$(CUR_DIR)
> @$(MAKE)
> @$(MAKE) install
> CFLAGS=OLD_CFLAGS
> CXXFLAGS=OLD_CXXFLAGS
> LDFLAGS=OLD_LDFLAGS
> @echo "CFLAGS:$(CFLAGS) CXXFLAGS:$(CXXFLAGS) LDFLAGS:$(LDFLAGS)"
>
GNU make executes each line in a separate shell. Therefore writing
something like 'export CFLAGS=""' in separate command line of a makefile
does not make much sense; the shell will execute 'export CFLAGS=""' and
exit, there won't be anything after that that will feel the effect.
-boris