summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-11 22:05:52 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-11 22:05:52 +0100
commit94decfc49fa58d756558c09c79482aa459db00b3 (patch)
treee27fd2ed459efaa389fb8fde6936779134bd9f96 /source4
parent25641ec13d876924e90a6aaaa2aa2de2fedbd552 (diff)
downloadsamba-94decfc49fa58d756558c09c79482aa459db00b3.tar.gz
samba-94decfc49fa58d756558c09c79482aa459db00b3.tar.xz
samba-94decfc49fa58d756558c09c79482aa459db00b3.zip
Split rules.mk out of Makefile.
(This used to be commit 75ffc2c50d70e6f4108c3e6843c8d2bb212f6d9e)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/talloc/Makefile.in40
-rw-r--r--source4/lib/talloc/rules.mk18
2 files changed, 31 insertions, 27 deletions
diff --git a/source4/lib/talloc/Makefile.in b/source4/lib/talloc/Makefile.in
index a33085f95b..4c178045f1 100644
--- a/source4/lib/talloc/Makefile.in
+++ b/source4/lib/talloc/Makefile.in
@@ -20,24 +20,16 @@ SHLIBEXT = @SHLIBEXT@
SHLD = @SHLD@
SHLD_FLAGS = @SHLD_FLAGS@
-.SUFFIXES: .c .o .3 .3.xml .xml .html
-
LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
SONAME = libtalloc.$(SHLIBEXT).1
-.c.o:
- $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
-
-all: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
+all:: showflags libtalloc.a $(SOLIB) testsuite $(EXTRA_TARGETS)
-showflags:
- @echo 'talloc will be compiled with flags:'
- @echo ' CFLAGS = $(CFLAGS)'
- @echo ' LIBS = $(LIBS)'
+include rules.mk
-testsuite: $(LIBOBJ) testsuite.o
+testsuite:: $(LIBOBJ) testsuite.o
$(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
libtalloc.a: $(LIBOBJ)
@@ -47,7 +39,7 @@ libtalloc.a: $(LIBOBJ)
$(SOLIB): $(LIBOBJ)
$(SHLD) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(SONAME)
-install: all
+install:: all
${INSTALLCMD} -d $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
@@ -60,30 +52,24 @@ install: all
which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true
which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
-doc: talloc.3 talloc.3.html
-
-.3.xml.3:
- -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+doc:: talloc.3 talloc.3.html
-.xml.html:
- -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
-
-clean:
+clean::
rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
-test: testsuite
+check: test
+
+test:: testsuite
./testsuite
-gcov:
+gcov::
gcov talloc.c
-installcheck:
- $(MAKE) test
+installcheck:: test
-distclean: clean
- rm -f *~ */*~
+distclean:: clean
rm -f Makefile
rm -f config.log config.status config.h config.cache
-realdistclean: distclean
+realdistclean:: distclean
rm -f configure config.h.in
diff --git a/source4/lib/talloc/rules.mk b/source4/lib/talloc/rules.mk
new file mode 100644
index 0000000000..6cee126529
--- /dev/null
+++ b/source4/lib/talloc/rules.mk
@@ -0,0 +1,18 @@
+.SUFFIXES: .c .o .3 .3.xml .xml .html
+
+showflags::
+ @echo 'talloc will be compiled with flags:'
+ @echo ' CFLAGS = $(CFLAGS)'
+ @echo ' LIBS = $(LIBS)'
+
+.c.o:
+ $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
+
+.3.xml.3:
+ -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+.xml.html:
+ -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+
+distclean::
+ rm -f *~ */*~