r26618: Implement -W option support.
[samba.git] / source4 / main.mk
index 5611bc342799f51e4a79078e6166d07c8d95bee5..38c76bb99c514645914d61c7fc14fc1379680713 100644 (file)
@@ -29,11 +29,10 @@ include librpc/config.mk
 include client/config.mk
 include libcli/config.mk
 include scripting/ejs/config.mk
-include scripting/swig/config.mk
+include scripting/python/config.mk
 include kdc/config.mk
 
-DEFAULT_HEADERS = $(srcdir)/include/core.h \
-                 $(srcdir)/lib/util/dlinklist.h \
+DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
                  $(srcdir)/version.h
 
 binaries: $(BINARIES)
@@ -41,9 +40,17 @@ libraries: $(STATIC_LIBS) $(SHARED_LIBS)
 modules: $(SHARED_MODULES)
 headers: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
 manpages: $(MANPAGES)
-all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules
+all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
 everything: all libraries headers
 
+LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
+
+# 'make testsuite' creates all binaries which are
+# needed by samba3's 'make test' and the build-farm
+# scripts use that it as fallback in case
+# 'make everything' fails
+testsuite: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
+
 showlayout: 
        @echo 'Samba will be installed into:'
        @echo '  basedir:     $(BASEDIR)'
@@ -59,8 +66,7 @@ showlayout:
        @echo '  logfilebase: $(LOGFILEBASE)'
        @echo '  setupdir:    $(SETUPDIR)'
        @echo '  jsdir:       $(JSDIR)'
-       @echo '  webappsdir:  $(WEBAPPSDIR)'
-       @echo '  servicesdir: $(SERVICESDIR)'
+       @echo '  swatdir:     $(SWATDIR)'
        @echo '  mandir:      $(MANDIR)'
        @echo '  torturedir:  $(TORTUREDIR)'
        @echo '  datadir:     $(DATADIR)'
@@ -73,12 +79,14 @@ showflags:
        @echo '  CC         = $(CC)'
        @echo '  CFLAGS     = $(CFLAGS)'
        @echo '  PICFLAG    = $(PICFLAG)'
-       @echo '  LD         = $(LD)'
-       @echo '  LDFLAGS    = $(LDFLAGS)'
+       @echo '  BNLD       = $(BNLD)'
+       @echo '  BNLD_FLAGS = $(BNLD_FLAGS)'
        @echo '  STLD       = $(STLD)'
        @echo '  STLD_FLAGS = $(STLD_FLAGS)'
        @echo '  SHLD       = $(SHLD)'
        @echo '  SHLD_FLAGS = $(SHLD_FLAGS)'
+       @echo '  MDLD       = $(MDLD)'
+       @echo '  MDLD_FLAGS = $(MDLD_FLAGS)'
        @echo '  SHLIBEXT   = $(SHLIBEXT)'
        @echo '  srcdir     = $(srcdir)'
        @echo '  builddir   = $(builddir)'
@@ -87,7 +95,7 @@ showflags:
 # The permissions to give the executables
 INSTALLPERMS = 0755
 
-install: showlayout everything installbin installdat installwebapps installmisc installlib \
+install: showlayout everything installbin installdat installswat installmisc installlib \
        installheader installpc installplugins
 
 # DESTDIR is used here to prevent packagers wasting their time
@@ -148,9 +156,8 @@ installheader: headers installdirs
 installdat: installdirs
        @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(DATADIR) $(srcdir)
 
-installwebapps: installdirs
-       @$(SHELL) $(srcdir)/script/installwebapps.sh $(DESTDIR)$(WEBAPPSDIR) $(srcdir)
-       @$(SHELL) $(srcdir)/script/installjsonrpc.sh $(DESTDIR)$(SERVICESDIR) $(srcdir)
+installswat: installdirs
+       @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
 
 installman: manpages installdirs
        @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
@@ -269,13 +276,12 @@ distclean: clean
        -rm -f config.status
        -rm -f config.log config.cache
        -rm -f config.pm config.mk
-       -rm -rf webapps/qooxdoo-*-sdk/frontend/framework/.cache
        -rm -f $(PC_FILES)
 
 removebackup:
        -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
 
-realdistclean: distclean removebackup
+realdistclean:: distclean removebackup
        -rm -f include/config_tmp.h.in
        -rm -f version.h
        -rm -f configure
@@ -283,62 +289,7 @@ realdistclean: distclean removebackup
 
 check:: test
 
-SELFTEST = $(PERL) $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} \
-    --builddir=$(builddir) --srcdir=$(srcdir) \
-    --expected-failures=$(srcdir)/samba4-knownfail \
-    --skip=$(srcdir)/samba4-skip \
-    $(TEST_OPTIONS) 
-
-test: all libraries
-       $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --immediate
-
-testone: all libraries
-       $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --one
-
-test-swrap: all libraries
-       $(SELFTEST) --socket-wrapper --immediate $(TESTS) 
-
-test-noswrap: all libraries
-       $(SELFTEST) --immediate $(TESTS)
-
-quicktestone: all
-       $(SELFTEST) --quick --socket-wrapper --one $(TESTS)
-
-quicktest: all
-       $(SELFTEST) --quick --socket-wrapper --immediate $(TESTS)
-
-testenv: all libraries
-       $(SELFTEST) --socket-wrapper --testenv
-
-valgrindtest: valgrindtest-quick
-
-valgrindtest-quick: all
-       SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
-       VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
-       $(SELFTEST) --quick --immediate --socket-wrapper
-
-valgrindtest-all: all libraries
-       SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
-       VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
-       $(SELFTEST) --immediate --socket-wrapper
-
-valgrindtest-env: all libraries
-       SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
-       VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
-       $(SELFTEST) --socket-wrapper --testenv
-
-gdbtest: gdbtest-quick
-
-gdbtest-quick: all
-       SMBD_VALGRIND="xterm -n smbd -e gdb --args " \
-       $(SELFTEST) --immediate --quick --socket-wrapper
-
-gdbtest-all: all libraries
-       SMBD_VALGRIND="xterm -n smbd -e gdb --args " \
-       $(SELFTEST) --immediate --socket-wrapper
-
-wintest: all
-       $(SELFTEST) win
+include selftest/config.mk
 
 unused_macros:
        $(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
@@ -413,11 +364,7 @@ DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpage
 DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
                   include/includes.d
 
-dist:: distclean idl_full manpages configure
+dist:: idl_full manpages configure distclean 
 
 configure: 
        ./autogen.sh
-
-clean::
-       @echo Removing dependency files
-       @find . -name \*.d -o -name \*.hd | xargs rm -f