Makefile issue

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
neonek
Member
Member
Posts: 38
Joined: Thu Aug 28, 2008 1:53 pm
Location: Białystok - Podlasie, Poland

Makefile issue

Post by neonek »

Hello ! I'm new to this board so hello all !
I've got a problem. I wrote makefile for my OS but it won't work. I had tested simple makefile:

Code: Select all

all:
	@echo Hello
It works but this makefile won't work:

Code: Select all

all:
	hello
hello:
	@echo Hello
I've got no idea why it won't work. Please help me.
Please correct my English. If you'll find mistake please tell me about it so I can improve my English.
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: Makefile issue

Post by cr2 »

What isn't working?
OS-LUX V0.0
Working on...
Memory management: the Pool
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: Makefile issue

Post by xyzzy »

Target dependencies must be on the same line as the target name (or on separate lines separated with a backslash). Try this:

Code: Select all

all: hello

hello:
	@echo Hello
Or this:

Code: Select all

all: \
	hello

hello:
	@echo Hello
neonek
Member
Member
Posts: 38
Joined: Thu Aug 28, 2008 1:53 pm
Location: Białystok - Podlasie, Poland

Re: Makefile issue

Post by neonek »

Thanks, AlexExtreme. My mistake.
Please correct my English. If you'll find mistake please tell me about it so I can improve my English.
Post Reply