[GRASS-dev] [grass-code P][364] Tiny patch for building

code P item #364, was opened at 2007-04-07 13:09
Status: Open
Priority: 3
Submitted By: Francesco Lovergine (frankie)
Assigned to: Nobody (None)
Summary: Tiny patch for building
Patch status: None
Patch type: fix
GRASS component: build
GRASS version: 6.2
GRASS CVS checkout date, if applies (YYMMDD):

Initial Comment:
While building for debian, programming manual is generated in a second phase.
In the following case the 3 files are already present and read-only, so build fails.

diff -urNad grass-6.2.2~20070406~/scripts/r.in.wms/Makefile grass-6.2.2~20070406/scripts/r.in.wms/Makefile
--- grass-6.2.2~20070406~/scripts/r.in.wms/Makefile 2007-04-07 12:52:36.000000000 +0200
+++ grass-6.2.2~20070406/scripts/r.in.wms/Makefile 2007-04-07 12:54:38.000000000 +0200
@@ -6,4 +6,4 @@

default: script
        $(MKDIR) $(GISBASE)/etc/r.in.wms/
- cp r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/
+ cp -f r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=205&aid=364&group_id=21

grass-codep@wald.intevation.org wrote:

Initial Comment:
While building for debian, programming manual is generated in a second phase.
In the following case the 3 files are already present and read-only, so build fails.

diff -urNad grass-6.2.2~20070406~/scripts/r.in.wms/Makefile grass-6.2.2~20070406/scripts/r.in.wms/Makefile
--- grass-6.2.2~20070406~/scripts/r.in.wms/Makefile 2007-04-07 12:52:36.000000000 +0200
+++ grass-6.2.2~20070406/scripts/r.in.wms/Makefile 2007-04-07 12:54:38.000000000 +0200
@@ -6,4 +6,4 @@

default: script
        $(MKDIR) $(GISBASE)/etc/r.in.wms/
- cp r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/
+ cp -f r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/

This should use $(INSTALL) instead of "cp", e.g.

  for file in r.in.gdalwarp wms.request wms.download ; do $(INSTALL) $$file ; done

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

On Sat, Apr 07, 2007 at 12:43:26PM +0100, Glynn Clements wrote:

grass-codep@wald.intevation.org wrote:

> Initial Comment:
> While building for debian, programming manual is generated in a second phase.
> In the following case the 3 files are already present and read-only, so build fails.
>
>
>
> diff -urNad grass-6.2.2~20070406~/scripts/r.in.wms/Makefile grass-6.2.2~20070406/scripts/r.in.wms/Makefile
> --- grass-6.2.2~20070406~/scripts/r.in.wms/Makefile 2007-04-07 12:52:36.000000000 +0200
> +++ grass-6.2.2~20070406/scripts/r.in.wms/Makefile 2007-04-07 12:54:38.000000000 +0200
> @@ -6,4 +6,4 @@
>
> default: script
> $(MKDIR) $(GISBASE)/etc/r.in.wms/
> - cp r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/
> + cp -f r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/

This should use $(INSTALL) instead of "cp", e.g.

  for file in r.in.gdalwarp wms.request wms.download ; do $(INSTALL) $$file ; done

Submitted as

for file in r.in.gdalwarp wms.request wms.download ; do $(INSTALL) -m 755 $$file $(GISBASE)/etc/r.in.wms/ ; done

Markus

Markus Neteler wrote:

> > Initial Comment:
> > While building for debian, programming manual is generated in a second phase.
> > In the following case the 3 files are already present and read-only, so build fails.
> >
> >
> >
> > diff -urNad grass-6.2.2~20070406~/scripts/r.in.wms/Makefile grass-6.2.2~20070406/scripts/r.in.wms/Makefile
> > --- grass-6.2.2~20070406~/scripts/r.in.wms/Makefile 2007-04-07 12:52:36.000000000 +0200
> > +++ grass-6.2.2~20070406/scripts/r.in.wms/Makefile 2007-04-07 12:54:38.000000000 +0200
> > @@ -6,4 +6,4 @@
> >
> > default: script
> > $(MKDIR) $(GISBASE)/etc/r.in.wms/
> > - cp r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/
> > + cp -f r.in.gdalwarp wms.request wms.download $(GISBASE)/etc/r.in.wms/
>
> This should use $(INSTALL) instead of "cp", e.g.
>
> for file in r.in.gdalwarp wms.request wms.download ; do $(INSTALL) $$file ; done

Submitted as

for file in r.in.gdalwarp wms.request wms.download ; do $(INSTALL) -m 755 $$file $(GISBASE)/etc/r.in.wms/ ; done

FWIW, you don't need the "-m 755"; that's the default.

Use $(INSTALL_DATA) for files which shouldn't be made executable.

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