[PATCH] Support separate build directory and other Makefile fixes.
Petter Urkedal
urkedal at nbi.dk
Fri Jun 4 14:28:27 CEST 2010
* Substitute srcdir, top_srcdir, and top_builddir.
* Add VPATH and -I options to support building from separate
directory.
* Rebuild GNUmakefile as needed.
---
ldapvi/GNUmakefile.in | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ldapvi/GNUmakefile.in b/ldapvi/GNUmakefile.in
index 2f1f065..3d58241 100644
--- a/ldapvi/GNUmakefile.in
+++ b/ldapvi/GNUmakefile.in
@@ -1,10 +1,16 @@
+top_srcdir:=@top_srcdir@
+top_builddir:=@top_builddir@
+srcdir:=@srcdir@
CC:=@CC@
-CFLAGS:=@CPPFLAGS@ @CFLAGS@
+CFLAGS:=@CPPFLAGS@ @CFLAGS@ -I$(top_builddir) -I$(top_srcdir)
LDFLAGS:=@LDFLAGS@ @LIBS@
INSTALL:=@INSTALL@
prefix:=@prefix@
exec_prefix:=@exec_prefix@
+VPATH = $(srcdir)
+
+.PHONY: all
all: ldapvi
dist: ldapvi ldapvi.1
@@ -27,8 +33,12 @@ ldapvi.1: version.h ldapvi ldapvi.1.in
install: ldapvi
mkdir -p $(DESTDIR)@bindir@ $(DESTDIR)@mandir@/man1/ $(DESTDIR)@prefix@/share/doc/ldapvi
@INSTALL_PROGRAM@ ldapvi $(DESTDIR)@bindir@
- @INSTALL_DATA@ ldapvi.1 $(DESTDIR)@mandir@/man1/
- @INSTALL_DATA@ manual/manual.css manual/manual.xml manual/bg.png manual/html.xsl $(DESTDIR)@prefix@/share/doc/ldapvi
+ @INSTALL_DATA@ $(srcdir)/ldapvi.1 $(DESTDIR)@mandir@/man1/
+ @INSTALL_DATA@ $(srcdir)/manual/manual.css $(srcdir)/manual/manual.xml $(srcdir)/manual/bg.png $(srcdir)/manual/html.xsl $(DESTDIR)@prefix@/share/doc/ldapvi
+.PHONY: distclean
distclean:
rm -rf configure GNUmakefile config.h config.log autom4te.cache config.status
+
+GNUmakefile: GNUmakefile.in config.status
+ ./config.status $@
--
1.6.5.2
--MGYHOYXEY6WxJCY8--
More information about the ldapvi
mailing list