diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-10-17 00:56:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:16 -0500 |
commit | c554e2168bbc7c89bd02768a45ce9a8c7dd57b43 (patch) | |
tree | d0ace01672fed5ae792405ec93b48e6b198e8eff | |
parent | a9f4e0dd8f38a89936c178a9c8c758691cf924d1 (diff) | |
download | samba-c554e2168bbc7c89bd02768a45ce9a8c7dd57b43.tar.gz samba-c554e2168bbc7c89bd02768a45ce9a8c7dd57b43.tar.bz2 samba-c554e2168bbc7c89bd02768a45ce9a8c7dd57b43.zip |
r19358: Use subunit tests from the right location (from
$src/bin/torture when developing, $LIBDIR/torture when installed)
(This used to be commit 4ae6380e6bb48e27e9947e149b3d079b3e293cc0)
-rw-r--r-- | source4/build/smb_build/makefile.pm | 21 | ||||
-rw-r--r-- | source4/dynconfig.mk | 4 | ||||
-rw-r--r-- | source4/main.mk | 2 | ||||
-rw-r--r-- | source4/param/config.mk | 2 | ||||
-rw-r--r-- | source4/torture/subunit.c | 2 |
5 files changed, 19 insertions, 12 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 91ee7186a5..e44de5c5c1 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -110,9 +110,11 @@ sub _prepare_compiler_linker($) my $builddir_headers = ""; $self->{duplicate_build} = 0; + if ($self->{developer}) { + $self->{duplicate_build} = 1; + } if ($self->{config}->{LIBRARY_OUTPUT_TYPE} eq "SHARED_LIBRARY") { - if ($self->{developer}) { - $self->{duplicate_build} = 1; + if ($self->{duplicate_build}) { $devld_local = " -Wl,-rpath,\$(builddir)/bin"; } $devld_install = " -Wl,-rpath-link,\$(builddir)/bin"; @@ -372,9 +374,14 @@ sub Binary($$) $extradir = "/torture" . substr($ctx->{INSTALLDIR}, length("TORTUREDIR")); } my $localdir = "bin$extradir"; + + my $dynconfig = "dynconfig.o"; + my $dynconfig_install; if ($self->{duplicate_build}) { $installdir = "bin/install$extradir"; + $dynconfig = "dynconfig-devel.o"; + $dynconfig_install = "dynconfig.o"; } else { $installdir = "bin$extradir"; } @@ -401,20 +408,20 @@ sub Binary($$) if ($self->{duplicate_build}) { $self->output(<< "__EOD__" # -$localdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) +$localdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $dynconfig \@echo Linking \$\@ - \@\$(LD) \$(LDFLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \$(INSTALL_LINK_FLAGS) \\ - \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) + \@\$(LD) \$(LDFLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) $dynconfig \\ + \$(INSTALL_LINK_FLAGS) \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) __EOD__ ); } $self->output(<< "__EOD__" -$installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) +$installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $dynconfig_install \@echo Linking \$\@ \@\$(LD) \$(LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ - \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) + $dynconfig_install \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) __EOD__ ); diff --git a/source4/dynconfig.mk b/source4/dynconfig.mk index 180333693d..76479af0fa 100644 --- a/source4/dynconfig.mk +++ b/source4/dynconfig.mk @@ -28,9 +28,9 @@ DEVEL_PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DBINDIR=\"$(builddir)/bin\" \ -DSWATDIR=\"$(srcdir)/../swat\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \ -DMODULESDIR=\"$(builddir)/bin/modules\" \ -DJSDIR=\"$(srcdir)/scripting/libjs\" \ - -DSETUPDIR=\"$(srcdir)/setup\" \ + -DSETUPDIR=\"$(srcdir)/setup\" -DTORTUREDIR=\"$(srcdir)/bin/torture\" \ -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\" dynconfig-devel.o: dynconfig.c Makefile @echo Compiling $< - @$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $(PICFLAG) $(DEVEL_PATH_FLAGS) -c $< -o $@ + @$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` -Ilib/replace $(CFLAGS) $(PICFLAG) $(DEVEL_PATH_FLAGS) -c $< -o $@ diff --git a/source4/main.mk b/source4/main.mk index 3767ecab10..0edf57859f 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -121,7 +121,7 @@ installdirs: $(DESTDIR)$(PKGCONFIGDIR) \ $(DESTDIR)$(CONFIGDIR) \ -installbin: $(SBIN_PROGS) $(BIN_PROGS) installdirs +installbin: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs @$(SHELL) $(srcdir)/script/installbin.sh \ $(INSTALLPERMS) \ $(DESTDIR)$(BASEDIR) \ diff --git a/source4/param/config.mk b/source4/param/config.mk index 3d83e688f9..683079c163 100644 --- a/source4/param/config.mk +++ b/source4/param/config.mk @@ -7,7 +7,7 @@ OBJ_FILES = loadparm.o \ generic.o \ util.o \ ../lib/version.o -PUBLIC_DEPENDENCIES = LIBSAMBA-UTIL DYNCONFIG +PUBLIC_DEPENDENCIES = LIBSAMBA-UTIL PUBLIC_PROTO_HEADER = proto.h PUBLIC_HEADERS = param.h diff --git a/source4/torture/subunit.c b/source4/torture/subunit.c index 299ca3f015..f7c14aa023 100644 --- a/source4/torture/subunit.c +++ b/source4/torture/subunit.c @@ -56,7 +56,7 @@ bool torture_subunit_load_testsuites(const char *directory, bool recursive, while((entry = readdir(dir))) { struct torture_suite *child; - if (ISDOT(entry->d_name) || ISDOTDOT(entry->d_name)) + if (entry->d_name[0] == '.') continue; if (!recursive && entry->d_type & DT_DIR) |