diff options
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/smb_build/env.pm | 1 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm index f468f51de1..8fbbe9cfd5 100644 --- a/source4/build/smb_build/env.pm +++ b/source4/build/smb_build/env.pm @@ -50,6 +50,7 @@ sub _set_config($$) } $self->{developer} = ($self->{config}->{developer} eq "yes"); + $self->{gnu_make} = ($self->{config}->{GNU_MAKE} eq "yes"); $self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes"); } diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index b1bd215af1..2dd1a9d7b3 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -231,7 +231,23 @@ sub _prepare_mk_files($) push (@tmp, $_); } + if ($self->{gnu_make}) { + $self->output(" +ifneq (\$(MAKECMDGOALS),clean) +ifneq (\$(MAKECMDGOALS),distclean) +ifneq (\$(MAKECMDGOALS),realdistclean) +"); + } + $self->output("MK_FILES = " . array2oneperline(\@tmp) . "\n"); + + if ($self->{gnu_make}) { + $self->output(" +endif +endif +endif +"); + } } sub array2oneperline($) |