1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
#! /usr/bin/make -f
# Debian rules file for the FOX GUI library. GNU copyright 1999 by
# Torsten Landschoff <torsten@debian.org>.
#
export DH_COMPAT=2
#export DH_VERBOSE=1
src_toplevel = $(shell pwd)
CONFIG_PATHS = --prefix=/usr \
--mandir=/usr/share/man
# --htmldir=/usr/share/doc/libfox1.0/html
INSTALL_PATHS = prefix=$$instdir/usr \
mandir=$$instdir/usr/share/man \
htmldir=$$instdir/usr/share/doc/libfox-doc/html
# Configuration
#-----------------------------------------------------------------
# Creates the build directories and configures both builds. Also
# writes the current version into substvars.
.PHONY: configure configure-release configure-debug \
clean-configure clean-configure-release clean-configure-debug
configure: configure-release configure-debug
clean-configure: clean-configure-release clean-configure-debug
-rm -f debian/config.cache
configure-release: configure-release-stamp
configure-debug: configure-debug-stamp
configure-debug-stamp:
dh_testdir
mkdir debian/build-debug
(cd debian/build-debug; \
../../configure --cache-file=../config.cache --enable-debug \
$(CONFIG_PATHS))
touch configure-debug-stamp
configure-release-stamp:
dh_testdir
mkdir debian/build-release
(cd debian/build-release; \
../../configure --cache-file=../config.cache --enable-release \
$(CONFIG_PATHS))
touch configure-release-stamp
clean-configure-debug: clean-build-debug
dh_testdir
rm -f configure-debug-stamp
rm -Rf debian/build-debug
clean-configure-release: clean-build-release
dh_testdir
rm -f configure-release-stamp
rm -Rf debian/build-release
# Compilation
#-------------------------------------------------------
# Compile all the stuff into the build directories.
.PHONY: build build-release build-debug
build: build-release build-debug
build-release: build-release-stamp
build-debug: build-debug-stamp
clean-build: clean-build-release clean-build-debug
build-release-stamp: configure-release-stamp
dh_testdir
(cd debian/build-release; make)
touch build-release-stamp
build-debug-stamp: configure-debug-stamp
dh_testdir
(cd debian/build-debug; make SUBDIRS="src")
touch build-debug-stamp
clean-build-release:
dh_testdir
rm -f build-release-stamp
-(cd debian/build-release && make clean)
clean-build-debug:
dh_testdir
rm -f build-debug-stamp
-(cd debian/build-debug && make clean)
# Installation
#-------------------------------------------------------
install: clean-installdirs install-release-stamp install-debug-stamp
clean-installdirs:
dh_testdir
dh_testroot
dh_clean
install-release-stamp: build-release-stamp
dh_testdir
dh_testroot
(instdir=`pwd`/debian/tmp; \
cd debian/build-release; \
make $(INSTALL_PATHS) install-strip; \
rm $$instdir/usr/bin/adie; \
rm $$instdir/usr/bin/PathFinder; \
rm $$instdir/usr/bin/calculator)
dh_movefiles
touch install-release-stamp
install-debug-stamp: build-debug-stamp
dh_testdir
dh_testroot
(instdir=`pwd`/debian/libfox1.0-dbg; \
cd debian/build-debug; \
make $(INSTALL_PATHS) libdir=$$instdir/usr/lib/debug \
SUBDIRS=src install)
touch install-debug-stamp
clean-install-release:
dh_testdir
dh_testroot
rm -f install-release-stamp
rm -Rf debian/tmp debian/libfox1.0 debian/libfox1.0-dev \
debian/libfox-doc
clean-install-debug:
dh_testdir
dh_testroot
rm -f install-debug-stamp
rm -Rf debian/libfox1.0-dbg
# Packaging
#-------------------------------------------------------
define build-deb
dh_testdir
dh_testroot
dh_installdocs -p$@
dh_installexamples -p$@
dh_installchangelogs -p$@
if [ $@ != "libfox1.0-dbg" ]; then \
dh_strip -p$@; \
find `pwd`/debian/$@ -name '*.a' \
-exec sh debian/arstrip \{\} \; ; \
fi
dh_link -p$@
dh_compress -p$@
dh_fixperms -p$@
dh_installdeb -p$@
dh_makeshlibs -p$@
dh_shlibdeps -p$@
dh_gencontrol -p$@
dh_md5sums -p$@
dh_builddeb -p$@
endef
binary: binary-arch binary-indep
binary-arch: libfox1.0 libfox1.0-dev libfox1.0-dbg
binary-indep: libfox-doc
libfox1.0: install-release-stamp
$(build-deb)
libfox1.0-dev: install-release-stamp
$(build-deb)
libfox-doc: install-release-stamp
$(build-deb)
libfox1.0-dbg: install-debug-stamp
$(build-deb)
clean: clean-configure \
clean-installdirs \
clean-install-release clean-install-debug
.PHONY: clean build configure binary binary-arch binary-indep \
libfox1.0 libfox1.0-dev libfox-doc libfox1.0-dbg
|