Hi, Maciej (Matchek) BliziĆski wrote:
> > probably has to with how /usr/bin/env and gmake are called. See this > > example: > > > > > /usr/bin/env -i FOO=bar /opt/csw/bin/gmake -f <( echo -e 'a:\n\t@if [ -n > > > "$(FOO)" ]; then echo "FOO has a value"; else echo "FOO has no value"; > > > fi' ) > FOO has a value > > > /usr/bin/env -i FOO=bar && /opt/csw/bin/gmake -f <( echo -e 'a:\n\t@if [ > > > -n "$(FOO)" ]; then echo "FOO has a value"; else echo "FOO has no value"; > > > fi' ) > FOO=bar > FOO has no value > > If line breaks in email get in the way: http://pastie.org/9191629 Yes line breaks made it difficult, thanks for the pastie. Essentially, you are saying I have a " &&" too much? the line should be then: . $(BUILD_PREFIX)/GNUstep/System/Library/Makefiles/GNUstep.sh && cd $(WO RKSRC) && /usr/bin/env -i $(BUILD_ENV) $(MAKE) . $(BUILD_PREFIX)/GNUstep/System/Library/Makefiles/GNUstep.sh && cd $(WO RKSRC) && /usr/bin/env -i $(INSTALL_ENV) $(MAKE) install I removed "&&" before $(MAKE): however in that case make fails because it apparently "looses" the environment sourced in GNUstep.sh [configure-modulated] complete for gnustep-base. . /opt/csw/GNUstep/System/Library/Makefiles/GNUstep.sh && cd work/build-isa-sparcv8plus/gnustep-base-1.24.6 && /usr/bin/env -i HOME="/home/multix" PATH="/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/bin:/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/bin:/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/sbin:/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/sbin:/opt/csw/bin:/home/multix/code/opencsw/.buildsys/v2/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin" LC_ALL="C" prefix="/opt/csw" exec_prefix="/opt/csw" bindir="/opt/csw/bin" sbindir="/opt/csw/sbin" libexecdir="/opt/csw/libexec" datadir="/opt/csw/share" sysconfdir="/etc/opt/csw" sharedstatedir="/opt/csw/share" localstatedir="/var/opt/csw" libdir="/opt/csw/lib" infodir="/opt/csw/share/info" lispdir="/opt/csw/share/emacs/site-lisp" includedir="/opt/csw/include" mandir="/opt/csw/share/man" docdir="/opt/csw/share/doc" sourcedir="/opt/csw/src" CPPFLAGS="-I/opt/csw/include" CFLAGS="-O2 -pipe -mcpu=v9 -Wa,-xarch=v8plus" CXXFLAGS="-O2 -pipe -mcpu=v9 -Wa,-xarch=v8plus" LDFLAGS="-mcpu=v9 -Wa,-xarch=v8plus -L/opt/csw/lib" FFLAGS="-O2 -pipe -mcpu=v9 -Wa,-xarch=v8plus" FCFLAGS="-O2 -pipe -mcpu=v9 -Wa,-xarch=v8plus" F77="/opt/csw/bin/gfortran-4.9" FC="/opt/csw/bin/gfortran-4.9" ASFLAGS="" OPTFLAGS="-O2 -pipe -mcpu=v9 -Wa,-xarch=v8plus" CC="/opt/csw/bin/gcc-4.9" CXX="/opt/csw/bin/g++-4.9" CC_HOME="/opt/csw" CC_VERSION="gcc version 4.9.0 (GCC) " CXX_VERSION="gcc version 4.9.0 (GCC) " GARCH="sparc" GAROSREL="5.10" GARPACKAGE="trunk" LD_OPTIONS="-R/opt/csw/lib/\$ISALIST -R/opt/csw/lib -B direct -z ignore" gmake /bin/sh: gnustep-config: not found GNUmakefile:29: GNUmakefile:30: Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config! GNUmakefile:31: Perhaps gnustep-make is not properly installed, GNUmakefile:32: so gnustep-config is not in your PATH. GNUmakefile:33: GNUmakefile:34: Your PATH is currently /home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/bin:/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/bin:/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/sbin:/home/multix/code/opencsw/gnustep-base/trunk/work/install-isa-sparcv8plus/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/sbin:/opt/csw/bin:/home/multix/code/opencsw/.buildsys/v2/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin this is becoming a makefile & shell battle! Substituting "&&" with ";" does no help, as your small example proves. I don't understand, the previous steps in the line are the same, why with "&&" the sourced environment from GNUstep.sh gets preserved and in the other case not :( Looking for examples in othe rpackages shows a plethora of solutions: 1) antiword/trunk/Makefile: (cd $(WORKSRC) && /usr/bin/env -i $(INSTALL_ENV) gmake -f Makefile.Solaris DESTDIR=$(DESTDIR) $(PARALLELMFLAGS) install) This is how you suggest, but it gives me troubles with my GNUstep.sh sourcing 2) autogen/trunk/Makefile: cd $(WORKSRC) && /usr/bin/env -i $(INSTALL_ENV) && $(MAKE) -C $(OBJDIR) $(INSTALL_ARGS) DESTDIR=$(DESTDIR) install This does it my current way, that is, by separating make with && and then DESTDIR=$(DESTDIR) the latter seems to be quite used, so perhaps it is fine to be left so. Riccardo
