Browse code

- fixed ONREPLY_ROUTE & FAILURE_ROUTE redefinition (same name in lex/yacc & sr_module.h) - dumbed down the make install part to work with the brain damaged solaris original install

Andrei Pelinescu-Onciul authored on 07/04/2003 16:44:06
Showing 4 changed files
... ...
@@ -177,9 +177,14 @@ install-cfg: $(cfg-prefix)/$(cfg-dir)
177 177
 #		$(INSTALL-CFG) etc/ser.cfg $(cfg-prefix)/$(cfg-dir)
178 178
 
179 179
 install-bin: $(bin-prefix)/$(bin-dir) utils/gen_ha1/gen_ha1
180
+		$(INSTALL-TOUCH) $(bin-prefix)/$(bin-dir)/ser 
180 181
 		$(INSTALL-BIN) ser $(bin-prefix)/$(bin-dir)
181
-		$(INSTALL-BIN) scripts/sc $(bin-prefix)/$(bin-dir)/serctl
182
+		$(INSTALL-TOUCH)   $(bin-prefix)/$(bin-dir)/sc
183
+		$(INSTALL-BIN) scripts/sc $(bin-prefix)/$(bin-dir)
184
+		mv -f $(bin-prefix)/$(bin-dir)/sc $(bin-prefix)/$(bin-dir)/serctl
185
+		$(INSTALL-TOUCH)   $(bin-prefix)/$(bin-dir)/ser_mysql.sh  
182 186
 		$(INSTALL-BIN) scripts/ser_mysql.sh  $(bin-prefix)/$(bin-dir)
187
+		$(INSTALL-TOUCH)   $(bin-prefix)/$(bin-dir)/gen_ha1
183 188
 		$(INSTALL-BIN) utils/gen_ha1/gen_ha1 $(bin-prefix)/$(bin-dir)
184 189
 
185 190
 utils/gen_ha1/gen_ha1:
... ...
@@ -188,27 +193,43 @@ utils/gen_ha1/gen_ha1:
188 188
 install-modules: modules $(modules-prefix)/$(modules-dir)
189 189
 	-@for r in $(modules_full_path) "" ; do \
190 190
 		if [ -n "$$r" ]; then \
191
-			$(INSTALL-MODULES)  $$r  $(modules-prefix)/$(modules-dir) ; \
191
+			if [ -f "$$r" ]; then \
192
+				$(INSTALL-TOUCH) \
193
+					$(modules-prefix)/$(modules-dir)/`basename "$$r"` ; \
194
+				$(INSTALL-MODULES)  "$$r"  $(modules-prefix)/$(modules-dir) ; \
195
+			else \
196
+				echo "ERROR: module $$r not compiled" ; \
197
+			fi ;\
192 198
 		fi ; \
193 199
 	done 
194 200
 
195 201
 
196 202
 install-doc: $(doc-prefix)/$(doc-dir)
197
-	$(INSTALL-DOC) README $(doc-prefix)/$(doc-dir)
203
+	$(INSTALL-TOUCH) $(doc-prefix)/$(doc-dir)/README.cfg 
198 204
 	$(INSTALL-DOC) README.cfg $(doc-prefix)/$(doc-dir)
205
+	$(INSTALL-TOUCH) $(doc-prefix)/$(doc-dir)/INSTALL 
199 206
 	$(INSTALL-DOC) INSTALL $(doc-prefix)/$(doc-dir)
207
+	$(INSTALL-TOUCH) $(doc-prefix)/$(doc-dir)/README-MODULES 
200 208
 	$(INSTALL-DOC) README-MODULES $(doc-prefix)/$(doc-dir)
209
+	$(INSTALL-TOUCH) $(doc-prefix)/$(doc-dir)/AUTHORS 
201 210
 	$(INSTALL-DOC) AUTHORS $(doc-prefix)/$(doc-dir)
202 211
 	-@for r in $(modules_basenames) "" ; do \
203 212
 		if [ -n "$$r" ]; then \
204 213
 			if [ -f modules/"$$r"/README ]; then \
214
+				$(INSTALL-TOUCH)  $(doc-prefix)/$(doc-dir)/README ; \
205 215
 				$(INSTALL-DOC)  modules/"$$r"/README  \
206
-									$(doc-prefix)/$(doc-dir)/README."$$r" ; \
216
+									$(doc-prefix)/$(doc-dir)/README ; \
217
+				mv -f $(doc-prefix)/$(doc-dir)/README \
218
+						$(doc-prefix)/$(doc-dir)/README."$$r" ; \
207 219
 			fi ; \
208 220
 		fi ; \
209 221
 	done 
222
+	$(INSTALL-TOUCH) $(doc-prefix)/$(doc-dir)/README 
223
+	$(INSTALL-DOC) README $(doc-prefix)/$(doc-dir)
210 224
 
211 225
 install-man: $(man-prefix)/$(man-dir)/man8 $(man-prefix)/$(man-dir)/man5
226
+	$(INSTALL-TOUCH)  $(man-prefix)/$(man-dir)/man8/ser.8 
212 227
 	$(INSTALL-MAN)  ser.8 $(man-prefix)/$(man-dir)/man8
