diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-11 22:02:57 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-11 22:02:57 +0100 |
commit | 25641ec13d876924e90a6aaaa2aa2de2fedbd552 (patch) | |
tree | d641dae221a60ed5fca6686930dadb06cc78d014 /source4/lib | |
parent | 3e0f0091e58d26f555cd5908000294f51cce7c90 (diff) | |
download | samba-25641ec13d876924e90a6aaaa2aa2de2fedbd552.tar.gz samba-25641ec13d876924e90a6aaaa2aa2de2fedbd552.tar.bz2 samba-25641ec13d876924e90a6aaaa2aa2de2fedbd552.zip |
Split rules out of tdb Makefile.
(This used to be commit 9f233c14540cd4b2d5f4c7fe01e2d89cb220abc8)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/tdb/Makefile.in | 58 | ||||
-rw-r--r-- | source4/lib/tdb/rules.mk | 21 |
2 files changed, 41 insertions, 38 deletions
diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in index c98d7e0497..31289faa81 100644 --- a/source4/lib/tdb/Makefile.in +++ b/source4/lib/tdb/Makefile.in @@ -23,8 +23,6 @@ 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) @@ -36,40 +34,28 @@ DIRS = bin common tools SONAME = libtdb.$(SHLIBEXT).1 SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION) -all: showflags dirs $(PROGS) $(SOLIB) libtdb.a @PYTHON_BUILD_TARGET@ - -showflags: - @echo 'tdb will be compiled with flags:' - @echo ' CFLAGS = $(CFLAGS)' - @echo ' CPPFLAGS = $(CPPFLAGS)' - @echo ' LDFLAGS = $(LDFLAGS)' - @echo ' LIBS = $(LIBS)' - -.SUFFIXES: .c .o +all:: showflags dirs $(PROGS) $(SOLIB) libtdb.a @PYTHON_BUILD_TARGET@ -.c.o: - @echo Compiling $*.c - @mkdir -p `dirname $@` - @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@ +include rules.mk -dirs: +dirs:: @mkdir -p $(DIRS) -install: all installdirs installbin installheaders installlibs @PYTHON_INSTALL_TARGET@ +install:: all installdirs installbin installheaders installlibs @PYTHON_INSTALL_TARGET@ -installdirs: +installdirs:: mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(includedir) mkdir -p $(DESTDIR)$(libdir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig -installbin: installdirs +installbin:: installdirs cp $(PROGS) $(DESTDIR)$(bindir) -installheaders: installdirs +installheaders:: installdirs cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir) -installlibs: installdirs +installlibs:: installdirs cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir) @@ -102,42 +88,38 @@ bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB) bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb -test: bin/tdbtorture$(EXEEXT) +check: test + +test:: bin/tdbtorture$(EXEEXT) bin/tdbtorture$(EXEEXT) -installcheck: test install +installcheck:: test install -clean: +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 -.SUFFIXES: .i _wrap.c - -.i_wrap.c: - $(SWIG) -O -Wall -python -keyword $< - -build-python: libtdb.$(SHLIBEXT) tdb_wrap.c +build-python:: libtdb.$(SHLIBEXT) tdb_wrap.c ./setup.py build -installpython: build-python +installpython:: build-python ./setup.py install --prefix=$(DESTDIR)$(prefix) -check-python: build-python +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: +install-swig:: mkdir -p $(DESTDIR)`$(SWIG) -swiglib` cp tdb.i $(DESTDIR)`$(SWIG) -swiglib` -clean-python: +clean-python:: ./setup.py clean diff --git a/source4/lib/tdb/rules.mk b/source4/lib/tdb/rules.mk new file mode 100644 index 0000000000..7b765625df --- /dev/null +++ b/source4/lib/tdb/rules.mk @@ -0,0 +1,21 @@ +.SUFFIXES: .i _wrap.c + +.i_wrap.c: + $(SWIG) -O -Wall -python -keyword $< + +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 $@ + +distclean:: + rm -f *~ */*~ |