[PATCH] bashisms prevent build in doc/Makefile

arielCo <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAMvU69+dv=Besuu5n68fN=sBFAcBHUiuxyhvODQq0Ss7UX-4jw@mail.gmail.com>
There are a few bash-isms in doc/Makefile.am that prevent build (which
specifies SHELL = /bin/sh). Things like " NAME=$$(echo $@ | sed
's/\..*$$//') ".

The attached patch fixes them (based on the tarball from
http://gitorious.org/freetds/freetds/trees/master). Maybe all
Makefiles should use /bin/sh?

Ariel Cornejo
+58·412·8083546

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
Makefile.am.patch (application/octet-stream, 1.3 KB)
--- doc/Makefile.am.orig	Wed Jun 19 20:07:55 2013
+++ doc/Makefile.am	Wed Jun 19 20:09:53 2013
@@ -150,7 +150,7 @@
 		cp $${SRCDOC}/userguide.css .; \
 	fi)
 # if still no joy, create a stub
-	@echo pwd is $$(pwd)
+	@echo pwd is $(pwd)
 	-ls -ld $$(dirname $@) $@
 	if test ! -r $@ ; then \
 		echo '$(UG_STUB)' > .index.htm && mv .index.htm $@; \
@@ -226,7 +226,7 @@
 	</tbody></tgroup></table>\n
 
 dblib.api.body ctlib.api.body odbc.api.body: $(srcdir)/api_status.txt
-	NAME=$$(echo $@ | sed 's/\..*$$//') && \
+	NAME=`echo $@ | sed 's/\..*$$//'` && \
 	sed -ne "/^$${NAME}[	]/ s!!<row><entry>!p" \
 			$(srcdir)/api_status.txt \
 		| sed 	-e's![	][	]*!</> <entry>!g' \
@@ -238,13 +238,13 @@
 odbc.api.sgml: odbc.api.body
 
 dblib.api.sgml ctlib.api.sgml odbc.api.sgml: 
-	NAME=$$(echo $@ | sed 's/\..*$$//') && \
+	NAME=`echo $@ | sed 's/\..*$$//'` && \
 	HEAD='$(API_TABLE_HEADING)' && \
 	if [ $${NAME} = dblib ]; then \
-		HEAD=$$(echo '$(API_TABLE_HEADING)' \
-			| sed 's!$(API_FUNC_COL)!$(API_DBLIB_FUNC_COLS)!'); \
+		HEAD=`echo '$(API_TABLE_HEADING)' \
+			| sed 's!$(API_FUNC_COL)!$(API_DBLIB_FUNC_COLS)!'`; \
 	fi && \
-	BODY=$$(cat $(@:.sgml=.body)) && \
+	BODY=`cat $(@:.sgml=.body)` && \
 	printf '$(API_PAGE_FMT)' $${NAME} $${NAME} "$${HEAD}" "$${BODY}"  > $@~
 	mv $@~ $@
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.