[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] make
- Subject: [ale] make
- From: jheim at math.wisc.edu (John Heim)
- Date: Tue Oct 23 13:40:08 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?
- Follow-Ups:
- [ale] make
- From: ale_nospam at fayettedigital.com (Jim Lynch)