Browse code

- fixed ser.cfg module path rewritting - ser.cfg.default is no longer installed if ser.cfg does not exist

Andrei Pelinescu-Onciul authored on 03/06/2003 10:17:11
Showing 1 changed files
... ...
@@ -19,7 +19,11 @@
19 19
 #  2003-05-30  added extra_defs & EXTRA_DEFS
20 20
 #               Makefile.defs force-included to allow recursive make
21 21
 #               calls -- see comment (andrei)
22
-#  2003-06-02   make tar changes -- unpacks in $NAME-$RELEASE  (andrei)
22
+#  2003-06-02  make tar changes -- unpacks in $NAME-$RELEASE  (andrei)
23
+#  2003-06-03  make install-cfg will properly replace the module path
24
+#               in the cfg (re: /usr/.*lib/ser/modules)
25
+#              ser.cfg.default is installed only if there is a previous
26
+#               cfg. -- fixes packages containing ser.cfg.default (andrei)
23 27
 #
24 28
 
25 29
 auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
... ...
@@ -227,13 +231,14 @@ $(man-prefix)/$(man-dir)/man8:
227 231
 
228 232
 $(man-prefix)/$(man-dir)/man5:
229 233
 		mkdir -p $(man-prefix)/$(man-dir)/man5
230
-
234
+		
235
+# note: on solaris 8 sed: ? or \(...\)* (a.s.o) do not work
231 236
 install-cfg: $(cfg-prefix)/$(cfg-dir)
232
-		sed -e "s#/usr/lib/ser/modules/#$(modules-target)#g" \
237
+		sed -e "s#/usr/.*lib/ser/modules/#$(modules-target)#g" \
233 238
 			< etc/ser.cfg > $(cfg-prefix)/$(cfg-dir)ser.cfg.default
234 239
 		chmod 644 $(cfg-prefix)/$(cfg-dir)ser.cfg.default
235 240
 		if [ ! -f $(cfg-prefix)/$(cfg-dir)ser.cfg ]; then \
236
-			cp -p $(cfg-prefix)/$(cfg-dir)ser.cfg.default \
241
+			mv -f $(cfg-prefix)/$(cfg-dir)ser.cfg.default \
237 242
 				$(cfg-prefix)/$(cfg-dir)ser.cfg; \
238 243
 		fi
239 244
 #		$(INSTALL-CFG) etc/ser.cfg $(cfg-prefix)/$(cfg-dir)