[ale] make

Jim Lynch ale_nospam at fayettedigital.com
Tue Oct 23 14:01:04 EDT 2007


John Heim wrote:
> When using the percent sign in a makefile, how can I get just the part 
> represented by the percent sign in the command?
>
> %.o :  %.c
>    cc  -o $@ $<
>
> In the above example, if I say, 'make foo.o', then $@ expands to foo.o 
> and $< expands to foo.c. But what if i want just the 'foo' part? I'm 
> trying to make ldif files based on a uid. For instance, if I say 'make 
> jheim.ldif', I want it to make jheim.ldif by doing an ldap search for 
> "uid=jheim".
>
> %.ldif :
>    ldapsearch -LLL -x "uid=?" > $@
>
> But what goes in place of the question mark in the above rule?
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
It I understand your question correctly, $* will probably work for you.

Jim.



More information about the Ale mailing list