Skip to contentSkip to conversation

kbuild: specifying phony targets?

DISCUSSION Timur Tabi 2 participants 3 messages May 18, 2005 – May 20, 2005

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

I have a Makefile that works with 2.4 and 2.6 kernels. On the 2.4 side, I have a rule like this:

all: mytext ${TARGET_DIR} ${TARGET_DIR}/ccil.o

mytext:

    @echo ${SOMETEXT}

This causes the text in variable SOMETEXT to be displayed right when the build starts.

How do I do the same thing with kbuild? Is there a way I can get a kbuild makefile to run a phony target right at the beginning?

Signature · 7 lines
Timur Tabi
Staff Software Engineer
[email protected]

One thing a Southern boy will never say is,
"I don't think duct tape will fix it."
     -- Ed Smylie, NASA engineer for Apollo 13
#1 lore raw
Quoted 5 lines · Timur Tabi

I have a Makefile that works with 2.4 and 2.6 kernels. On the 2.4 side, I have a rule like this:

all: mytext ${TARGET_DIR} ${TARGET_DIR}/ccil.o

Quoted 8 lines

mytext:

    @echo ${SOMETEXT}

This causes the text in variable SOMETEXT to be displayed right when the build starts.

How do I do the same thing with kbuild? Is there a way I can get a kbuild makefile to run a phony target right at the beginning?

A phony target is not possible.
But use 'always' to tell kbuild what needs to be done. Se also kbuild documentation: Documentation/kbuild/makefile.txt

Sam

author
#2 lore raw
Quoted 3 lines · Sam Ravnborg

A phony target is not possible.
But use 'always' to tell kbuild what needs to be done. Se also kbuild documentation: Documentation/kbuild/makefile.txt

I added these lines to my makefile:

always := syscall

syscall:

        @echo ${SYSCALL_METHOD}

and I got this error:

make[3]: *** No rule to make target /root/AMSO1100/software/host/linux/sys/devccil/syscall', needed by __build'. Stop.

I need to specify a target that is NOT a file. How can I tell kbuild that my target isn't a file, but just a rule that needs to be run?

Signature · 7 lines
Timur Tabi
Staff Software Engineer
[email protected]

One thing a Southern boy will never say is,
"I don't think duct tape will fix it."
     -- Ed Smylie, NASA engineer for Apollo 13