228
+	$(INSTALL-TOUCH)  $(man-prefix)/$(man-dir)/man5/ser.cfg.5 
213 229
 	$(INSTALL-MAN)  ser.cfg.5 $(man-prefix)/$(man-dir)/man5
214 230
 
... ...
@@ -79,6 +79,8 @@ INSTALL ?= install
79 79
 TAR ?= tar
80 80
 endif
81 81
 
82
+INSTALL-TOUCH = touch          # used to create the file first (good to 
83
+                               #  make solaris install work)
82 84
 # INSTALL-CFG = $(INSTALL) -m 644
83 85
 INSTALL-BIN = $(INSTALL) -m 755
84 86
 INSTALL-MODULES = $(INSTALL) -m 755
... ...
@@ -79,8 +79,8 @@ SEND_TCP	send_tcp
79 79
 LOG		log
80 80
 ERROR	error
81 81
 ROUTE	route
82
-FAILURE_ROUTE failure_route
83
-ONREPLY_ROUTE onreply_route
82
+ROUTE_FAILURE failure_route
83
+ROUTE_ONREPLY onreply_route
84 84
 EXEC	exec
85 85
 SETFLAG		setflag
86 86
 RESETFLAG	resetflag
... ...
@@ -212,8 +212,10 @@ EAT_ABLE	[\ \t\b\r]
212 212
 <INITIAL>{ISFLAGSET}	{ count(); yylval.strval=yytext; return ISFLAGSET; }
213 213
 <INITIAL>{LEN_GT}	{ count(); yylval.strval=yytext; return LEN_GT; }
214 214
 <INITIAL>{ROUTE}	{ count(); yylval.strval=yytext; return ROUTE; }
215
-<INITIAL>{ONREPLY_ROUTE}	{ count(); yylval.strval=yytext; return ONREPLY_ROUTE; }
216
-<INITIAL>{FAILURE_ROUTE}	{ count(); yylval.strval=yytext; return FAILURE_ROUTE; }
215
+<INITIAL>{ROUTE_ONREPLY}	{ count(); yylval.strval=yytext;
216
+								return ROUTE_ONREPLY; }
217
+<INITIAL>{ROUTE_FAILURE}	{ count(); yylval.strval=yytext;
218
+								return ROUTE_FAILURE; }
217 219
 <INITIAL>{EXEC}	{ count(); yylval.strval=yytext; return EXEC; }
218 220
 <INITIAL>{SET_HOST}	{ count(); yylval.strval=yytext; return SET_HOST; }
219 221
 <INITIAL>{SET_HOSTPORT}	{ count(); yylval.strval=yytext; return SET_HOSTPORT; }
... ...
@@ -107,8 +107,8 @@ int rt;  /* Type of route block for find_export */
107 107
 %token LOG_TOK
108 108
 %token ERROR
109 109
 %token ROUTE
110
-%token FAILURE_ROUTE
111
-%token ONREPLY_ROUTE
110
+%token ROUTE_FAILURE
111
+%token ROUTE_ONREPLY
112 112
 %token EXEC
113 113
 %token SET_HOST
114 114
 %token SET_HOSTPORT
... ...
@@ -466,7 +466,7 @@ route_stm:  ROUTE LBRACE actions RBRACE { push($3, &rlist[DEFAULT_RT]); }
466 466
 		| ROUTE error { yyerror("invalid  route  statement"); }
467 467
 	;
468 468
 
469
-failure_route_stm: FAILURE_ROUTE LBRACK NUMBER RBRACK LBRACE actions RBRACE {
469
+failure_route_stm: ROUTE_FAILURE LBRACK NUMBER RBRACK LBRACE actions RBRACE {
470 470
 										if (($3<FAILURE_RT_NO)&&($3>=1)){
471 471
 											push($6, &failure_rlist[$3]);
472 472
 										} else {
... ...
@@ -474,10 +474,10 @@ failure_route_stm: FAILURE_ROUTE LBRACK NUMBER RBRACK LBRACE actions RBRACE {
474 474
 												"table number");
475 475
 											YYABORT; }
476 476
 										}
477
-		| FAILURE_ROUTE error { yyerror("invalid failure_route statement"); }
477
+		| ROUTE_FAILURE error { yyerror("invalid failure_route statement"); }
478 478
 	;
479 479
 
480
-onreply_route_stm: ONREPLY_ROUTE LBRACK NUMBER RBRACK LBRACE actions RBRACE {
480
+onreply_route_stm: ROUTE_ONREPLY LBRACK NUMBER RBRACK LBRACE actions RBRACE {
481 481
 										if (($3<ONREPLY_RT_NO)&&($3>=1)){
482 482
 											push($6, &onreply_rlist[$3]);
483 483
 										} else {
... ...
@@ -485,7 +485,7 @@ onreply_route_stm: ONREPLY_ROUTE LBRACK NUMBER RBRACK LBRACE actions RBRACE {
485 485
 												"table number");
486 486
 											YYABORT; }
487 487
 										}
488
-		| ONREPLY_ROUTE error { yyerror("invalid failure_route statement"); }
488
+		| ROUTE_ONREPLY error { yyerror("invalid failure_route statement"); }
489 489
 	;
490 490
 /*
491 491
 rules:	rules rule { push($2, &$1); $$=$1; }