use of make

Hi,

I am trying to use the make facility with qcc. Having no makefile in the
working directory and specifying the target, make works OK. However when I
create a makefile, as soon as I specify a target, make terminates with the
error message: missing separator. I have tried inserting and removing spaces
and tabs in all possible places in the target line but it always terminates
with the above error. Entering subsequnt lines such as a command line does
not change the error.

Anyone any ideas? I have run out.

Thanks for your help

Frans Weehuizen

FRANS a écrit :

Hi,

I am trying to use the make facility with qcc. Having no makefile in the
working directory and specifying the target, make works OK. However when I
create a makefile, as soon as I specify a target, make terminates with the
error message: missing separator. I have tried inserting and removing spaces
and tabs in all possible places in the target line but it always terminates
with the above error. Entering subsequnt lines such as a command line does
not change the error.

Anyone any ideas? I have run out.

Thanks for your help

Frans Weehuizen

Don’t know ! a Makefile could be:

all:
qcc -L/usr/local/lib -lany_lib -o test test.c


or:
SOURCE = test1.c test2.c

the previous line also could be: SOURCE=$(wildcard test*.c)

OBJECTS=$(SOURCE:c=o)
OBJECTS_TEST=$(SOURCE_TEST:c=o)

LIBS= any_lib

TARGETS=test

all: $(TARGETS)

test: $(OBJECTS)
$(CC) -o $@ $(OBJECTS)

clean:
rm -fr *.o $(TARGETS)



regards,
Alain.

FRANS <H.F.Weehuizen@massey.ac.nz> wrote:

Hi,

I am trying to use the make facility with qcc. Having no makefile in the
working directory and specifying the target, make works OK. However when I
create a makefile, as soon as I specify a target, make terminates with the
error message: missing separator. I have tried inserting and removing spaces
and tabs in all possible places in the target line but it always terminates
with the above error. Entering subsequnt lines such as a command line does
not change the error.

It is a SPACEs-vs-TAB problem. Does it print a line number where the problem
exists? ie.

‘Makefile:11: *** missing seperator. Stop’

Then make sure that the line whose number is printed in the error message (in
this case, line 11) begins with a TAB.

What editor are you using to create your Makefiles? (vi is a good editor)

Anyone any ideas? I have run out.

Best Regards,

Marcin


Regards,

Marcin

Thanks for your help

Frans Weehuizen

Hi,

Thanks for your help guys. Your suggestions put me on the right track. I was
using PhEdit. Using vi I found that it was putting an attribute block at
the end of the file in the form of a C style comment which caused make to
complain. I then messed around with PhEdit and found that the option ‘Save
and load styled text’ under Edit/Preferences must be unchecked for PhEdit to
produce a clean file for ‘make’.

Thanks again,

Frans

FRANS wrote in message <9k9qcc$jl$1@inn.qnx.com>…

Hi,

I am trying to use the make facility with qcc. Having no makefile in the
working directory and specifying the target, make works OK. However when I
create a makefile, as soon as I specify a target, make terminates with the
error message: missing separator. I have tried inserting and removing
spaces
and tabs in all possible places in the target line but it always terminates
with the above error. Entering subsequnt lines such as a command line does
not change the error.

Anyone any ideas? I have run out.

Thanks for your help

Frans Weehuizen