mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Split actual content out of tdb Makefile into a separate file.
This commit is contained in:
parent
2b89399752
commit
b5d4ab2cf4
@ -22,83 +22,28 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PICFLAG = @PICFLAG@
|
||||
SHLIBEXT = @SHLIBEXT@
|
||||
SWIG = swig
|
||||
|
||||
PROGS = bin/tdbtool$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
|
||||
PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
|
||||
ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
|
||||
PYTHON_BUILD_TARGET = @PYTHON_BUILD_TARGET@
|
||||
PYTHON_INSTALL_TARGET = @PYTHON_INSTALL_TARGET@
|
||||
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 @PYTHON_BUILD_TARGET@
|
||||
all:: showflags dirs $(PROGS) $(SOLIB) libtdb.a $(PYTHON_BUILD_TARGET)
|
||||
|
||||
include tdb.mk
|
||||
include rules.mk
|
||||
|
||||
dirs::
|
||||
@mkdir -p $(DIRS)
|
||||
|
||||
install:: all installdirs installbin installheaders installlibs @PYTHON_INSTALL_TARGET@
|
||||
|
||||
installdirs::
|
||||
mkdir -p $(DESTDIR)$(bindir)
|
||||
mkdir -p $(DESTDIR)$(includedir)
|
||||
mkdir -p $(DESTDIR)$(libdir)
|
||||
mkdir -p $(DESTDIR)$(libdir)/pkgconfig
|
||||
|
||||
installbin:: installdirs
|
||||
cp $(PROGS) $(DESTDIR)$(bindir)
|
||||
|
||||
installheaders:: installdirs
|
||||
cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
|
||||
|
||||
installlibs:: installdirs
|
||||
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 $< $@
|
||||
|
||||
$(SONAME): $(SOLIB)
|
||||
ln -fs $< $@
|
||||
|
||||
install:: all
|
||||
$(SOLIB): $(TDB_OBJ)
|
||||
$(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(SONAME)
|
||||
|
||||
TDB_LIB = libtdb.a
|
||||
|
||||
bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
|
||||
|
||||
bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
|
||||
|
||||
bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
|
||||
|
||||
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
|
||||
|
||||
check: test
|
||||
|
||||
test:: bin/tdbtorture$(EXEEXT)
|
||||
bin/tdbtorture$(EXEEXT)
|
||||
|
||||
test::
|
||||
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)
|
||||
rm -f *.o *.a */*.o
|
||||
|
||||
distclean:: clean
|
||||
rm -f config.log config.status include/config.h config.cache
|
||||
@ -106,20 +51,3 @@ distclean:: clean
|
||||
|
||||
realdistclean:: distclean
|
||||
rm -f configure include/config.h.in
|
||||
|
||||
build-python:: libtdb.$(SHLIBEXT) tdb_wrap.c
|
||||
./setup.py build
|
||||
|
||||
installpython:: build-python
|
||||
./setup.py install --prefix=$(DESTDIR)$(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
|
||||
|
81
source/lib/tdb/tdb.mk
Normal file
81
source/lib/tdb/tdb.mk
Normal file
@ -0,0 +1,81 @@
|
||||
dirs::
|
||||
@mkdir -p bin common tools
|
||||
|
||||
PROGS = bin/tdbtool$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
|
||||
PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
|
||||
ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
|
||||
|
||||
SONAME = libtdb.$(SHLIBEXT).1
|
||||
SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
|
||||
|
||||
TDB_LIB = libtdb.a
|
||||
|
||||
bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
|
||||
|
||||
bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
|
||||
|
||||
bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
|
||||
|
||||
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)
|
||||
|
||||
clean::
|
||||
rm -f test.db test.tdb torture.tdb test.gdbm
|
||||
rm -f $(SONAME) $(SOLIB) libtdb.a libtdb.$(SHLIBEXT)
|
||||
rm -f $(ALL_PROGS) tdb.pc
|
||||
|
||||
build-python:: libtdb.$(SHLIBEXT) tdb_wrap.c
|
||||
./setup.py build
|
||||
|
||||
install:: installdirs installbin installheaders installlibs \
|
||||
$(PYTHON_INSTALL_TARGET)
|
||||
|
||||
installpython:: build-python
|
||||
./setup.py install --prefix=$(DESTDIR)$(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
|
||||
|
||||
installdirs::
|
||||
mkdir -p $(DESTDIR)$(bindir)
|
||||
mkdir -p $(DESTDIR)$(includedir)
|
||||
mkdir -p $(DESTDIR)$(libdir)
|
||||
mkdir -p $(DESTDIR)$(libdir)/pkgconfig
|
||||
|
||||
installbin:: installdirs
|
||||
cp $(PROGS) $(DESTDIR)$(bindir)
|
||||
|
||||
installheaders:: installdirs
|
||||
cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
|
||||
|
||||
installlibs:: installdirs
|
||||
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 $< $@
|
||||
|
||||
$(SONAME): $(SOLIB)
|
||||
ln -fs $< $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user