changeset 2391:1ab061263ee8 trunk

[svn] - rework objective make _a lot_
author nenolod
date Tue, 23 Jan 2007 10:22:32 -0800
parents 76745f0dd6f4
children 416b41a2d7e9
files ChangeLog Makefile icons/Makefile man/Makefile mk/init.mk mk/objective.mk mk/rules.mk.in skins/Classic/Makefile skins/Default/Makefile skins/Ivory/Makefile skins/Osmosis/Makefile skins/TinyPlayer/Makefile src/Makefile src/audacious/Makefile src/audacious/glade/Makefile src/audacious/images/Makefile src/audacious/ui/Makefile src/audacious/widgets/Makefile src/audtool/Makefile src/intl/Makefile src/libaudacious++/Makefile src/libaudacious/Makefile src/libguess/Makefile src/librcd/Makefile
diffstat 24 files changed, 173 insertions(+), 121 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 23 09:21:53 2007 -0800
+++ b/ChangeLog	Tue Jan 23 10:22:32 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-23 17:21:53 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [3790]
+  - portability fixes for solaris
+  
+  trunk/mk/objective.mk |   16 ++++++++--------
+  1 file changed, 8 insertions(+), 8 deletions(-)
+
+
 2007-01-23 10:51:10 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [3788]
   - strings.h should be installed because plugins may use str_to_utf8().
--- a/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -24,7 +24,7 @@
 build-posthook:
 	@( \
 		echo; \
-		echo "Now type '$(MAKE) documentation-build' to build the audacious SDK docs."; \
+		echo "Now type 'make documentation-build' to build the audacious SDK docs."; \
 		echo "This will require GTK-DOC to be installed."; \
 		echo; \
 	);
--- a/icons/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/icons/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,7 +1,7 @@
-include ../mk/rules.mk
-include ../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 pixmapsdir = $(datadir)/pixmaps
 OBJECTIVE_DATA = audacious.png:$(pixmapsdir)
 
-include ../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/man/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/man/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,6 +1,6 @@
-include ../mk/rules.mk
-include ../mk/init.mk
-include ../mk/objective.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
+include ${top_srcdir}/mk/objective.mk
 
 OBJECTIVE_DATA =	\
 	audtool.1:$(man1dir) \
--- a/mk/init.mk	Tue Jan 23 09:21:53 2007 -0800
+++ b/mk/init.mk	Tue Jan 23 10:22:32 2007 -0800
@@ -1,3 +1,11 @@
+#
+# Objective Make - the dumb buildsystem
+#
+# Copyright (c) 2005 - 2007 William Pitcock <nenolod -at- sacredspiral.co.uk>
+#
+# Redistribution and modification of objective make is expressly 
+# allowed, provided that the above copyright notice is left intact.
+#
 # Shut up GNU make
 .SILENT:
 
@@ -18,3 +26,5 @@
 INCLUDEDIR = $(pkgincludedir)
 CFLAGS += -DHAVE_CONFIG_H -I/usr/pkg/include -I/usr/pkg/xorg/include
 CXXFLAGS += -DHAVE_CONFIG_H -I/usr/pkg/include -I/usr/pkg/xorg/include
+
+OMK_FLAGS = top_srcdir="$$top_srcdir" OVERLAYS=""
--- a/mk/objective.mk	Tue Jan 23 09:21:53 2007 -0800
+++ b/mk/objective.mk	Tue Jan 23 10:22:32 2007 -0800
@@ -1,56 +1,72 @@
+#
+# Objective Make - the dumb buildsystem
+#
+# Copyright (c) 2005 - 2007 William Pitcock <nenolod -at- sacredspiral.co.uk>
+#
+# Redistribution and modification of objective make is expressly
+# allowed, provided that the above copyright notice is left intact.
+#
+
 default: all
 all: build
 
 .SUFFIXES: .cxx .cc
 
+MAKE += $(OMK_FLAGS)
+
 install: build
