r24669: Add CSS to the test run HTML output. See http://samba.org/~jelmer/ for an
[kai/samba.git] / source4 / main.mk
index fe7c1e57d86af90ac7adb4238d5b0ae24388ed47..613d76e0b94869a16a1745cb43bddc0804df5a6e 100644 (file)
@@ -1,5 +1,4 @@
-all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules
-everything: all libraries
+default: all
 
 include dynconfig.mk
 include heimdal_build/config.mk
@@ -42,7 +41,8 @@ libraries: $(STATIC_LIBS) $(SHARED_LIBS)
 modules: $(SHARED_MODULES)
 headers: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
 manpages: $(MANPAGES)
-everything: all
+all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules
+everything: all libraries headers
 
 showlayout: 
        @echo 'Samba will be installed into:'
@@ -87,7 +87,7 @@ showflags:
 # The permissions to give the executables
 INSTALLPERMS = 0755
 
-install: showlayout installbin installdat installwebapps installmisc installlib \
+install: showlayout everything installbin installdat installwebapps installmisc installlib \
        installheader installpc installplugins
 
 # DESTDIR is used here to prevent packagers wasting their time
@@ -269,7 +269,7 @@ 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 -rf ../webapps/qooxdoo-*-sdk/frontend/framework/.cache
        -rm -f $(PC_FILES)
 
 removebackup:
@@ -283,31 +283,37 @@ realdistclean: distclean removebackup
 
 check:: test
 
-SELFTEST = $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} \
+SELFTEST = $(PERL) $(srcdir)/selftest/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
+htmltest: everything
+       $(SELFTEST) $(DEFAULT_TEST_OPTIONS) --format=html $(TESTS)
 
-testone: all libraries
-       $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --one
+test: everything
+       $(SELFTEST) $(DEFAULT_TEST_OPTIONS) --immediate $(TESTS)
 
-test-swrap: all libraries
-       $(SELFTEST) --socket-wrapper --immediate $(TESTS) 
+testone: everything
+       $(SELFTEST) $(DEFAULT_TEST_OPTIONS) --one $(TESTS)
 
-test-noswrap: all libraries
-       $(SELFTEST) --immediate $(TESTS)
+test-swrap: everything
+       $(SELFTEST) --socket-wrapper --immediate $(TESTS)
 
-quicktestone: all
-       $(SELFTEST) --quick --socket-wrapper --one $(TESTS)
+test-noswrap: everything
+       $(SELFTEST) --immediate $(TESTS)
 
 quicktest: all
        $(SELFTEST) --quick --socket-wrapper --immediate $(TESTS)
 
-testenv: all libraries
+htmlquicktest: all
+       $(SELFTEST) --quick --socket-wrapper --format=html --immediate $(TESTS)
+
+quicktestone: all
+       $(SELFTEST) --quick --socket-wrapper --one $(TESTS)
+
+testenv: everything
        $(SELFTEST) --socket-wrapper --testenv
 
 valgrindtest: valgrindtest-quick
@@ -315,14 +321,14 @@ 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
+       $(SELFTEST) --quick --immediate --socket-wrapper $(TESTS)
 
-valgrindtest-all: all libraries
+valgrindtest-all: everything
        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
+       $(SELFTEST) --immediate --socket-wrapper $(TESTS)
 
-valgrindtest-env: all libraries
+valgrindtest-env: everything
        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
@@ -330,12 +336,16 @@ valgrindtest-env: all libraries
 gdbtest: gdbtest-quick
 
 gdbtest-quick: all
-       SMBD_VALGRIND="xterm -n smbd -e gdb --args " \
-       $(SELFTEST) --immediate --quick --socket-wrapper
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \
+       $(SELFTEST) --immediate --quick --socket-wrapper $(TESTS)
 
-gdbtest-all: all libraries
-       SMBD_VALGRIND="xterm -n smbd -e gdb --args " \
-       $(SELFTEST) --immediate --socket-wrapper
+gdbtest-all: everything
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \
+       $(SELFTEST) --immediate --socket-wrapper $(TESTS)
+
+gdbtest-env: everything
+       SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \
+       $(SELFTEST) --socket-wrapper --testenv
 
 wintest: all
        $(SELFTEST) win
@@ -349,16 +359,6 @@ unused_macros:
 
 .SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .$(SHLIBEXT) .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho .idl .hd
 
-# Dependencies command
-DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \
-    `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $< -o $@
-# Dependencies for host objects
-HDEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ \
-    `$(PERL) $(srcdir)/script/cflags.pl $@` $(HOSTCC_CFLAGS) $< -o $@
-# Dependencies for precompiled headers
-PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \
-    $(CFLAGS) $< -o $@
-
 .c.d:
        @echo "Generating dependencies for $<"
        @$(DEPENDS)
@@ -371,34 +371,6 @@ include/includes.d: include/includes.h
        @echo "Generating dependencies for $<"
        @$(PCHDEPENDS)
 
-#
-# $< is broken in older BSD versions:
-# when $@ is foo/bar.o, $< could be torture/foo/bar.c
-# if it also exists. So better use $* which is foo/bar
-# and append .c manually to get foo/bar.c
-#
-# But if srcdir != builddir, $* does not contain the filename
-# that was found be traversing VPATH. So we are back to $<.
-#      -- jpeach
-#
-
-# Run a static analysis checker
-CHECK = $(CC_CHECKER) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CFLAGS) $(PICFLAG) -c $< -o $@
-
-# Run the configured compiler
-COMPILE = $(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CFLAGS) $(PICFLAG) -c $< -o $@
-
-# Run the compiler for the build host
-HCOMPILE = $(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(HOSTCC_CFLAGS) -c $< -o $@
-
-# Precompile headers
-PCHCOMPILE = @$(CC) -Ilib/replace \
-    `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CFLAGS) $(PICFLAG) -c $< -o $@
-
 .c.o:
        @if test -n "$(CC_CHECKER)"; then \
                echo "Checking  $< with '$(CC_CHECKER)'"; \
@@ -451,11 +423,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