[GRASS-dev] [bug #4758] (grass) Guarrantee that ${ARCH_DISTDIR} exists before writing to it.

this bug's URL: http://intevation.de/rt/webrt?serial_num=4758
-------------------------------------------------------------------------

Subject: Guarrantee that ${ARCH_DISTDIR} exists before writing to it.

Platform: other
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.0.2

Under some conditions when building from source the directory ${ARCH_DISTDIR} may not exist. If this occurs, the make target 'builddemolocation' will fail. The following patch will guarrantee that the appropriate directory exists; if it already exists, the effect is unchanged from the current behavior.

--- Makefile.orig 2006-01-04 16:45:32.000000000 +0000
+++ Makefile 2006-06-27 22:43:37.000000000 +0000
@@ -328,6 +328,7 @@
GISRCFILE = ${ARCH_DISTDIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS\
_VERSION_MINOR}

builddemolocation:
+ @[ -d ${ARCH_DISTDIR} ] || ${MAKE_DIR_CMD} ${ARCH_DISTDIR}
        -tar cBf - demolocation | (cd ${ARCH_DISTDIR}/ ; tar xBfo - ) 2>/dev/nu\
ll
        @ echo "GISDBASE: ${ARCH_DISTDIR}" > ${GISRCFILE}
        @ echo "LOCATION_NAME: demolocation" >> ${GISRCFILE}

-------------------------------------------- Managed by Request Tracker