Subject: 2.3.21 sed creating fvwmbug may fail

From: Will Partain <[email-masked]>
Date: Sun, 29 Jul 2001 16:44:20 +0100

The sed script creating fvwmbug may fail if you happen to
have CFLAGS including a comma, e.g. CFLAGS = -O -Wl,-R/usr/local/lib
I'm guessing it would be slightly safer to use '|' as
the delimiter.  Also, it's safer to remove the fvwmbug if
the sed fails than to leave it (typically zero-length) lying
around.  There may be other instances in the source where
similar paranoia would make sense.  Diffs below.  Regards,

Will

diff -ru1 ../fvwm-2.3.21/utils/Makefile.am ./utils/Makefile.am
--- ../fvwm-2.3.21/utils/Makefile.am	Mon May  8 09:26:56 2000
+++ ./utils/Makefile.am	Sun Jul 29 16:37:47 2001
@@ -49,6 +49,6 @@
 	BUILDER=$${USER-$${LOGNAME-`whoami`}} && \
-	sed -e 's,xCCx,$(CC),'  -e 's,xCFLAGSx,$(CFLAGS),' \
-	    -e 's,xprefixx,$(prefix),' -e 's,xdatadirx,$(datadir),' \
-	    -e 's,xlibexecdirx,$(libexecdir),' -e "s,xBUILDERx,$$BUILDER," \
-	    fvwmbug.sh > $@
+	sed -e 's|xCCx|$(CC)|'  -e 's|xCFLAGSx|$(CFLAGS)|' \
+	    -e 's|xprefixx|$(prefix)|' -e 's|xdatadirx|$(datadir)|' \
+	    -e 's|xlibexecdirx|$(libexecdir)|' -e "s|xBUILDERx|$$BUILDER|" \
+	    fvwmbug.sh > $@ || { /bin/rm -f $@ ; exit 1; }
 
diff -ru1 ../fvwm-2.3.21/utils/Makefile.in ./utils/Makefile.in
--- ../fvwm-2.3.21/utils/Makefile.in	Mon Sep  4 16:54:47 2000
+++ ./utils/Makefile.in	Sun Jul 29 16:37:52 2001
@@ -457,6 +457,6 @@
 	BUILDER=$${USER-$${LOGNAME-`whoami`}} && \
-	sed -e 's,xCCx,$(CC),'  -e 's,xCFLAGSx,$(CFLAGS),' \
-	    -e 's,xprefixx,$(prefix),' -e 's,xdatadirx,$(datadir),' \
-	    -e 's,xlibexecdirx,$(libexecdir),' -e "s,xBUILDERx,$$BUILDER," \
-	    fvwmbug.sh > $@
+	sed -e 's|xCCx|$(CC)|'  -e 's|xCFLAGSx|$(CFLAGS)|' \
+	    -e 's|xprefixx|$(prefix)|' -e 's|xdatadirx|$(datadir)|' \
+	    -e 's|xlibexecdirx|$(libexecdir)|' -e "s|xBUILDERx|$$BUILDER|" \
+	    fvwmbug.sh > $@ || { /bin/rm -f $@ ; exit 1; }
 
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 29 Jul 2001 23:36:42 +0000

> similar paranoia would make sense.  Diffs below.  Regards,

I will remove this Makefile rule, the second (manual) stage is not really
needed, everything may be done in the first (automatical) stage.

BTW, 2.3.21 is more than a year old, 2.4.0 is much better.

Regards,
Mikhael.