[ale] make
John Heim
jheim at math.wisc.edu
Tue Oct 23 13:40:08 EDT 2007
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?
More information about the Ale
mailing list