'a=b c=$a; echo $c' doesn't necessarily prints "b", '' vs. "", $s in
Makefiles... I suppose it wasn't tested very much...
diff --git a/Makefile.shared b/Makefile.shared
index fad2fd1..c8b0bf6 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -112,7 +112,7 @@
 
 DO_GNU=$(CALC_VERSIONS); \
 	SHLIB=lib$(LIBNAME).so \
-	SHLIB_SUFFIX= \
+	SHLIB_SUFFIX= ; \
 	LIBDEPS="$(LIBDEPS) -lc" \
 	ALLSYMSFLAGS='-Wl,--whole-archive' \
 	NOALLSYMSFLAGS='-Wl,--no-whole-archive' \
@@ -135,10 +135,10 @@
 	SHAREDFLAGS="-dynamiclib" \
 	SHAREDCMD='$(CC)'; \
 	if [ -n "$(LIBVERSION)" ]; then \
-		SHAREDFLAGS="$SHAREDFLAGS -current_version $(LIBVERSION)"; \
+		SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
 	fi; \
 	if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
-		SHAREDFLAGS="$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
+		SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
 	fi; \
 	$(LINK_SO_O)
 link_a.darwin:
@@ -151,10 +151,10 @@
 	SHAREDFLAGS="-dynamiclib" \
 	SHAREDCMD='$(CC)'; \
 	if [ -n "$(LIBVERSION)" ]; then \
-		SHAREDFLAGS="$SHAREDFLAGS -current_version $(LIBVERSION)"; \
+		SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
 	fi; \
 	if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
-		SHAREDFLAGS="$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
+		SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
 	fi; \
 	$(LINK_SO_A)
 
@@ -195,14 +195,14 @@
 			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 		else \
 			SHLIB_HIST="$(LIBVERSION)"; \
-		fi
+		fi; \
 		SHLIB_SOVER= \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='-none' \
 		SHAREDFLAGS="-shared" \
 		SHAREDCMD='$(CC)'; \
 		if [ -n "$$SHLIB_HIST" ]; then \
-			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
+			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 		fi; \
 	fi; \
 	$(LINK_SO_O)
@@ -218,14 +218,14 @@
 			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 		else \
 			SHLIB_HIST="$(LIBVERSION)"; \
-		fi
+		fi; \
 		SHLIB_SOVER= \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='-none' \
 		SHAREDFLAGS="-shared" \
 		SHAREDCMD='$(CC)'; \
 		if [ -n "$$SHLIB_HIST" ]; then \
-			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
+			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 		fi; \
 	fi; \
 	$(LINK_SO_A)
@@ -244,14 +244,14 @@
 			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 		else \
 			SHLIB_HIST="$(LIBVERSION)"; \
-		fi
+		fi; \
 		SHLIB_SOVER= \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='-none' \
 		SHAREDFLAGS="-shared -msym" \
 		SHAREDCMD='$(CC)'; \
 		if [ -n "$$SHLIB_HIST" ]; then \
-			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
+			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 		fi; \
 	fi; \
 	$(LINK_SO_O)
@@ -267,14 +267,14 @@
 			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 		else \
 			SHLIB_HIST="$(LIBVERSION)"; \
-		fi
+		fi; \
 		SHLIB_SOVER= \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='-none' \
 		SHAREDFLAGS="-shared -msym" \
 		SHAREDCMD='$(CC)'; \
 		if [ -n "$$SHLIB_HIST" ]; then \
-			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
+			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 		fi; \
 	fi; \
 	$(LINK_SO_A)
@@ -293,14 +293,14 @@
 			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 		else \
 			SHLIB_HIST="$(LIBVERSION)"; \
-		fi
+		fi; \
 		SHLIB_SOVER= \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='-none' \
 		SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)" \
 		SHAREDCMD='$(CC)'; \
 		if [ -n "$$SHLIB_HIST" ]; then \
-			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
+			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 		fi; \
 	fi; \
 	$(LINK_SO_O)
@@ -316,14 +316,14 @@
 			SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
 		else \
 			SHLIB_HIST="$(LIBVERSION)"; \
-		fi
+		fi; \
 		SHLIB_SOVER= \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='-none' \
 		SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)" \
 		SHAREDCMD='$(CC)'; \
 		if [ -n "$$SHLIB_HIST" ]; then \
-			SHAREDFLAGS="$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
+			SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
 		fi; \
 	fi; \
 	$(LINK_SO_A)
