File: Makefile.in

package info (click to toggle)
solfege 2.0.4-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,200 kB
  • ctags: 1,844
  • sloc: python: 12,160; xml: 5,458; ansic: 1,486; makefile: 562; sh: 233
file content (226 lines) | stat: -rw-r--r-- 7,603 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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
#
# GNU Solfege - eartraining for GNOME
# Copyright (C) 2000, 2001, 2002, 2003  Tom Cato Amundsen
#
# 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 program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

@SET_MAKE@

include Makefile.inc

.PHONY : rpm deb 
SUBDIRS = po feta lesson-files mpd online-docs soundcard src test tools topdocs graphics

FAQ INSTALL.win32 README INSTALL : topdocs/defs.texi

%: topdocs/%.texi
	LC_ALL=C makeinfo -I topdocs --no-split --no-headers --output $(notdir $(basename $<)) $<

ifeq ($(WITH_GNOME),no)
SUBDIRS := $(SUBDIRS) gnomeemu
endif

dist_files = AUTHORS COPYING INSTALL FAQ INSTALL.win32 \
	Makefile.in Makefile.inc.in config.h.in \
	README TODO changelog configure configure.ac \
	default.config system.rc finn \
	install-sh py-compile run-solfege.py.in \
	solfege.manpage.xml.in solfege.bat  \
	solfege.desktop solfege.gtkrc solfege.py \
	windowsinstaller.iss.in windowsinstaller.iss \
	solfege.redhat8.spec.in solfege.redhat8.spec \
	solfege.redhat9.spec.in solfege.redhat9.spec \
	solfege.suse82.spec.in solfege.suse82.spec \
	acinclude.m4 aclocal.m4 \
	runpy2exe.bat setup.py easy.diff

ifeq ($(WITH_LOCAL_XMLCATALOG),yes)
SGML_CATALOG_FILES += online-docs/stupid_catalog_file.cat
endif

solfege.1: solfege.manpage.xml
ifeq ($(WITH_LOCAL_XMLCATALOG),yes)
	SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) $(XSLTPROC) --nonet --catalogs  $(dir $(stylesheet_filename))/../manpages/docbook.xsl $<
else
	$(XSLTPROC) $(dir $(stylesheet_filename))/../manpages/docbook.xsl $<
endif

all: AUTHORS INSTALL README FAQ INSTALL.win32 solfege.1
	for dir in $(SUBDIRS); do \
	  $(MAKE) -C $$dir; \
	done

chl:# 2002-12-18 is the time of 1.9.3 release
	cvs2cl -l "-d'>2002-12-29 05:00'" -I "cvsignore" 

