Subject: RE: Make addity?
From: [email-masked] (Giles D. Malet)

3 Oct 1998 08:06:20 -0700
Message-ID: <[email-masked]>
To: [email-masked], [email-masked]
Cc: [email-masked]

> >     makefile:48: *** missing separator.  Stop.

As has already been mentioned, this is caused by there being no tabs
before rules in the Makefile, which an editor can cause if it has been
told to do the Wrong Thing (tm).

The problem I was writing about was something else. My memory of the
error message was faulty, and the following comments by Rick Rankin
got me to take a closer look.

> You need to make sure you tell NT-Emacs to save the file without the
> CRs [...] you can do this with
> M-x set-buffer-file-coding-system

This problem actually normally generates a message different to the
one above. This is what I see:

     Makefile:10: *** commands commence before first target.  Stop.

This is when the Makefile starts with something like:

FOO = bar \
      baz	# <-- this would be line 10

I realised I was only hiding this problem by mounting the filesystem
containing the Makefile as non-binary, and thus getting the cr/lf
translation done "for free". Closer investigation reveals that if I
mount the FS in binary mode, and allow nt-emacs to choose the coding
system, it chooses undecided-dos, or at least something that does not
translate cr/lf to the UNIX format, which is what the gmake I am
running requires (GNU Make version 3.75-B19, by Richard Stallman and
Roland McGrath.).

So I set the coding system to undecided-unix, as Rick suggested (after
remounting the FS as binary, which seems preferable), wrote the file,
reverted it, got rid of extra ^M's in the file (query-replace ^Q^M
with nothing), and the problem went away.

To make the change for the given file(s) permanent, without upsetting
other things, I put the following at the top of the Makefile (on the
first line):

      -*- mode:Makefile; coding:undecided-unix -*-

So it appears the root cause of my woes is that gmake on NT requires
UNIX line termination. Is this the general consensus? If so, we should
do something about getting it fixed.

gdm

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".