@@ -336,11 +336,11 @@
 		MINUSZ='-z '; \
 		(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 		SHLIB=lib$(LIBNAME).so \
-		SHLIB_SUFFIX= \
+		SHLIB_SUFFIX= ; \
 		LIBDEPS="$(LIBDEPS) -lc" \
 		ALLSYMSFLAGS="$${MINUSZ}allextract" \
 		NOALLSYMSFLAGS="$${MINUSZ}defaultextract" \
-		SHAREDFLAGS='-G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+		SHAREDFLAGS="-G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 		SHAREDCMD='$(CC)'; \
 	fi; \
 	$(LINK_SO_O)
@@ -352,11 +352,11 @@
 		MINUSZ='-z '; \
 		(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
 		SHLIB=lib$(LIBNAME).so \
-		SHLIB_SUFFIX= \
+		SHLIB_SUFFIX= ;\
 		LIBDEPS="$(LIBDEPS) -lc" \
 		ALLSYMSFLAGS="$${MINUSZ}allextract" \
 		NOALLSYMSFLAGS="$${MINUSZ}defaultextract" \
-		SHAREDFLAGS='-G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+		SHAREDFLAGS="-G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 		SHAREDCMD='$(CC)'; \
 	fi; \
 	$(LINK_SO_A)
@@ -369,11 +369,11 @@
 	else \
 		$(CALC_VERSIONS); \
 		SHLIB=lib$(LIBNAME).so \
-		SHLIB_SUFFIX= \
+		SHLIB_SUFFIX= ; \
 		LIBDEPS="$(LIBDEPS) -lc" \
 		ALLSYMSFLAGS='-z allextract' \
 		NOALLSYMSFLAGS='' \
-		SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+		SHAREDFLAGS="-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 		SHAREDCMD='$(CC)'; \
 	fi; \
 	$(LINK_SO_O)
@@ -383,11 +383,11 @@
 	else \
 		$(CALC_VERSIONS); \
 		SHLIB=lib$(LIBNAME).so \
-		SHLIB_SUFFIX= \
+		SHLIB_SUFFIX= ; \
 		LIBDEPS="$(LIBDEPS) -lc" \
 		ALLSYMSFLAGS='-z allextract' \
 		NOALLSYMSFLAGS='' \
-		SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+		SHAREDFLAGS="-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 		SHAREDCMD='$(CC)'; \
 	fi; \
 	$(LINK_SO_A_UNPACKED)
@@ -398,11 +398,11 @@
 	else \
 		$(CALC_VERSIONS); \
 		SHLIB=lib$(LIBNAME).so \
-		SHLIB_SUFFIX= \
+		SHLIB_SUFFIX= ; \
 		LIBDEPS="$(LIBDEPS) -lc" \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='' \
-		SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+		SHAREDFLAGS="-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 		SHAREDCMD='$(CC)'; \
 	fi; \
 	$(LINK_SO_O)
@@ -412,11 +412,11 @@
 	else \
 		$(CALC_VERSIONS); \
 		SHLIB=lib$(LIBNAME).so \
-		SHLIB_SUFFIX= \
+		SHLIB_SUFFIX= ; \
 		LIBDEPS="$(LIBDEPS) -lc" \
 		ALLSYMSFLAGS='-all' \
 		NOALLSYMSFLAGS='' \
-		SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+		SHAREDFLAGS="-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 		SHAREDCMD='$(CC)'; \
 	fi; \
 	$(LINK_SO_A)
@@ -434,21 +434,21 @@
 link_o.hpux32:
 	@ $(CALC_VERSIONS); \
 	SHLIB=lib$(LIBNAME).sl \
-	SHLIB_SUFFIX= \
+	SHLIB_SUFFIX= ; \
 	LIBDEPS="$(LIBDEPS) -lc" \
 	ALLSYMSFLAGS='-Fl' \
 	NOALLSYMSFLAGS='' \
-	SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+	SHAREDFLAGS="+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 	SHAREDCMD='/usr/ccs/bin/ld'; \
 	$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 link_a.hpux32:
 	@ $(CALC_VERSIONS); \
 	SHLIB=lib$(LIBNAME).sl \
-	SHLIB_SUFFIX= \
+	SHLIB_SUFFIX= ; \
 	LIBDEPS="$(LIBDEPS) -lc" \
 	ALLSYMSFLAGS='-Fl' \
 	NOALLSYMSFLAGS='' \
-	SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+	SHAREDFLAGS="+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 	SHAREDCMD='/usr/ccs/bin/ld'; \
 	$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 
@@ -463,28 +463,28 @@
 link_o.hpux64:
 	@ $(CALC_VERSIONS); \
 	SHLIB=lib$(LIBNAME).sl \
-	SHLIB_SUFFIX= \
+	SHLIB_SUFFIX= ; \
 	LIBDEPS="$(LIBDEPS) -lc" \
 	ALLSYMSFLAGS='+forceload' \
 	NOALLSYMSFLAGS='' \
-	SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+	SHAREDFLAGS="-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 	SHAREDCMD='/usr/ccs/bin/ld'; \
 	$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 link_a.hpux64:
 	@ $(CALC_VERSIONS); \
 	SHLIB=lib$(LIBNAME).sl \
-	SHLIB_SUFFIX= \
+	SHLIB_SUFFIX= ; \
 	LIBDEPS="$(LIBDEPS) -lc" \
 	ALLSYMSFLAGS='+forceload' \
 	NOALLSYMSFLAGS='' \
-	SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
+	SHAREDFLAGS="-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
 	SHAREDCMD='/usr/ccs/bin/ld'; \
 	$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
 
 link_o.aix:
 	@ $(CALC_VERSIONS); \
 	SHLIB=lib$(LIBNAME).so \
-	SHLIB_SUFFIX= \
+	SHLIB_SUFFIX= ; \
 	LIBDEPS="$(LIBDEPS) -lc" \
 	ALLSYMSFLAGS='-bnogc' \
 	NOALLSYMSFLAGS='' \