po-update:
#	$(XGETTEXT) --keyword=_ $(wildcard src/*.py)
	pygettext -o solfege.pot -p po --keyword=_i $(wildcard src/*.py) \
	   $(wildcard mpd/*.py) \
           $(filter-out lesson-files/CVS,$(wildcard lesson-files/*)) \
	   online-docs/create_toc.py \
                             $(wildcard gnomeemu/gnome/*.py)  
	#	--output-dir=po 
		#--default-domain=$(PACKAGE) --output-dir=po 
		#2> /dev/null
	$(MAKE) -C po po-update

install: all mkinstalldirs
	$(INSTALL_PROGRAM) run-solfege.py $(bindir)/solfege$(VERSION)
	$(INSTALL_PROGRAM) run-solfege.py $(bindir)/solfege
	$(INSTALL_DATA) solfege.gtkrc $(datadir)/$(PACKAGE)/$(VERSION)
	$(INSTALL_DATA) default.config $(datadir)/$(PACKAGE)/$(VERSION)
	$(INSTALL_DATA) solfege.1 $(mandir)/man1
	$(INSTALL_DATA) system.rc $(sysconfdir)/$(PACKAGE)$(MAJOR_VERSION).$(MINOR_VERSION)
ifeq ($(WITH_GNOME),yes)
	mkdir -p $(datadir)/applications/
	$(INSTALL_DATA) solfege.desktop $(datadir)/applications/
else
	$(MAKE) -C gnomeemu install
endif
	$(LOOP)

mkinstalldirs:
	mkdir -p $(mandir)/man1
	mkdir -p $(bindir)
	mkdir -p $(datadir)/$(PACKAGE)/$(VERSION)
	mkdir -p $(sysconfdir)

uninstall:
	$(LOOP)
	rm -f $(mandir)/man1/solfege.1*
	rm -f $(datadir)/$(PACKAGE)/$(VERSION)/solfege.gtkrc
	rm -f $(datadir)/$(PACKAGE)/$(VERSION)/default.config
	rm -f $(sysconfdir)/$(PACKAGE)$(MAJOR_VERSION).$(MINOR_VERSION)
ifeq ($(WITH_GNOME),yes)
	rm -f $(datadir)/gnome/apps/Applications/solfege.desktop
endif
	rm -f $(bindir)/solfege$(VERSION)
	rm -f $(bindir)/solfege
	rmdir $(datadir)/$(PACKAGE)/$(VERSION) || true
	rmdir $(datadir)/$(PACKAGE) || true

assert_cwd:
ifneq ($(notdir $(PWD)),$(DISTNAME))
	@echo "Sorry, but the current working directory has to be" $(DISTNAME)
	@echo "to do that. PWD=" $(PWD)
	exit -1
endif

EASYDISTNAME=solfege-easybuild-$(VERSION)
easy-dist: all
	rm -rf $(EASYDISTNAME)
	$(MAKE) DISTNAME=$(EASYDISTNAME) dist_workhorse
	$(MAKE) DISTNAME=$(EASYDISTNAME) -C online-docs easy-dist
	cd $(EASYDISTNAME) && patch -p1 < ../easy.diff 
	cp solfege.1 $(EASYDISTNAME)
	cd $(EASYDISTNAME) && autoconf 
	tar --gzip --create --file=../$(EASYDISTNAME).tar.gz $(EASYDISTNAME)
	rm -rf $(EASYDISTNAME)

dist: dist_workhorse
	tar --gzip --create --file=../$(DISTNAME).tar.gz $(DISTNAME)
	rm -rf $(DISTNAME)

dist_workhorse: AUTHORS INSTALL README FAQ INSTALL.win32
	# FIXME
	make -C online-docs/C update-version-strings
	make -C online-docs/no update-version-strings
	make -C online-docs/ru update-version-strings
	make -C online-docs/es_MX update-version-strings
	rm -rf $(DISTNAME)
	mkdir $(DISTNAME)
	cp $(dist_files) $(DISTNAME)
	for dir in debian-dir $(filter-out gnomeemu, $(SUBDIRS)) gnomeemu ; do \
	  $(MAKE) -C $$dir dist; \
	done


win32-dist: AUTHORS INSTALL README FAQ INSTALL.win32
	./configure --without-gnome --without-gtkhtml
	$(MAKE)
	rm -rf $(DISTNAME)
	rm -rf $(PACKAGE)-win32-$(VERSION)
	mkdir $(DISTNAME)
	cp $(dist_files) $(DISTNAME)
	for dir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$dir dist; \
	done

	cp ../solfege-win32-binaries/midiplayer.exe $(DISTNAME)/tools
	$(MAKE) -C soundcard winmidi.pyd
	cp soundcard/winmidi.pyd $(DISTNAME)/soundcard
	cp src/configureoutput.py $(DISTNAME)/src
	sed -e "s/^type=.*/type=winsynth/" -e "s/^device_file=.*/device_file=/" -e "s/^synth_number=.*/synth_number=/" -e "s/^commandline=.*/commandline=tools\\\midiplayer.exe %s/" -e "s/^version=.*/version=1.1.3/" default.config > $(DISTNAME)/default.config
	$(MAKE) -C online-docs win32-dist 

	flip -m -b $(DISTNAME)/README
	mv $(DISTNAME)/README $(DISTNAME)/README.txt
	flip -m -b $(DISTNAME)/INSTALL
	mv $(DISTNAME)/INSTALL $(DISTNAME)/INSTALL.txt
	flip -m -b $(DISTNAME)/INSTALL.win32
	mv $(DISTNAME)/INSTALL.win32 $(DISTNAME)/INSTALL.win32.txt
	flip -m -b $(DISTNAME)/FAQ
	mv $(DISTNAME)/FAQ $(DISTNAME)/FAQ.txt
	flip -m -b $(DISTNAME)/COPYING
	mv $(DISTNAME)/COPYING $(DISTNAME)/COPYING.txt
	flip -m -b $(DISTNAME)/AUTHORS
	mv $(DISTNAME)/AUTHORS $(DISTNAME)/AUTHORS.txt
		
	mv $(DISTNAME) $(PACKAGE)-win32-$(VERSION)
	cp --recursive share $(PACKAGE)-win32-$(VERSION)
	rm -f ../$(PACKAGE)-win32-$(VERSION).zip
	zip -9 -r ../$(PACKAGE)-win32-$(VERSION).zip $(PACKAGE)-win32-$(VERSION)
	rm -rf $(PACKAGE)-win32-$(VERSION)

clean-toplevel:
	rm -f *.pyc *.pyo
	rm -rf share
	# remove those subdirs gimp like to spread around
	find -type d|grep .xvpics|xargs rm -rf

clean: clean-toplevel
	$(LOOP)

distclean: clean-toplevel
	$(LOOP)
	rm -f config.status config.cache config.log
	rm -f install-stamp build-stamp

	rm -f Makefile Makefile.inc config.h debian-solfege.py run-solfege.py Variables.make solfege.1 solfege.manpage.xml installer.nsi debian-solfege.py.in
	rm -f config.cache config.log config.status # configure

count_c_lines:
	wc --lines $(wildcard soundcard/*.c)

count_lines:
	wc --lines $(wildcard mpd/*.py soundcard/*.py src/*.py)
	@echo "Counted python files, but not counting gnomeemu/"

export-to-dos:
	rm -rf ../solfege-export-to-dos
	autoconf
	./configure --without-gnome --without-gtkhtml
	$(MAKE)
	$(MAKE) -C soundcard winmidi.pyd
	cd .. && cp -R solfege solfege-export-to-dos
	cd ../solfege-export-to-dos && make export-to-dos-step-two

export-to-dos-step-two:
	for fn in AUTHORS COPYING FAQ README INSTALL INSTALL.win32 ; do \
	  flip -m -b $$fn; \
	  mv $$fn $$fn.txt; \
	done
	mv gnomeemu/gnome gnome