Remove EJS tests.
[kai/samba.git] / source4 / lib / tdb / Makefile.in
index a60b9a67bf5b11475a14838a044ac1e61659f495..090bb6e2dcfefe8e0fd5d7821f64d62e783fcbcd 100644 (file)
@@ -22,112 +22,38 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
 PICFLAG = @PICFLAG@
 SHLIBEXT = @SHLIBEXT@
 SWIG = swig
-
-.PHONY: test
-
-PROGS = bin/tdbtool$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
-PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
-ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
+PYTHON = @PYTHON@
+PYTHON_CONFIG = @PYTHON_CONFIG@
+PYTHON_BUILD_TARGET = @PYTHON_BUILD_TARGET@
+PYTHON_INSTALL_TARGET = @PYTHON_INSTALL_TARGET@
+PYTHON_CHECK_TARGET = @PYTHON_CHECK_TARGET@
+LIB_PATH_VAR = @LIB_PATH_VAR@
+tdbdir = @tdbdir@
 
 TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
 
-DIRS = bin common tools
-
-SONAME = libtdb.$(SHLIBEXT).1
-SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
-
-all: showflags dirs $(PROGS) $(SOLIB) libtdb.a
-
-showflags:
-       @echo 'tdb will be compiled with flags:'
-       @echo '  CFLAGS = $(CFLAGS)'
-       @echo '  CPPFLAGS = $(CPPFLAGS)'
-       @echo '  LDFLAGS = $(LDFLAGS)'
-       @echo '  LIBS = $(LIBS)'
-
-.SUFFIXES: .c .o
-
-.c.o:
-       @echo Compiling $*.c
-       @mkdir -p `dirname $@`
-       @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@
-
-dirs:
-       @mkdir -p $(DIRS)
-
-install: all
-       mkdir -p $(DESTDIR)$(bindir)
-       mkdir -p $(DESTDIR)$(includedir)
-       mkdir -p $(DESTDIR)$(libdir) 
-       mkdir -p $(DESTDIR)$(libdir)/pkgconfig
-       cp $(PROGS) $(DESTDIR)$(bindir)
-       cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
-       cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
-       cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir)
-
-libtdb.a: $(TDB_OBJ)
-       ar -rv libtdb.a $(TDB_OBJ)
-
-libtdb.$(SHLIBEXT): $(SOLIB)
-       ln -fs $< $@
+default: all
 
-$(SONAME): $(SOLIB)
-       ln -fs $< $@
+include $(tdbdir)/tdb.mk
+include $(tdbdir)/rules.mk
 
-$(SOLIB): $(TDB_OBJ)
-       $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(SONAME)
+all:: showflags dirs $(PROGS) $(TDB_SOLIB) libtdb.a $(PYTHON_BUILD_TARGET)
 
-TDB_LIB = libtdb.a
+install:: all
+$(TDB_SOLIB): $(TDB_OBJ)
+       $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(TDB_SONAME)
 
-bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
+check: test
 
-bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
+test:: $(PYTHON_CHECK_TARGET)
+installcheck:: test install
 
-bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
+clean::
+       rm -f *.o *.a */*.o
 
-bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
-
-bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
-
-test: bin/tdbtorture$(EXEEXT)
-       bin/tdbtorture$(EXEEXT)
-
-installcheck: test install
-
-clean:
-       rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
-       rm -f test.db test.tdb torture.tdb test.gdbm
-       rm -f $(SONAME) $(SOLIB) libtdb.a libtdb.$(SHLIBEXT)
-
-distclean: clean
-       rm -f *~ */*~
+distclean:: clean
        rm -f config.log config.status include/config.h config.cache
        rm -f Makefile
 
-realdistclean: distclean
+realdistclean:: distclean
        rm -f configure include/config.h.in
-
-tdb_wrap.c tdb.py: tdb.i
-       $(SWIG) -O -Wall -python -keyword tdb.i
-
-build-python: libtdb.$(SHLIBEXT) tdb_wrap.c tdb.py
-       ./setup.py build
-
-install-python:
-       ./setup.py install --prefix=$(prefix)
-
-check-python: build-python
-       # FIXME: Should be more portable:
-       LD_LIBRARY_PATH=. PYTHONPATH=.:build/lib.linux-i686-2.4 trial python/tests/simple.py
-
-install-swig:
-       mkdir -p $(DESTDIR)`$(SWIG) -swiglib`
-       cp tdb.i $(DESTDIR)`$(SWIG) -swiglib`
-
-clean-python:
-       ./setup.py clean