diff --git a/distrib/Makefile-bin.in b/distrib/Makefile-bin.in
index f07aacc2beed705f0c7367b3f545edd8319fd8de..b47fad9c12ed445a7fc6d38d2d4bd14c3682bb5a 100644
--- a/distrib/Makefile-bin.in
+++ b/distrib/Makefile-bin.in
@@ -139,12 +139,12 @@ config-pkgs ::
 	   $(RM) bin/$(platform)/$(package)-$(version)/$$i.bak; \
 	   test -f bin/$(platform)/$(package)-$(version)/$$i && $(MV) bin/$(platform)/$(package)-$(version)/$$i bin/$(platform)/$(package)-$(version)/$$i.bak; \
 	   echo "#! $(PERL)"  		        		> bin/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"bindir='$(bindir)';"                        >> bin/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"libdir='$(real_libdir)';"                   >> bin/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"libexecdir='$(real_libdir)';"               >> bin/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"datadir='$(real_datadir)';"                 >> bin/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"SED='$(SED)';"		>> bin/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"RAWCPP='$(RAWCPP)';"		>> bin/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"bindir='$(bindir)';"                        >> bin/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"libdir='$(real_libdir)';"                   >> bin/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"libexecdir='$(real_libdir)';"               >> bin/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"datadir='$(real_datadir)';"                 >> bin/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"SED='$(SED)';"		>> bin/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"RAWCPP='$(RAWCPP)';"		>> bin/$(platform)/$(package)-$(version)/$$i ; \
 	   cat bin/$(platform)/$(package)-$(version)/$$i.prl   >> bin/$(platform)/$(package)-$(version)/$$i ; \
 	   $(CHMOD) $(BIN_PERMS) bin/$(platform)/$(package)-$(version)/$$i; \
 	   echo "Done."; \
@@ -154,12 +154,12 @@ config-pkgs ::
 	   $(RM) lib/$(platform)/$(package)-$(version)/$$i.bak; \
 	   test -f lib/$(platform)/$(package)-$(version)/$$i && $(MV) lib/$(platform)/$(package)-$(version)/$$i lib/$(platform)/$(package)-$(version)/$$i.bak; \
 	   echo "#! $(PERL)"                      > lib/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"bindir='$(bindir)';"          >> lib/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"libdir='$(real_libdir)';"     >> lib/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"libexecdir='$(real_libdir)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"datadir='$(real_datadir)';"   >> lib/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"SED='$(SED)';"		 >> lib/$(platform)/$(package)-$(version)/$$i ; \
-	   echo $$"RAWCPP='$(RAWCPP)';"		 >> lib/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"bindir='$(bindir)';"          >> lib/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"libdir='$(real_libdir)';"     >> lib/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"libexecdir='$(real_libdir)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"datadir='$(real_datadir)';"   >> lib/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"SED='$(SED)';"		 >> lib/$(platform)/$(package)-$(version)/$$i ; \
+	   echo '$$'"RAWCPP='$(RAWCPP)';"		 >> lib/$(platform)/$(package)-$(version)/$$i ; \
 	   cat lib/$(platform)/$(package)-$(version)/$$i.prl >> lib/$(platform)/$(package)-$(version)/$$i; \
 	   $(CHMOD) $(BIN_PERMS) lib/$(platform)/$(package)-$(version)/$$i; \
 	   echo "Done."; \
diff --git a/mk/target.mk b/mk/target.mk
index 39452e120827a452ad9ae4d80f8e8a60d2ace593..e32a4cc24e95534825ddb7dd7c385c0c8d5bf43b 100644
--- a/mk/target.mk
+++ b/mk/target.mk
@@ -479,10 +479,10 @@ ifneq "$(BIN_DIST)" "1"
 	@for i in $(INSTALL_SCRIPTS); do \
 	   $(RM) $$i.tmp; \
 	   echo "#! $(PERL)" > $$i.tmp ; \
-	   echo $$"bindir='$(bindir)';"                            >> $$i.tmp ; \
-	   echo $$"libdir='$(libdir)';"                            >> $$i.tmp ; \
-	   echo $$"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
-	   echo $$"datadir='$(datadir)';"                          >> $$i.tmp ; \
+	   echo '$$'"bindir='$(bindir)';"                            >> $$i.tmp ; \
+	   echo '$$'"libdir='$(libdir)';"                            >> $$i.tmp ; \
+	   echo '$$'"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
+	   echo '$$'"datadir='$(datadir)';"                          >> $$i.tmp ; \
 	   cat  $$i                                                >> $$i.tmp ; \
 	   echo $(INSTALL_PROGRAM) $(filter-out -s,$(INSTALL_OPTS)) $$i.tmp $(bindir)/$$i ;    \
 	   $(INSTALL_PROGRAM) $(filter-out -s,$(INSTALL_BIN_OPTS)) $$i.tmp $(bindir)/$$i ; \
@@ -508,10 +508,10 @@ ifneq "$(BIN_DIST)" "1"
 	@for i in $(INSTALL_LIB_SCRIPTS); do \
 	   $(RM) $$i.tmp; \
 	   echo "#! $(PERL)" > $$i.tmp ; \
-	   echo $$"bindir='$(bindir)';"                            >> $$i.tmp ; \
-	   echo $$"libdir='$(libdir)';"                            >> $$i.tmp ; \
-	   echo $$"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
-	   echo $$"datadir='$(datadir)';"                          >> $$i.tmp ; \
+	   echo '$$'"bindir='$(bindir)';"                            >> $$i.tmp ; \
+	   echo '$$'"libdir='$(libdir)';"                            >> $$i.tmp ; \
+	   echo '$$'"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
+	   echo '$$'"datadir='$(datadir)';"                          >> $$i.tmp ; \
 	   cat  $$i                                                >> $$i.tmp ; \
 	   echo $(INSTALL_PROGRAM) $(INSTALL_OPTS) $$i $(libdir) ;    \
 	   $(INSTALL_PROGRAM) $(INSTALL_OPTS) $$i.tmp $(libdir)/$$i ; \
@@ -537,10 +537,10 @@ ifneq "$(BIN_DIST)" "1"
 	@for i in $(INSTALL_LIBEXEC_SCRIPTS); do \
 	   $(RM) $$i.tmp; \
 	   echo "#! $(PERL)" > $$i.tmp ; \
-	   echo $$"bindir='$(bindir)';"                            >> $$i.tmp ; \
-	   echo $$"libdir='$(libdir)';"                            >> $$i.tmp ; \
-	   echo $$"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
-	   echo $$"datadir='$(datadir)';"                          >> $$i.tmp ; \
+	   echo '$$'"bindir='$(bindir)';"                            >> $$i.tmp ; \
+	   echo '$$'"libdir='$(libdir)';"                            >> $$i.tmp ; \
+	   echo '$$'"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
+	   echo '$$'"datadir='$(datadir)';"                          >> $$i.tmp ; \
 	   cat  $$i                                                >> $$i.tmp ; \
 	   echo $(INSTALL_PROGRAM) $(INSTALL_OPTS) $$i $(libexecdir) ;    \
 	   $(INSTALL_PROGRAM) $(INSTALL_OPTS) $$i.tmp $(libexecdir)/$$i ; \