1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

Move automatic dependencies code out of perl code.

(This used to be commit 9e9d98d75d52846bca88ec7d12b91b140b069868)
This commit is contained in:
Jelmer Vernooij 2008-02-25 18:05:47 +01:00
parent 738fd7fd50
commit 943f61be40
3 changed files with 31 additions and 39 deletions

View File

@ -19,12 +19,40 @@ BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
default: all
.DEFAULT_GOAL := all
ifneq ($(automatic_deps),yes)
ALL_PREDEP = proto
.NOTPARALLEL:
endif
include rules.mk
include data.mk
include extra_cflags.txt
DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
include/includes.d
ifeq ($(automatic_deps),yes)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),realdistclean)
ifneq ($(SKIP_DEP_FILES),yes)
-include $(DEP_FILES)
endif
endif
endif
endif
ifneq ($(SKIP_DEP_FILES),yes)
clean::
@echo Removing dependency files
@find . -name '*.d' -o -name '*.hd' | xargs rm -f
endif
else
include $(srcdir)/static_deps.mk
endif
DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
$(srcdir)/version.h

View File

@ -30,11 +30,6 @@ sub new($$$)
$self->output("################################################\n");
$self->output("\n");
if (!$self->{automatic_deps}) {
$self->output("ALL_PREDEP = proto\n");
$self->output(".NOTPARALLEL:\n");
}
return $self;
}
@ -55,23 +50,17 @@ sub _prepare_mk_files($)
push (@tmp, $_);
}
if ($self->{gnu_make}) {
$self->output("
$self->output("
ifneq (\$(MAKECMDGOALS),clean)
ifneq (\$(MAKECMDGOALS),distclean)
ifneq (\$(MAKECMDGOALS),realdistclean)
");
}
$self->output("MK_FILES = " . array2oneperline(\@tmp) . "\n");
if ($self->{gnu_make}) {
$self->output("
$self->output("
endif
endif
endif
");
}
}
sub array2oneperline($)
@ -366,28 +355,6 @@ sub write($$)
$self->output($self->{mkfile});
if ($self->{automatic_deps}) {
$self->output("
ifneq (\$(MAKECMDGOALS),clean)
ifneq (\$(MAKECMDGOALS),distclean)
ifneq (\$(MAKECMDGOALS),realdistclean)
ifneq (\$(SKIP_DEP_FILES),yes)
-include \$(DEP_FILES)
endif
endif
endif
endif
ifneq (\$(SKIP_DEP_FILES),yes)
clean::
\@echo Removing dependency files
\@find . -name '*.d' -o -name '*.hd' | xargs rm -f
endif
");
} else {
$self->output("include \$(srcdir)/static_deps.mk\n");
}
open(MAKEFILE,">$file") || die ("Can't open $file\n");
print MAKEFILE $self->{output};
close(MAKEFILE);

View File

@ -168,9 +168,6 @@ DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpage
.8.xml.8:
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
include/includes.d
dist:: idl_full manpages configure distclean
configure: