[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] make
- Subject: [ale] make
- From: ale_nospam at fayettedigital.com (Jim Lynch)
- Date: Tue Oct 23 14:01:04 2007
- In-reply-to: <03f601c8159b$ba6b0870$4ba65c90@vv507j>
- References: <03f601c8159b$ba6b0870$4ba65c90@vv507j>
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.
- Follow-Ups:
- [ale] make
- From: jheim at math.wisc.edu (John Heim)
- References:
- [ale] make
- From: jheim at math.wisc.edu (John Heim)