[GRASS-dev] configure.in: quotation marks

Hi,

what's the purpose of quotation marks around `$prefix`?

configure.in:

   166 INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
   168 INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"

the result is

Installation directory: ${prefix}/grass-7.0.svn

which is not really informative.

I would suggest to remove these quotation marks in configure.log.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Martin Landa wrote:

what's the purpose of quotation marks around `$prefix`?

configure.in:

   166 INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
   168 INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"

To prevent ${prefix} from being expanded in the resulting
Platform.make file.

the result is

Installation directory: ${prefix}/grass-7.0.svn

which is not really informative.

I would suggest to remove these quotation marks in configure.log.

The current behaviour is intentional; it allows e.g.
"make install prefix=..." to work as expected.

The fact that make variables can be overriden on the command line
is[1] a significant factor in how Makefiles are structured.

[1] At least, it /should/ be a factor. Whether or not it actually is
depends upon whether the Makefile's author "gets" make.

--
Glynn Clements <glynn@gclements.plus.com>

Hi,

2011/10/25 Glynn Clements <glynn@gclements.plus.com>:

To prevent ${prefix} from being expanded in the resulting
Platform.make file.

thanks for the clarification.

the result is

Installation directory: ${prefix}/grass-7.0.svn

which is not really informative.

I would suggest to remove these quotation marks in configure.log.

The current behaviour is intentional; it allows e.g.
"make install prefix=..." to work as expected.

OK, change bellow should harmless, right?

-LOC_MSG([ Installation directory: ${INSTDIR}])
+if test -n "$MACOSX_APP" ; then
+ LOC_MSG([ Installation directory:
${prefix}"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"])
+else
+ LOC_MSG([ Installation directory:
${prefix}"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"])
+fi
+

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Martin Landa wrote:

OK, change bellow should harmless, right?

I would prefer to just expand $INSTDIR:

--- configure.in~
+++ configure.in
@@ -1914,12 +1914,14 @@
     USE_TOGL="1"
fi

+INSTDIR_X=`eval echo "\"$INSTDIR\""`
+
LOC_MSG()
LOC_MSG([GRASS is now configured for: ${host}])
LOC_MSG()
LOC_MSG([ Source directory: ${SRCDIR}])
LOC_MSG([ Build directory: ${DSTDIR}])
-LOC_MSG([ Installation directory: ${INSTDIR}])
+LOC_MSG([ Installation directory: ${INSTDIR_X}])
LOC_MSG([ Startup script in directory: ${bindir}])
LOC_MSG([ C compiler: ${CC} ${CFLAGS}])
LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}])

--
Glynn Clements <glynn@gclements.plus.com>