Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gawk in a makefile.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
StonedZealot
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2003
Posts: 90
Location: Rolla, Missouri

PostPosted: Fri Sep 16, 2005 4:06 am    Post subject: gawk in a makefile. Reply with quote

I'm trying to embed a simple gawk command into a makefile:

Code:
$(GAWK) '{print $5}'


But upon execution of the makefile, it nixes that $5 as one of it's own variables which is null, so it keeps spitting out a gawk command without that in there, which makes it totally useless (just prints everything).

How would I go about telling Make to ignore it or something of the ilk?
_________________
Bored and posting on the forums... life is rough.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Fri Sep 16, 2005 6:10 am    Post subject: Reply with quote

\$ ?
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
StonedZealot
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2003
Posts: 90
Location: Rolla, Missouri

PostPosted: Fri Sep 16, 2005 6:50 am    Post subject: Reply with quote

I tried that... gawk through an error because it resolved to "gawk '{print \}'" Not good.
_________________
Bored and posting on the forums... life is rough.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Fri Sep 16, 2005 7:52 am    Post subject: Reply with quote

Hmm, lets see how hard it is to find someone who has done this before...
Code:
find /usr/src/linux/ -type f | xargs grep --color=always -i fuck

Oops, I mean...
Code:
find /usr/src/linux/ -name Makefile | xargs grep --color=always -i awk.*print

Sorry, bad habit ;)
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
StonedZealot
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2003
Posts: 90
Location: Rolla, Missouri

PostPosted: Fri Sep 16, 2005 4:50 pm    Post subject: Reply with quote

Whoa, I never knew that the kernel devs used fuck so much...

In the meantime, you just hafta use $$ instead of $, it looks like.
I'll test it out when I get home.
_________________
Bored and posting on the forums... life is rough.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum