File: Makefile

package info (click to toggle)
xmp 2.0.4d-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,836 kB
  • ctags: 3,406
  • sloc: ansic: 23,689; sh: 2,617; makefile: 751
file content (162 lines) | stat: -rw-r--r-- 3,974 bytes parent folder | download | duplicates (2)
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
# Extended Module Player toplevel Makefile
# $Id: Makefile,v 1.12 2001/01/20 01:51:28 claudio Exp $

# DIST		distribution package name
# DFILES	standard distribution files 
# DDIRS		standard distribution directories

XCFLAGS	= -Iloaders/include
TEST_XM	=
DIST	= xmp-$(VERSION)
RPMSPEC	= etc/xmp.spec
RPMRC	= etc/rpmrc
MODULES	=
DFILES	= README INSTALL configure configure.in Makefile Makefile.rules.in \
	  $(MODULES)
DDIRS	= lib docs etc src scripts debian modules
CFILES	=
DCFILES	= Makefile.rules.old config.log config.status config.cache

all: xmp

xmp:
	$(MAKE) -C lib
	$(MAKE) -C src

include Makefile.rules

distclean::
	rm -f Makefile.rules

configure: configure.in
	autoconf

check: test

dust:
	@echo "<cough, cough>"

test: xmp
	time -v player/xmp -vvv $(MODULES)

install-plugin:
	$(MAKE) -C src/xmms install

install::
	@echo
	@echo "  Installation complete. To customize, copy /etc/xmp.conf to"
	@echo "  \$$HOME/.xmp/xmp.conf and /etc/xmp-modules.conf to \$$HOME/.xmp/modules.conf"
	@echo
	@echo "  Please report bugs to xmp-bugs@helllabs.org."
	@echo

uninstall:
	rm -f $(BIN_DIR)/xmp
	rm -f $(BIN_DIR)/xxmp
	rm -f $(MAN_DIR)/xmp.1
	rm -f $(MAN_DIR)/xxmp.1
	rm -f /etc/xmp.conf /etc/xmp-modules.conf


# Extra targets:
# 'dist' prepares a distribution package
# 'dist-dfsg' prepares a DFSG-compliant distribution package
# 'mark' marks the last RCS revision with the package version number
# 'whatsout' lists the locked files
# 'diff' creates a diff file
# 'rpm' generates a RPM package

dist: docs Makefile
	if [ -x /usr/bin/dh_clean ]; then dh_clean; fi
	rm -Rf $(DIST) $(DIST).tar.gz
	mkdir $(DIST)
	$(MAKE) DISTDIR=$(DIST) subdist
	cat Makefile.rules.in | \
	sed "s/$(DATE)/`date`/" > $(DIST)/Makefile.rules.in
	mv -f Makefile.rules.in Makefile.rules.old
	cp $(DIST)/Makefile.rules.in .
	chmod -R u+w $(DIST)/*
	tar cvf - $(DIST) | gzip -9c > $(DIST).tar.gz
	rm -Rf $(DIST)
	./config.status
	touch -r Makefile.rules.old Makefile.rules.in Makefile.rules
	sync
	ls -l $(DIST).tar.gz

dist-dfsg:
	if [ -x /usr/bin/dh_clean ]; then dh_clean; fi
	rm -Rf $(DIST) $(DIST)-dfsg.tar.gz
	mkdir $(DIST)
	$(MAKE) DISTDIR=$(DIST) subdist
	cat Makefile.rules.in | \
	sed "s/^\(VERSION.*= .*\)/\1d/" | \
	sed "s/$(DATE)/`date`/" > $(DIST)/Makefile.rules.in
	chmod -R u+w $(DIST)/*
	(cd $(DIST)/src/misc; cp depack.c-dfsg depack.c)
	(cd $(DIST)/src/player; cp fmopl.c-dfsg fmopl.c)
	(cd $(DIST)/src/player; cp fmopl.h-dfsg fmopl.h)
	(cd $(DIST); a=`grep -n "^59 Temple Place" README`; \
	 mv README README.old; head -$${a%:*} README.old > README; \
	 echo >> README; rm README.old)
	tar cvf - $(DIST) | gzip -9c > $(DIST)-dfsg.tar.gz
	rm -Rf $(DIST)
	./config.status
	touch -r Makefile.rules.old Makefile.rules.in Makefile.rules
	sync
	ls -l $(DIST)-dfsg.tar.gz

bz2: dist
	@zcat $(DIST).tar.gz | bzip2 > $(DIST).tar.bz2
	@ls -l $(DIST).tar.bz2
	@sync

bindist:
	$(MAKE) _bindist1 CONFIGURE="./configure"

binpkg: bindist $(PORTS)

_bindist1:
	rm -Rf $(DIST)
	gzip -dc $(DIST).tar.gz | tar xvf -
	cd $(DIST); $(CONFIGURE); $(MAKE) _bindist2
	rm -Rf $(DIST)
	sync

_bindist2: xmp
	strip src/main/xmp src/main/xxmp
	cat src/main/xmp | gzip -9c > ../xmp-$(VERSION)_$(PLATFORM).gz
	cat src/main/xxmp | gzip -9c > ../xxmp-$(VERSION)_$(PLATFORM).gz

mark:
	ID=`echo $(VERSION) | sed 's/\./_/g'`; \
	rcs -nxmp_$$ID: RCS/*

chkoldver:
	@if [ "$(OLDVER)" = "" ]; then \
	    echo "parameter missing: OLDVER=<old_version>"; \
	    false; \
	fi

diff: chkoldver
	@if [ "$(OLDVER)" != "none" ]; then \
	    echo "Creating diff from $(OLDVER) to $(VERSION)"; \
	    rm -Rf xmp-$(OLDVER) xmp-$(VERSION); \
	    tar xzf xmp-$(OLDVER).tar.gz; \
	    tar xzf xmp-$(VERSION).tar.gz; \
	    diff -rud --new-file xmp-$(OLDVER) xmp-$(VERSION) | gzip -9c > \
		xmp-$(OLDVER)-$(VERSION).diff.gz; \
	    rm -Rf xmp-$(OLDVER) xmp-$(VERSION); \
	    sync; \
	fi

rpm:
	rpm -ba $(RPMSPEC)

deb:
	fakeroot debian/rules binary

Makefile.rules: Makefile.rules.in
	./config.status

$(OBJS): Makefile