[Mailman-Users] mailman install problems (syntax error atline1: `; ' unexpected)

Mark Sapiro mark at msapiro.net
Sat Aug 7 17:13:15 CEST 2010


Stephen J. Turnbull wrote:

>Mark Sapiro writes:
> > CJ Keist wrote:
>
> > >I simply commented out the for p loop:
> > >
> > >         #for p in $(PACKAGES); \
>
> > That is a perfectly acceptable workaround, but the question is why
> > doesn't your make properly handle
> > 
> >    for p in   ; do ... ; done
>
>Because make doesn't (shouldn't) do anything with commands except
>substitute make variables, then pass them to the shell.  Bourne shells
>require the tokens following "in" to constitute a list.  The idiom for
>an empty list is the empty string.
>
>One way to handle this in GNU Make is
>
>ifeq($(PACKAGES),)
>PACKAGES = ""
>endif
>
>(Untested, IIRC -- the point is that make doesn't care about the
>quotation marks at all, so it passes the literal string '""' to the
>shell as the value of the make variable PACKAGES.)

I agree that the underlying issue is with the shell, but in at least
these bash versions:

GNU bash, version 3.2.49(22)-release (i686-pc-cygwin)

GNU bash, version 3.2.48(1)-release (i386-apple-darwin10.0)

GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu)

the construct

 for p in ; do echo Huh? $p ; done

is accepted and does nothing. Further, since 2.1.12, the 'normal' value
of PACKAGES in this Makefile is null, and this is the first report of
this problem I've seen.

If there are in fact versions of sh/bash that don't accept the "for p
in ;" construct, then I'd like to fix this in the Makefile, but I'd
like to have a way to a) see the failure, and b) test the fix.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list