summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-04-02 18:43:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:44 -0500
commit3655b4ba757a1db84063907ba9a2c157aef9bdbb (patch)
tree4e70d21db5871ceaa9f1cd1a495c9a9a12666c2d
parent8d525c81879fbc93f9d710ba7976f114588d7ffb (diff)
downloadsamba-3655b4ba757a1db84063907ba9a2c157aef9bdbb.tar.gz
samba-3655b4ba757a1db84063907ba9a2c157aef9bdbb.tar.bz2
samba-3655b4ba757a1db84063907ba9a2c157aef9bdbb.zip
r22040: Use $< to specify the immediate prerequisit instead of $*. This is
needed for VPATH to find the correct files when srcdir != builddir. This checkin is a test to see which platforms this change will break. (This used to be commit 1d4e836a50ffea452e688e25c2cae02a410247be)
-rw-r--r--source4/main.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/main.mk b/source4/main.mk
index 1d6e4ea858..fe7c1e57d8 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -377,23 +377,27 @@ include/includes.d: include/includes.h
# if it also exists. So better use $* which is foo/bar
# and append .c manually to get foo/bar.c
#
+# But if srcdir != builddir, $* does not contain the filename
+# that was found be traversing VPATH. So we are back to $<.
+# -- jpeach
+#
# Run a static analysis checker
CHECK = $(CC_CHECKER) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(CFLAGS) $(PICFLAG) -c $*.c -o $@
+ $(CFLAGS) $(PICFLAG) -c $< -o $@
# Run the configured compiler
COMPILE = $(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(CFLAGS) $(PICFLAG) -c $*.c -o $@
+ $(CFLAGS) $(PICFLAG) -c $< -o $@
# Run the compiler for the build host
HCOMPILE = $(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(HOSTCC_CFLAGS) -c $*.c -o $@
+ $(HOSTCC_CFLAGS) -c $< -o $@
# Precompile headers
PCHCOMPILE = @$(CC) -Ilib/replace \
`$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(CFLAGS) $(PICFLAG) -c $*.c -o $@
+ $(CFLAGS) $(PICFLAG) -c $< -o $@
.c.o:
@if test -n "$(CC_CHECKER)"; then \