A problem about "make"

Hi Everybody:
I have got a program which contains a Makefile,when i enter “make”,
it shows :
***:missing separator
I’ve no idea about that.
And i enter “vi Makefile”,it looks something wrong at the sentence:
.include <bsd.prog.mk>
Could somebody tell me what’s the problem?
I’m a new learner,and the program executed at QNX6.2.1

PS:I wish you can know what i mean , my english is not good enough, thanks verymuch.

I think this might suggest that the problem is inside the bsd.prog.mk file.

I don’t beleive .include <bsd.prog.mk> is a valid gnu make statement. In case it is, make is very sensitive to tab versus space and it must have Unix line termination and not Windows line termination. Use textto to convert line termination to be on the safe side.

thanks very much , i think so.

Could you tell me where can i find that file?

thanks for reply.

Do you mean textto -c|l|r [-z] Makefile?

When i use textto -l Makefile , it still shows ***:missing separator

But when i use textto r Makefile , it shows ***:No targets

What does it mean?

It means that textto -r is really the wrong thing, and you should stick with -l. It also means you have spaces in your Makefile where you should have tabs. This was a big problem when moving makefiles from 4.22 and earlier to 4.23 and later.

Generally, after a rule you need tabs, like so:

CC=qcc
LIB_FLAGS=-lm
CC_FLAGS=-g -O -Wall 

myprog:
<1 TAB STARTS THIS LINE>$(CC) -o $@ myprog.c $(CC_FLAGS) $(LIB_FLAGS)

You see the error message you’re getting if you start that line after the colon with a space instead of a tab.

-James Ingaham
Sage Automation, Inc.

Thanks very much,i will check it.

But someone told me ,the program can’t be executed in QNX,it should be used in BSD or sth,is that right?

I don’t understand the sentence. Making some guesses as to the meaning of it, I don’t know enough about the problem to answer intelligently.

-James Ingraham
Sage Automation, Inc.

P.S. Don’t you love how even when I have nothing to say I manage to keep talking? :slight_smile:

I’ve executed the program under linux and the same problem.

Maybe the program i got is not under QNX.

Can you post your makefile?

oh, I’m sorry to forget post “Makefile”

This makefile as is cannot work on QNX6 it’s setup to work with a very specific compiler. That tells me you don’t really know what a makefile does or you would have figure it out by yourself pretty early.

It also probably mean that this program cannot be compile with some major rework as it seems to depend on certain library ( like -lio ) that don’t exists under QNX6.

Thanks very much!

Sorry to waste your time, i need to learn a lot.