-	$(MAKE) install-prehook
-	@for i in $(BINDIR) $(LIBDIR) $(INCLUDEDIR); do \
+	@if [ "x$(top_srcdir)" == "x" ]; then \
+		top_srcdir=`pwd`; \
+		$(MAKE) install || exit; \
+		exit 0; \
+	fi; \
+	$(MAKE) install-prehook; \
+	for i in $(BINDIR) $(LIBDIR) $(INCLUDEDIR); do \
 		if [ ! -d $(DESTDIR)/$$i ]; then \
 			$(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
 		fi; \
-	done;
-	@if [ "x$(OVERLAYS)" != "x" ]; then \
+	done; \
+	if [ "x$(OVERLAYS)" != "x" ]; then \
 		for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[installing overlay: $$i]"; \
 			fi; \
 			cd $$i; OVERLAYS="" $(MAKE) install || exit; cd ..; \
 		done; \
-	fi
-	@if [ "x$(SUBDIRS)" != "x" ]; then \
+	fi; \
+	if [ "x$(SUBDIRS)" != "x" ]; then \
 		for i in $(SUBDIRS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[installing subobjective: $$i]"; \
 			fi; \
 			cd $$i; OVERLAYS="" $(MAKE) install || exit; cd ..; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_DIRECTORIES)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_DIRECTORIES)" != "x" ]; then \
 		for i in $(OBJECTIVE_DIRECTORIES); do \
 			printf "%10s     %-20s\n" MKDIR $$i; \
 			$(INSTALL) -d -m 755 $(DESTDIR)/$$i; \
 		done; \
-	fi
-	@if [ "x$(HEADERS)" != "x" ]; then \
+	fi; \
+	if [ "x$(HEADERS)" != "x" ]; then \
 		for i in $(HEADERS); do \
 			printf "%10s     %-20s\n" INSTALL $$i; \
 			$(INSTALL_DATA) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(INCLUDEDIR)/$$i; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
 		for i in $(OBJECTIVE_LIBS); do \
 			printf "%10s     %-20s\n" INSTALL $$i; \
 			$(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(LIBDIR)/$$i; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
 		for i in $(OBJECTIVE_BINS); do \
 			printf "%10s     %-20s\n" INSTALL $$i; \
 			$(INSTALL) $(INSTALL_OVERRIDE) $$i $(DESTDIR)/$(BINDIR)/$$i; \
 		done; \
-	fi;
-	@if [ "x$(OBJECTIVE_DATA)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_DATA)" != "x" ]; then \
 		for i in $(OBJECTIVE_DATA); do \
 			source=`echo $$i | cut -d ":" -f1`; \
 			destination=`echo $$i | cut -d ":" -f2`; \
@@ -60,79 +76,94 @@
 			printf "%10s     %-20s\n" INSTALL $$source; \
 			$(INSTALL_DATA) $(INSTALL_OVERRIDE) $$source $(DESTDIR)/$$destination; \
 		done; \
-	fi
-	$(MAKE) install-posthook
-	@if [ $(VERBOSITY) -gt 0 ]; then \
+	fi; \
+	$(MAKE) install-posthook; \
+	if [ $(VERBOSITY) -gt 0 ]; then \
 		echo "[all objectives installed]"; \
 	fi
 
 clean:
-	$(MAKE) clean-prehook
-	@if [ "x$(OVERLAYS)" != "x" ]; then \
+	@if [ "x$(top_srcdir)" == "x" ]; then \
+		top_srcdir=`pwd`; \
+		$(MAKE) clean || exit; \
+		exit 0; \
+	fi; \
+	$(MAKE) clean-prehook; \
+	if [ "x$(OVERLAYS)" != "x" ]; then \
 		for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[cleaning overlay: $$i]"; \
 			fi; \
 			cd $$i; OVERLAYS="" $(MAKE) clean || exit; cd ..; \
 		done; \
-	fi
-	@if [ "x$(SUBDIRS)" != "x" ]; then \
+	fi; \
+	if [ "x$(SUBDIRS)" != "x" ]; then \
 		for i in $(SUBDIRS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[cleaning subobjective: $$i]"; \
 			fi; \
 			cd $$i; OVERLAYS="" $(MAKE) clean || exit; cd ..; \
 		done; \
-	fi
-	$(MAKE) clean-posthook
-	rm -f *.o *.lo *.so *.a *.sl .depend-done .depend
-	touch .depend
-	@if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
+	fi; \
+	$(MAKE) clean-posthook; \
+	rm -f *.o *.lo *.so *.a *.sl .depend-done .depend; \
+	touch .depend; \
+	if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
 		for i in $(OBJECTIVE_BINS); do \
 			rm -f $$i; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
 		for i in $(OBJECTIVE_LIBS); do \
 			rm -f $$i; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
 		for i in $(OBJECTIVE_LIBS_NOINST); do \
 			rm -f $$i; \
 		done; \
-	fi
-	@if [ $(VERBOSITY) -gt 0 ]; then \
+	fi; \
+	if [ $(VERBOSITY) -gt 0 ]; then \
 		echo "[all objectives cleaned]"; \
 	fi
 
 distclean: clean
-	@if [ "x$(OVERLAYS)" != "x" ]; then \
+	@if [ "x$(top_srcdir)" == "x" ]; then \
+		top_srcdir=`pwd`; \
+		$(MAKE) distclean || exit; \
+		exit 0; \
+	fi; \
+	if [ "x$(OVERLAYS)" != "x" ]; then \
 		for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[distcleaning overlay: $$i]"; \
 			fi; \
 			cd $$i; OVERLAYS="" $(MAKE) distclean || exit; cd ..; \
 		done; \
-	fi
-	@if [ "x$(SUBDIRS)" != "x" ]; then \
+	fi; \
+	if [ "x$(SUBDIRS)" != "x" ]; then \
 		for i in $(SUBDIRS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[distcleaning subobjective: $$i]"; \
 			fi; \
 			cd $$i; OVERLAYS="" $(MAKE) distclean || exit; cd ..; \
 		done; \
-	fi
-	@if [ -f Makefile.in ]; then \
+	fi; \
+	if [ -f Makefile.in ]; then \
 		rm -f Makefile; \
-	fi
-	@if [ -f mk/rules.mk ]; then \
+	fi; \
+	if [ -f mk/rules.mk ]; then \
 		rm -f mk/rules.mk; \
 	fi
 
 build: depend
-	$(MAKE) build-prehook
-	@if [ "x$(OVERLAYS)" != "x" ]; then \
+	@if [ "x$(top_srcdir)" == "x" ]; then \
+		top_srcdir=`pwd`; \
+		$(MAKE) build || exit; \
+		exit 0; \
+	fi; \
+	$(MAKE) build-prehook; \
+	if [ "x$(OVERLAYS)" != "x" ]; then \
 		for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[building overlay: $$i]"; \
@@ -142,8 +173,8 @@
 				echo "[finished overlay: $$i]"; \
 			fi; \
 		done; \
-	fi
-	@if [ "x$(SUBDIRS)" != "x" ]; then \
+	fi; \
+	if [ "x$(SUBDIRS)" != "x" ]; then \
 		for i in $(SUBDIRS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[building subobjective: $$i]"; \
@@ -153,8 +184,8 @@
 				echo "[finished subobjective: $$i]"; \
 			fi; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_LIBS)" != "x" ]; then \
 		for i in $(OBJECTIVE_LIBS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[building library objective: $$i]"; \
@@ -164,8 +195,8 @@
 				echo "[finished library objective: $$i]"; \
 			fi; \
 		done; \
-	fi
-	@if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
+	fi; \
+	if [ "x$(OBJECTIVE_LIBS_NOINST)" != "x" ]; then \
 		for i in $(OBJECTIVE_LIBS_NOINST); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[building library dependency: $$i]"; \
@@ -175,8 +206,8 @@
 				echo "[finished library dependency: $$i]"; \
 			fi; \
 		done; \
-	fi
-	@if test "x$(OBJECTIVE_BINS)" != "x"; then \
+	fi; \
+	if test "x$(OBJECTIVE_BINS)" != "x"; then \
 		for i in $(OBJECTIVE_BINS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[building binary objective: $$i]"; \
@@ -186,9 +217,9 @@
 				echo "[finished binary objective: $$i]"; \
 			fi; \
 		done; \
-	fi
-	$(MAKE) build-posthook
-	@if [ $(VERBOSITY) -gt 0 ]; then \
+	fi; \
+	$(MAKE) build-posthook; \
+	if [ $(VERBOSITY) -gt 0 ]; then \
 		echo "[all objectives built]"; \
 	fi
 
@@ -256,7 +287,12 @@
 
 # default depend rule. if something else is needed -- override depend target
 depend:
-	@if [ "x$(SUBDIRS)" != "x" ]; then \
+	@if [ "x$(top_srcdir)" == "x" ]; then \
+		top_srcdir=`pwd`; \
+		$(MAKE) depend || exit; \
+		exit 0; \
+	fi; \
+	if [ "x$(SUBDIRS)" != "x" ]; then \
 		for i in $(SUBDIRS); do \
 			if [ $(VERBOSITY) -gt 0 ]; then \
 				echo "[building depend file for subobjective: $$i]"; \
@@ -266,7 +302,7 @@
 				echo "[finished subobjective: $$i]"; \
 			fi; \
 		done; \
-	fi
+	fi; \
 	if [ ! -f .depend-done ]; then \
 		for i in ${SOURCES}; do \
 			echo "[generating dependencies for objective: $$i]"; \
--- a/mk/rules.mk.in	Tue Jan 23 09:21:53 2007 -0800
+++ b/mk/rules.mk.in	Tue Jan 23 10:22:32 2007 -0800
@@ -1,7 +1,5 @@
 @SET_MAKE@
 
-srcdir ?= @srcdir@
-top_srcdir ?= @top_srcdir@
 VPATH ?= @srcdir@
 pkgdatadir ?= $(datadir)/@PACKAGE@
 pkglibdir ?= $(libdir)/@PACKAGE@
--- a/skins/Classic/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/skins/Classic/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 skindir = $(pkgdatadir)/Skins/Classic
 
@@ -22,4 +22,4 @@
 	viscolor.txt:$(skindir)		\
 	skin.hints:$(skindir)
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/skins/Default/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/skins/Default/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 skindir = $(pkgdatadir)/Skins/Default
 
@@ -22,4 +22,4 @@
 	viscolor.txt:$(skindir)		\
 	skin.hints:$(skindir)
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/skins/Ivory/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/skins/Ivory/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 skindir = $(pkgdatadir)/Skins/Ivory
 OBJECTIVE_DATA = \
@@ -21,4 +21,4 @@
 	viscolor.txt:$(skindir)		\
 	skin.hints:$(skindir)
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/skins/Osmosis/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/skins/Osmosis/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 skindir = $(pkgdatadir)/Skins/Osmosis
 OBJECTIVE_DATA = \
@@ -21,4 +21,4 @@
 	viscolor.txt:$(skindir)		\
 	skin.hints:$(skindir)
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/skins/TinyPlayer/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/skins/TinyPlayer/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 skindir = $(pkgdatadir)/Skins/TinyPlayer
 OBJECTIVE_DATA = \
@@ -21,4 +21,4 @@
 	viscolor.txt:$(skindir)		\
 	skin.hints:$(skindir)
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/src/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,9 +1,9 @@
 .SILENT:
 
-include ../mk/rules.mk
-include ../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 SUBDIRS = libaudacious $(INTL_OBJECTIVE) $(SUBDIR_GUESS) audacious audtool
 
-include ../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
--- a/src/audacious/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/audacious/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,6 +1,6 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
+include ${top_srcdir}/mk/objective.mk
 
 SUBDIRS = widgets glade images ui
 
@@ -24,7 +24,7 @@
 	$(ARCH_DEFINES)    \
 	$(REGEX_CFLAGS)    \
 	-D_AUDACIOUS_CORE \
-	-I.. -I../..   \
+	-I.. -I${top_srcdir}   \
 	-I../intl
 
 HEADERS = \
--- a/src/audacious/glade/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/audacious/glade/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../../mk/rules.mk
-include ../../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 gladexmldir = $(pkgdatadir)/glade
 
@@ -8,4 +8,4 @@
 	prefswin.glade:$(gladexmldir) \
 	addfiles.glade:$(gladexmldir)
 
-include ../../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/src/audacious/images/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/audacious/images/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../../mk/rules.mk
-include ../../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 imagesdir = $(pkgdatadir)/images
 
@@ -14,4 +14,4 @@
 	plugins.png:$(imagesdir) \
 	eq.png:$(imagesdir)
 
-include ../../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/src/audacious/ui/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/audacious/ui/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../../mk/rules.mk
-include ../../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 gladexmldir = $(pkgdatadir)/ui
 
@@ -8,4 +8,4 @@
 	playlist.ui:$(gladexmldir) \
 	equalizer.ui:$(gladexmldir)
 
-include ../../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
--- a/src/audacious/widgets/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/audacious/widgets/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../../mk/rules.mk
-include ../../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 OBJECTIVE_LIBS_NOINST = libwidgets.a
 
@@ -11,7 +11,7 @@
 	$(BEEP_DEFINES)    \
 	$(ARCH_DEFINES)    \
 	-D_AUDACIOUS_CORE  \
-	-I../../.. \
+	-I${top_srcdir} \
 	-I../..    \
 	-I..	   \
 	-I../../intl \
@@ -38,7 +38,7 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-include ../../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
 libwidgets.a: $(OBJECTS)
 	$(AR) cr $@ $(OBJECTS)
--- a/src/audtool/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/audtool/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,6 +1,6 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
+include ${top_srcdir}/mk/objective.mk
 
 OBJECTIVE_BINS = audtool
 
@@ -15,7 +15,7 @@
 	$(LIBGLADE_CFLAGS) \
 	$(BEEP_DEFINES)    \
 	$(ARCH_DEFINES)    \
-	-I.. -I../..   \
+	-I.. -I${top_srcdir}   \
 	-I../intl
 
 SOURCES = audtool.c
--- a/src/intl/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/intl/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 localedir = $(datadir)/locale
 gettextsrcdir = $(datadir)/gettext/intl
@@ -43,7 +43,7 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
 libintl.a: $(OBJECTS)
 	$(AR) cq $@ $(OBJECTS)
--- a/src/libaudacious++/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/libaudacious++/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 PICLDFLAGS = $(LIBLDFLAGS)
 
@@ -16,7 +16,7 @@
 	$(GTK_CFLAGS)        \
 	$(GCONF_CFLAGS)      \
 	-D_AUDACIOUS_CORE    \
-	-I.. -I../..	      \
+	-I.. -I${top_srcdir}	      \
 	-I../intl
 
 SOURCES = configdb.cxx
@@ -25,7 +25,7 @@
 
 HEADERS = configdb.hh
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
 install-posthook:
 	@mv ${DESTDIR}/${LIBDIR}/libaudacious++$(SHARED_SUFFIX) ${DESTDIR}/${LIBDIR}/libaudacious++$(SHARED_SUFFIX).1.0.0
--- a/src/libaudacious/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/libaudacious/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 PICLDFLAGS = $(LIBLDFLAGS)
 
@@ -16,7 +16,7 @@
 	$(GCONF_CFLAGS)      \
 	$(LIBMCS_CFLAGS)	\
 	-D_AUDACIOUS_CORE    \
-	-I.. -I../..	      \
+	-I.. -I${top_srcdir}	      \
 	-I../intl
 
 CONF_SRC = configdb_$(CONFIGDB_BACKEND).c
@@ -38,7 +38,7 @@
 	beepctrl.h urldecode.h \
 	formatter.h titlestring.h xconvert.h
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
 install-posthook:
 	@mv ${DESTDIR}/${LIBDIR}/libaudacious$(SHARED_SUFFIX) ${DESTDIR}/${LIBDIR}/libaudacious$(SHARED_SUFFIX).4.0.0
--- a/src/libguess/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/libguess/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 OBJECTIVE_LIBS_NOINST = libguess.a
 OBJECTIVE_SONAME_SUFFIX = 0.2.0
@@ -13,7 +13,7 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
 libguess.a: $(OBJECTS)
 	$(AR) cq $@ $(OBJECTS)
--- a/src/librcd/Makefile	Tue Jan 23 09:21:53 2007 -0800
+++ b/src/librcd/Makefile	Tue Jan 23 10:22:32 2007 -0800
@@ -1,5 +1,5 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
+include ${top_srcdir}/mk/rules.mk
+include ${top_srcdir}/mk/init.mk
 
 OBJECTIVE_LIBS_NOINST = librcd.a
 OBJECTIVE_SONAME_SUFFIX = 0.1.8
@@ -13,7 +13,7 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-include ../../mk/objective.mk
+include ${top_srcdir}/mk/objective.mk
 
 libguess.a: $(OBJECTS)
 	$(AR) cq $@ $(OBJECTS)