[osmpbf] 07/11: Improved build script.

Bas Couwenberg sebastic at xs4all.nl
Sun Mar 16 10:08:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to tag v1.3.2
in repository osmpbf.

commit deef7f0b0a880742cad9dee1b04194001e153be5
Author: Jochen Topf <jochen at topf.org>
Date:   Tue Mar 11 11:25:07 2014 +0100

    Improved build script.
    
    The debian build has been changed to not use dh_auto_build etc. because they
    pick up the CMake files instead of using the Makefiles.
---
 README         | 12 ++++++------
 build.xml      |  2 +-
 debian/rules   | 18 ++++++++----------
 src/Makefile   |  2 ++
 tools/Makefile |  7 ++++---
 5 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/README b/README
index e307e4f..05c386d 100644
--- a/README
+++ b/README
@@ -22,17 +22,14 @@ C Version
 =========
 
 To compile:
-  cd src
-  make
+  make -C src
 
 To install:
-  cd src
-  make install
+  make -C src install
 
 There is a tool named osmpbf-outline that shows a debug output of the contents
 of a PBF file. To compile it:
-  cd tools
-  make
+  make -C tools
 
 
 Using the C Library
@@ -57,3 +54,6 @@ To install the Debian/Ubuntu packages:
   sudo dpkg --install ../libosmpbf-java_*.deb
   sudo dpkg --install ../osmpbf-bin_*.deb
 
+To clean up after:
+  debclean
+
diff --git a/build.xml b/build.xml
index e302a1e..c1563d7 100644
--- a/build.xml
+++ b/build.xml
@@ -21,7 +21,7 @@
 		<exec executable="/bin/sh">
 			<arg value="./build.sh"/>
 		</exec>
-		<javac destdir="${build.dir}">
+		<javac includeantruntime="false" destdir="${build.dir}">
 			<src>
 				<dirset dir="${src.dir}"/>
 				<dirset dir="${src.generated.dir}"/>
diff --git a/debian/rules b/debian/rules
index 418e1e3..5a09543 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,25 +8,23 @@
 	dh $@
 
 override_dh_auto_clean:
-	dh_auto_clean
-	dh_auto_clean -Dsrc
-	dh_auto_clean -Dtools
+	$(MAKE) -C src clean
+	$(MAKE) -C tools clean
 	mh_clean
 
 override_dh_auto_build:
-	dh_auto_build
-	dh_auto_build -Dsrc
-	dh_auto_build -Dtools
+	ant
+	$(MAKE) -C src
+	$(MAKE) -C tools
 
 override_dh_auto_install:
-	dh_auto_install
-	dh_auto_install -Dsrc
-	dh_auto_install -Dtools
+	$(MAKE) -C src DESTDIR=$(CURDIR)/debian/libosmpbf-dev PREFIX=/usr install
+	$(MAKE) -C tools DESTDIR=$(CURDIR)/debian/osmpbf-bin PREFIX=/usr install
 
 override_dh_installchangelogs:
 	dh_installchangelogs -- ReleaseNotes.txt
 
 override_dh_install:
-	dh_install
 	mh_installjar -plibosmpbf-java -l pom.xml osmpbf.jar
 	mh_installpom -plibosmpbf-java pom.xml
+
diff --git a/src/Makefile b/src/Makefile
index 4c6f653..3818b98 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,6 +6,8 @@ CXXFLAGS ?= -O3
 AR ?= ar
 PROTOC ?= protoc
 
+.PHONY: clean install
+
 all: libosmpbf.a ../include/osmpbf/fileformat.pb.h ../include/osmpbf/osmformat.pb.h
 
 libosmpbf.a: fileformat.pb.o osmformat.pb.o
diff --git a/tools/Makefile b/tools/Makefile
index f213f6c..888d56c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -2,10 +2,10 @@
 PREFIX ?= /usr/local
 CXX ?= g++
 CXXFLAGS ?= -g
-CXXFLAGS += -I../include -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast -Wno-c++11-long-long
+CXXFLAGS += -I../include -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long
 LDFLAGS += -L../src -pthread -lz -lprotobuf-lite -losmpbf
 
-
+.PHONY: clean install
 
 all: osmpbf-outline
 
@@ -14,7 +14,8 @@ osmpbf-outline: osmpbf-outline.cpp
 
 install:
 	install -m 755 -d $(DESTDIR)$(PREFIX)/bin
-	install -m 644 -s osmpbf-outline $(DESTDIR)$(PREFIX)/bin
+	install -m 755 -s osmpbf-outline $(DESTDIR)$(PREFIX)/bin
 
 clean:
 	rm -f osmpbf-outline
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmpbf.git



More information about the Pkg-grass-devel mailing list