Operating System - HP-UX
1831999 Members
3057 Online
110034 Solutions
New Discussion

Re: about missing separator

 
SOLVED
Go to solution
xiandao
Occasional Advisor

about missing separator

I make c use Makefile in hp-ux 11.00
try to run the make and display follow error :
-------------------------------------------
Make: Must be a separator on rules line 35. Stop.
-------------------------------------------
My Makefile line :
-------------------------------------------
33 >HDRS = uyn_define.h $
34 > uyn_cmn.h
35 >INSTALL = /etc/install
36 >MAKEFILE = Makefile
-------------------------------------------

Compiler Environment : CC = /bin/cc

Can anyone be of any help?
12 REPLIES 12
Mark Grant
Honored Contributor

Re: about missing separator

Is your line 33 and line 34 supposed to have a newline in there?
Never preceed any demonstration with anything more predictive than "watch this"
Francisco J. Soler
Honored Contributor

Re: about missing separator

Hi,

I think the variable HDRS must be in a single line:

------------------
HDRS=uyn_define.h uyn_cmn.h
INSTALL=/etc/install
MAKEFILE=Makefile
--------------------

Frank.
Linux?. Yes, of course.
xiandao
Occasional Advisor

Re: about missing separator

if I use a single line,
it will be ok
but, some define like :
SYSHDRS = /usr/include/.unsupp/sys/_errno.h \
/usr/include/.unsupp/sys/_fcntl.h \
/usr/include/.unsupp/sys/_ioctl.h \
/usr/include/.unsupp/sys/_param.h \
/usr/include/.unsupp/sys/_signal.h \
/usr/include/.unsupp/sys/_types.h \
/usr/include/dce/cma.h \
/usr/include/dce/cma_config.h \
...
it's too long,
I heart can use a back slash character in the end of continuation line in Makefile like :
SRCS = \
file1.c \
file2.c

but why make failed on it
Manish Srivastava
Trusted Contributor

Re: about missing separator

Hi,

As I see it:

-------------------------------------------
33 >HDRS = uyn_define.h $
34 > uyn_cmn.h
35 >INSTALL = /etc/install
36 >MAKEFILE = Makefile
-------------------------------------------

in line 33 you have $ rather than \
If you place that then it should work.

manish
Mark Grant
Honored Contributor

Re: about missing separator

You can use a backslash character but two things, one the last line shouldn't have a backslash and secondly, as Manesh says, above, you seem to have a $ instead of a backslash.
Never preceed any demonstration with anything more predictive than "watch this"
xiandao
Occasional Advisor

Re: about missing separator

oh, yes, it's a mistake,
I'v changed $ to \
but, the same error still there : (
Mark Grant
Honored Contributor

Re: about missing separator

Make sure that with all of your statements that that are muti-line (have a backslash) do NOT have a backslash for the last line.
Never preceed any demonstration with anything more predictive than "watch this"
xiandao
Occasional Advisor

Re: about missing separator

I change the Makefile,
all contents in Makefile :
---------------------------------------
CC = /bin/cc
ALL_LIBS = $(DCELIB)
SUFFIX = .idl:sI .acf:sI
DEST = .
EXTHDRS =
HDRS = ncqs_define.h \
receiver.h
INSTALL = /etc/install
MAKEFILE = Makefile
---------------------------------------
then I run
#make
Make: Must be a separator on rules line 8. Stop.
Francisco J. Soler
Honored Contributor

Re: about missing separator

Hi,

after the backslash be sure there is nothing, no spaces at all.

Frank.
Linux?. Yes, of course.
Manish Srivastava
Trusted Contributor
Solution

Re: about missing separator

Hi,

I just wrote a small case like yours:

$ cat mk1
CC=/usr/bin/cc

HDRS=a.h\
b.h
src=a.c

main:
$(CC) -o main a.c


this works file but if I add few spaces or tabs after the "\" then I get the following error:

$ make -f mk1
Make: Must be a separator on rules line 5. Stop.


Just make sure that there is no space or tabs after the "\"

manish
xiandao
Occasional Advisor

Re: about missing separator

Great!Successed!
I edit the Makefile in Windows,
then use FTP transport to hp-ux,
because of a little difference of system character set,
In hp-ux, at the end of every line,
added a "^M",

appreciate everyone!
hongwei_1
New Member

Re: about missing separator

I got this kind of error all over the place when I try to build Xerces C++ parser on HP-UX 11. I can only use make instead gmake and I got Make: Must be a separator on rules line xx. Stop. Most likely it occurs when there is a ifeq command. Anyone can help? Thanks a lot.