[GRASS-SVN] r57774 - grass/branches/develbranch_6/vector/v.mapcalc
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 20 20:24:14 PDT 2013
Author: hamish
Date: 2013-09-20 20:24:14 -0700 (Fri, 20 Sep 2013)
New Revision: 57774
Modified:
grass/branches/develbranch_6/vector/v.mapcalc/Makefile
grass/branches/develbranch_6/vector/v.mapcalc/any.c
grass/branches/develbranch_6/vector/v.mapcalc/list.c
grass/branches/develbranch_6/vector/v.mapcalc/map.c
grass/branches/develbranch_6/vector/v.mapcalc/number.c
grass/branches/develbranch_6/vector/v.mapcalc/v.mapcalc.y
grass/branches/develbranch_6/vector/v.mapcalc/vector.c
Log:
merge some fixes from trunk, now it builds (if you run make twice)
Modified: grass/branches/develbranch_6/vector/v.mapcalc/Makefile
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/Makefile 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/Makefile 2013-09-21 03:24:14 UTC (rev 57774)
@@ -1,53 +1,72 @@
+
MODULE_TOPDIR = ../..
+
PGM = v.mapcalc
+EXTRA_HEADERS = v.mapcalc.tab.h
+EXTRA_CLEAN_FILES = v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output
+
+include $(MODULE_TOPDIR)/include/Make/Module.make
+
#CFLAGS = -g -Wall -Werror -rdynamic
-CFLAGS = -O2 -Wall -Werror -rdynamic
-LDFLAGS = -ldl -lm #-lefence
-YACC = bison
+#CFLAGS = -O2 -Wall -Werror -rdynamic
+#LDFLAGS = -ldl -lm #-lefence
#YACC = bison -t
-YACCFLAGS = -d
+YACCFLAGS += -b v.mapcalc
LIBES = $(VECTLIB) $(GISLIB)
DEPENDENCIES = $(VECTDEP) $(GISDEP)
EXTRA_INC = $(VECT_INC)
EXTRA_CFLAGS = $(VECT_CFLAGS)
-all: v.mapcalc
-v.mapcalc: mapcalc.o yylex.o v.mapcalc.o number.o vector.o map.o any.o \
- plugin.o list.o
- $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+default: cmd
-v.mapcalc.o: v.mapcalc.tab.c
- $(CC) $(CFLAGS) -o $@ -c $<
-
v.mapcalc.tab.c v.mapcalc.tab.h: v.mapcalc.y
$(YACC) $(YACCFLAGS) $<
-mapcalc.o: mapcalc.c list.h mapcalc.h number.h map.h plugin.h vector.h any.h
- $(CC) $(CFLAGS) -o $@ -c $<
+yylex.c: v.mapcalc.tab.h
-number.o: number.c list.h mapcalc.h
- $(CC) $(CFLAGS) -o $@ -c $<
+.INTERMEDIATE: v.mapcalc.tab.c v.mapcalc.tab.h v.mapcalc.output
-map.o: map.c list.h mapcalc.h map.h
- $(CC) $(CFLAGS) -o $@ -c $<
-any.o: any.c list.h mapcalc.h any.h
- $(CC) $(CFLAGS) -o $@ -c $<
-vector.o: vector.c list.h mapcalc.h vector.h
- $(CC) $(CFLAGS) -o $@ -c $<
+#all: v.mapcalc
+#
+#v.mapcalc: mapcalc.o yylex.o v.mapcalc.o number.o vector.o map.o any.o \
+# plugin.o list.o
+# $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+#
+#v.mapcalc.o: v.mapcalc.tab.c
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#v.mapcalc.tab.c v.mapcalc.tab.h: v.mapcalc.y
+# $(YACC) $(YACCFLAGS) $<
+#
+#mapcalc.o: mapcalc.c list.h mapcalc.h number.h map.h plugin.h vector.h any.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#number.o: number.c list.h mapcalc.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#map.o: map.c list.h mapcalc.h map.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#any.o: any.c list.h mapcalc.h any.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#vector.o: vector.c list.h mapcalc.h vector.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#plugin.o: plugin.c list.h mapcalc.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#yylex.o: yylex.c mapcalc.h yylex.h v.mapcalc.tab.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#list.o: list.c list.h
+# $(CC) $(CFLAGS) -o $@ -c $<
+#
+#clean:
+# rm -f *~ .*~ *.o v.mapcalc.tab.[ch] v.mapcalc
-plugin.o: plugin.c list.h mapcalc.h
- $(CC) $(CFLAGS) -o $@ -c $<
-
-yylex.o: yylex.c mapcalc.h yylex.h v.mapcalc.tab.h
- $(CC) $(CFLAGS) -o $@ -c $<
-
-list.o: list.c list.h
- $(CC) $(CFLAGS) -o $@ -c $<
-
-clean:
- rm -f *~ .*~ *.o v.mapcalc.tab.[ch] v.mapcalc
Modified: grass/branches/develbranch_6/vector/v.mapcalc/any.c
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/any.c 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/any.c 2013-09-21 03:24:14 UTC (rev 57774)
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
+#include <grass/glocale.h>
#include "list.h"
#include "mapcalc.h"
#include "any.h"
Modified: grass/branches/develbranch_6/vector/v.mapcalc/list.c
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/list.c 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/list.c 2013-09-21 03:24:14 UTC (rev 57774)
@@ -4,8 +4,9 @@
#include <time.h>
#if 0
#include <dmalloc.h>
+#endif
#include <grass/gis.h>
-#endif
+#include <grass/glocale.h>
#include "list.h"
LIST *listitem(size_t size);
Modified: grass/branches/develbranch_6/vector/v.mapcalc/map.c
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/map.c 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/map.c 2013-09-21 03:24:14 UTC (rev 57774)
@@ -18,6 +18,7 @@
#include <dirent.h>
#include <sys/stat.h>
#include <grass/gis.h>
+#include <grass/glocale.h>
#include "list.h"
#include "mapcalc.h"
#include "map.h"
@@ -189,7 +190,7 @@
map = (MAP *) sym->v.p;
if (map->name)
- sprintf(stdout, "\t%s\n", map->name);
+ fprintf(stdout, "\t%s\n", map->name);
}
void showmap(SYMBOL * sym)
Modified: grass/branches/develbranch_6/vector/v.mapcalc/number.c
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/number.c 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/number.c 2013-09-21 03:24:14 UTC (rev 57774)
@@ -3,6 +3,8 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
+#include <grass/gis.h>
+#include <grass/glocale.h>
#include "list.h"
#include "mapcalc.h"
Modified: grass/branches/develbranch_6/vector/v.mapcalc/v.mapcalc.y
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/v.mapcalc.y 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/v.mapcalc.y 2013-09-21 03:24:14 UTC (rev 57774)
@@ -69,7 +69,7 @@
| numexp '-' numexp { $$ = $1 - $3; }
| numexp '*' numexp { $$ = $1 * $3; }
| numexp '/' numexp { NOTZERO ($3); $$ = $1 / $3; }
- | '-' numexp %prec NEG { $$ = -$2 }
+ | '-' numexp %prec NEG { $$ = -$2; }
| numexp '^' numexp { NOTFRAC ($1, $3); $$ = pow ($1, $3); }
| numexp '%' numexp { NOTZERO ($3); $$ = fmod ($1, $3); }
| pntexp '%' pntexp { $$ = numop ('%', $1, $3); ERR; }
Modified: grass/branches/develbranch_6/vector/v.mapcalc/vector.c
===================================================================
--- grass/branches/develbranch_6/vector/v.mapcalc/vector.c 2013-09-21 03:03:10 UTC (rev 57773)
+++ grass/branches/develbranch_6/vector/v.mapcalc/vector.c 2013-09-21 03:24:14 UTC (rev 57774)
@@ -4,6 +4,7 @@
#include <string.h>
#include <math.h>
#include <grass/gis.h>
+#include <grass/glocale.h>
#include "list.h"
#include "mapcalc.h"
#include "vector.h"
More information about the grass-commit
mailing list