Move first_prereq test to m4 code.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 9 Feb 2008 16:07:02 +0000 (17:07 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 9 Feb 2008 16:07:02 +0000 (17:07 +0100)
source/build/m4/check_make.m4
source/build/smb_build/makefile.pm

index 4780f43e1cbe652a2368d6d4400197174276d1be..d7799649a7fd0c5e971e83e66831b97b59823ce7 100644 (file)
@@ -46,3 +46,11 @@ AC_ARG_ENABLE(automatic-dependencies,
 [ automatic_dependencies=no ])
 AC_MSG_RESULT($automatic_dependencies)
 AC_SUBST(automatic_dependencies)
 [ automatic_dependencies=no ])
 AC_MSG_RESULT($automatic_dependencies)
 AC_SUBST(automatic_dependencies)
+
+FIRST_PREREQ="\$*.c"
+AC_SUBST(FIRST_PREREQ)
+
+if test x$GNU_MAKE = xyes; then
+       FIRST_PREREQ="\$<"
+fi
+
index 0b1cc7eac232edf14fece5c7f4a6098f66254287..5799d89c5701ca620fccb2688dbed4c16bfe11a8 100644 (file)
@@ -111,14 +111,9 @@ __EOD__
 sub _prepare_suffix_rules($)
 {
        my ($self) = @_;
 sub _prepare_suffix_rules($)
 {
        my ($self) = @_;
-       my $first_prereq = '$*.c';
-
-       if ($self->{config}->{GNU_MAKE} eq 'yes') {
-               $first_prereq = '$<';
-       }
 
        $self->output(<< "__EOD__"
 
        $self->output(<< "__EOD__"
-FIRST_PREREQ = $first_prereq
+FIRST_PREREQ = $self->{config}->{FIRST_PREREQ}
 
 __EOD__
 );
 
 __EOD__
 );
@@ -461,7 +456,6 @@ sub Binary($$)
                push (@{$self->{torture_progs}}, "$installdir/$ctx->{BINARY}");
        }
 
                push (@{$self->{torture_progs}}, "$installdir/$ctx->{BINARY}");
        }
 
-
        push (@{$self->{binaries}}, "$localdir/$ctx->{BINARY}");
 
        $self->_prepare_list($ctx, "OBJ_LIST");
        push (@{$self->{binaries}}, "$localdir/$ctx->{BINARY}");
 
        $self->_prepare_list($ctx, "OBJ_LIST");