Bug 2623 - source/Makefile.in is broken
source/Makefile.in is broken
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.13
All Solaris
: P3 regression
: none
Assigned To: Tim Potter
Samba QA Contact
:
: 2224 2630 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-17 05:40 UTC by Jörg Schilling
Modified: 2005-08-24 10:16 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Schilling 2005-04-17 05:40:01 UTC
The Samba Makefile contains illegal usage for the dynamic
make macros '$<' and '$*' inside the commands for explicit rules.

The POSIX standard clearly states that the replacement 
text for these macros is undefined in case that no
inference rule but an explitit rule is evaluated.

Here is the fix:


--- Makefile.in~        Fr Mär 11 14:47:02 2005
+++ Makefile.in So Apr 17 14:37:53 2005
@@ -771,29 +771,29 @@
 
 dynconfig.o: dynconfig.c Makefile
        @echo Compiling $*.c
-       @$(CC) $(FLAGS) $(PATH_FLAGS) -c $< -o $@ 
+       @$(CC) $(FLAGS) $(PATH_FLAGS) -c dynconfig.c -o $@ 
 
 dynconfig.@PICSUFFIX@: dynconfig.c Makefile
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
        @echo Compiling $*.c with @PICFLAGS@
-       @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAGS@ -c $< -o
$*.@PICSUFFIX@
+       @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAGS@ -c dynconfig.c
-o $@
 @BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.@PICSUFFIX@$$%.o%'` $@
 
 lib/version.o: lib/version.c include/version.h
        @echo Compiling $*.c
-       @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $< -o $@ 
+       @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c lib/version.c -o $@ 
 
 lib/version.@PICSUFFIX@: lib/version.c include/version.h
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
        @echo Compiling $*.c with @PICFLAGS@
-       @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAGS@ -c $< -o
$*.@PICSUFFIX@
+       @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAGS@ -c
lib/version.c -o $@
 @BROKEN_CC@    -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.@PICSUFFIX@$$%.o%'` $@
 
 smbd/build_options.o: smbd/build_options.c Makefile include/config.h
include/build_env.h include/proto.h
        @echo Compiling $*.c
-       @$(CC) $(FLAGS) $(PATH_FLAGS) -c $< -o $@
+       @$(CC) $(FLAGS) $(PATH_FLAGS) -c smbd/build_options.c -o $@
 
 smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
        @echo Generating $@
Comment 1 Lars Müller 2005-04-20 04:43:36 UTC
*** Bug 2630 has been marked as a duplicate of this bug. ***
Comment 2 Tim Potter 2005-04-20 18:41:04 UTC
Checked in - thanks!
Comment 3 Gerald (Jerry) Carter 2005-05-09 06:53:02 UTC
*** Bug 2224 has been marked as a duplicate of this bug. ***
Comment 4 Gerald (Jerry) Carter 2005-08-24 10:16:52 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.