This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: the bash builtin command `if test -n
- To: chet at po dot CWRU dot Edu
- Subject: Re: the bash builtin command `if test -n
- From: "Earnie Boyd" <earnie_boyd at hotmail dot com>
- Date: Fri, 19 Sep 1997 13:07:54 PDT
- Cc: gnu-win32 at cygnus dot com
Thanks for the correction and the help Chet.
- \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------
>> I have been trying to build and install groff-1.11. I have found a
>> problem with the builtin command "if" with the following syntax:
>>
>> if test -n "$(tmac-wrap)"; then \
>> for m in $(tmac-wrap); do \
>> ...
>> done; \
>> fi
>>
>> bash aborts with "syntax error near unexpected token `;'"
>> ... `if test -n ""; then for m in ; do ...; done; fi
>>
>> bash shouldn't test the syntax of the "for" command since what is
>> being done is a test to see if the "for" command will execute
properly.
>
>That's not true. All sh-style shells parse entire commands before
>attempting to execute them.
>
>> In the mean time: Any ideas on how to easily modify the Makefile.sub
>> for the "tmac" subsystem to allow "make" to complete?
>
>Add a dummy argument before or after the $(tmac-wrap) in the for
>command, or do something like
>
>if test -n "$(tmac-wrap)"; then \
>TMAC_WRAP="$(tmac-wrap)" ; \
>for m in $$TMAC_WRAP; do \
>...
>done; \
>fi
>
>--
>``The lyf so short, the craft so long to lerne.'' - Chaucer
>
>Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".