File: Makefile.dist

package info (click to toggle)
kwave 0.7.2-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,048 kB
  • ctags: 4,906
  • sloc: cpp: 31,275; ansic: 13,111; sh: 9,511; perl: 2,724; makefile: 786; asm: 145
file content (146 lines) | stat: -rw-r--r-- 5,274 bytes parent folder | download
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
############################################################################
#    Kwave                - Makefile.dist
#			     -------------------
#    begin                : Sat Nov 11 2001
#    copyright            : (C) 2000 by Thomas Eschenbacher
#    email                : Thomas.Eschenbacher@gmx.de
############################################################################

############################################################################
#                                                                          #
#    This program is free software; you can redistribute it and/or modify  #
#    it under the terms of the GNU General Public License as published by  #
#    the Free Software Foundation; either version 2 of the License, or     #
#    (at your option) any later version.                                   #
#                                                                          #
############################################################################

#
# >>> This is the Makefile you should use if you downloaded the <<<
# >>> source distribution or checked out from CVS.              <<<
#
# just type:
# make -f Makefile.dist

.PHONY: all all-logged

KDEBINDIRS=$(shell echo ${KDEDIRS}: | sed s-::-:-g | sed s-:-/bin/:-g )

#
# some extra paths, for guessing under different distributions
#

# SuSE
KDEBINDIRS      := $(KDEBINDIRS)":/opt/kde*/bin"

# Gentoo
KDEBINDIRS      := $(KDEBINDIRS)":/usr/kde/*/bin"

# RedHat/Mandrake
KDEBINDIRS      := $(KDEBINDIRS)":/usr/bin"

KDEDIR=$(shell PATH=${KDEBINDIRS}:${PATH} kde-config --prefix | sed s./$$..g)
KDEVERSION=$(shell PATH=${KDEBINDIRS}:${PATH} kde-config --version | grep "KDE:" | \
	cut -d ":" -f 2 | sed s-^\ --g)
KDEMAJOR=$(shell echo "${KDEVERSION}" | cut -d "." -f 1)

KDEQTVER=$(shell PATH=${KDEBINDIRS}:${PATH} kde-config --version | grep "Qt:" | \
	cut -d ":" -f 2 | sed s-^\ --g)
QTDIRVER=$(shell cat ${QTDIR}/include/qglobal.h 2>/dev/null | \
	grep "\#define" | grep "QT_VERSION_STR" | \
	cut -d \" -f 2 )

default: all

logged:
	@ (PATH=${KDEBINDIRS}:${PATH} kde-config 2>/dev/null) || ( \
	    echo "----------------------------------------";\
	    echo ""; \
	    echo "";\
	    echo "sorry, but I cannot detect your KDE base directory."; \
	    echo "";\
	    echo "please make sure that either";\
	    echo "";\
	    echo -n "- the environment variable KDEDIRS is set and contains ";\
	    echo      "your KDE directory," ; \
	    echo "  (current setting: KDEDIRS=${KDEDIRS})";\
	    echo "";\
	    echo "- the program 'kde-config' is in your PATH";\
	    echo "  (current setting: PATH=${PATH})";\
	    echo -n "  calling 'kde-config --prefix' currently returns: "; \
	    kde-config || true; \
	    echo "";\
	    echo "- you have at least KDE version 2.2.1";\
	    echo "";\
	    echo "----------------------------------------";\
	    echo "";\
	    exit -1; \
	);
	@ -rm -f config.h
	@ -rm -f config.cache
	@ -rm -f config.status
	@ -rm -f `find . -name Makefile.in -o -name Makefile`
	@ -rm -Rf `find . -name \.deps -o -name .depend`
	@ -rm -f KDE-VERSION QT-DIR
	@ -touch -c doc/help_{de,fr}.po      2>/dev/null 1>/dev/null
	@ -touch -c doc/help_{de,fr}.docbook 2>/dev/null 1>/dev/null
	@ echo "" ; echo "your system uses:"
	@ PATH=${KDEBINDIRS}:${PATH} kde-config --version
	@ echo ""
	@ echo ">>> you are building for KDE-${KDEMAJOR} <<<"
	@ echo ""
	@ echo ${KDEMAJOR} > ./KDE-VERSION
	@ rm -f ./QT-DIR;
	@ echo "${QTDIR}" > ./QT-DIR
	@ echo "QTDIR=${QTDIR}"
	@ if test -f ${QTDIR}/include/qglobal.h ; then { \
	    if test "${QTDIRVER}" \< "${KDEQTVER}"; then { \
		echo "QTDIR is set and seems to contain Qt version ${QTDIRVER}"; \
		echo "this does not match your KDE's Qt version: ${KDEQTVER}"; \
		echo ">>> forcing QTDIR=\"\" <<<"; \
		rm -f ./QT-DIR; \
		echo "" > ./QT-DIR; \
		echo ""; \
		echo "if your build fails, please verify that your QTDIR "; \
		echo "environment variable is pointing to the correct "; \
		echo "directory and try again."; \
		sleep 5; \
		echo ""; \
	    } fi \
	} fi
	@ for dir in . ; do { \
		cd $$dir; \
		export WANT_AUTOMAKE_1_7=1  ; \
		export WANT_AUTOCONF_2_5=1  ; \
		export WANT_AUTOMAKE=1.7    ; \
		export WANT_AUTOCONF=2.5    ; \
		libtoolize --force --copy --automake ; \
		aclocal-1.7 -I ./admin; \
		autoheader${AUTOCONF_SUFFIX} ; \
		automake-1.7 --foreign --add-missing --copy --include-deps ; \
		autoconf${AUTOCONF_SUFFIX} ; \
		cd - ; \
	}; done;
	QTDIR=`cat ./QT-DIR` KDEDIR=${KDEDIR} \
	./configure --enable-debug=no --enable-final=yes \
		--enable-static=no --enable-dynamic=yes \
		${CONFIGURE_OPTS} \
		CXXFLAGS="${RPM_OPT_FLAGS}" \
		CFLAGS="${RPM_OPT_FLAGS}"
	- @ ${MAKE} clean-generic 2>/dev/null 1>/dev/null
	- @ ${MAKE} clean 2>/dev/null 1>/dev/null
	# now you can run "make"

all:
	-rm -f make.log
	@ ( ${MAKE} -f Makefile.dist logged 2>&1 | tee make.log) || ( \
	    echo "";\
	    echo "======================================================";\
	    echo "make failed. if you are not successful in solving the"; \
	    echo "problem on your own, please write a e-mail to the";\
	    echo "author(s) and include the file 'make.log' that has";\
	    echo "been created.";\
	    echo "======================================================";\
	    echo "";\
	    exit -1; \
	);