1## Process this file with automake to produce Makefile.in
2
3ACLOCAL_AMFLAGS = -I m4
4
5SUBDIRS = lpc10 libgsm src
6DIST_SUBDIRS = lpc10 libgsm src msvc9 msvc10
7
8RM = rm -f
9
10# man pages are not considered to be sources, so need to add "dist_"
11# prefix to ensure they are added to the distribution.
12dist_man_MANS = sox.1 soxi.1 soxformat.7 libsox.3
13EXTRA_DIST = sox.txt soxi.txt soxformat.txt libsox.txt \
14	     CMakeLists.txt sox.pc.in LICENSE.GPL LICENSE.LGPL \
15	     cygbuild README.win32 README.osx scripts/batch-example.bat \
16	     README.sh FEATURES.in
17
18if HAVE_PKGCONFIG
19pkgconfigdir = @PKGCONFIGDIR@
20pkgconfig_DATA = sox.pc
21endif
22
23play.1 rec.1: sox.1
24	$(RM) $@ && $(LN_S) $< $@
25
26README: README.sh FEATURES.in
27	./README.sh
28
29# Rule for making text man pages.  Uses GNU nroff's -c so not portable.
30.1.txt:
31	tbl $(srcdir)/$< | nroff -man -c | sed "s/.//g" > $@
32.3.txt:
33	tbl $(srcdir)/$< | nroff -man -c | sed "s/.//g" > $@
34.7.txt:
35	tbl $(srcdir)/$< | nroff -man -c | sed "s/.//g" > $@
36
37DOCTXT = sox.txt soxi.txt soxformat.txt libsox.txt README
38txt: $(DOCTXT)
39
40# Rule for making PDF man pages
41.1.pdf:
42	pdfroff -t -man -Tps $(srcdir)/$< > $@
43.3.pdf:
44	pdfroff -t -man -Tps $(srcdir)/$< > $@
45.7.pdf:
46	pdfroff -t -man -Tps $(srcdir)/$< > $@
47
48DOCPDF = sox.pdf soxi.pdf soxformat.pdf libsox.pdf
49pdf: $(DOCPDF)
50
51install-pdf: pdf
52	@$(NORMAL_INSTALL)
53	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
54	@list='$(DOCPDF)'; for p in $$list; do \
55	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
56	  f=$(am__strip_dir) \
57	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
58	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
59	  done
60
61uninstall-pdf:
62	@$(NORMAL_UNINSTALL)
63	@list='$(DOCPDF)'; for p in $$list; do \
64	  f=$(am__strip_dir) \
65	  echo " $(RM) '$(DESTDIR)$(pdfdir)/$$f'"; \
66	  $(RM) "$(DESTDIR)$(pdfdir)/$$f"; \
67	  done
68
69distclean-local:
70	$(RM) mingw32-config.cache
71	$(RM) -r -f soxpng
72
73# Rule for making HTML man pages
74#
75# Get rid on unneeded Content-Type, man directory and manpage index in extension.
76# e.g. ../man1/soxi.1.html becomes ../soxi.html
77# Return to Main Contents and link to man2html are also modified.
78FIXHTML = sed 's,<head>,&<link rel="stylesheet" href="http://sox.sourceforge.net/pub/skins/sox/sox.css" type="text/css"></link>,'
79
80.1.html:
81	groff -t -man -Thtml -P -Dsoxpng $(srcdir)/$< | $(FIXHTML) > $@
82.3.html:
83	groff -t -man -Thtml -P -Dsoxpng $(srcdir)/$< | $(FIXHTML) > $@
84.7.html:
85	groff -t -man -Thtml -P -Dsoxpng $(srcdir)/$< | $(FIXHTML) > $@
86
87DOCHTML = sox.html soxi.html soxformat.html libsox.html
88html: $(DOCHTML)
89
90install-html: html
91	@$(NORMAL_INSTALL)
92	test -z "$(htmldir)/soxpng" || $(MKDIR_P) "$(DESTDIR)$(htmldir)/soxpng"
93	@list='$(DOCHTML)'; for p in $$list; do \
94	if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
95	f=$(am__strip_dir) \
96	echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)//$$f'"; \
97	$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
98	done; \
99	@for p in soxpng/*; do \
100	if test -f "$$p"; then d=; else d="$(srcdir)"; fi; \
101	f=$(am__strip_dir) \
102	echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/soxpng/$$f'"; \
103	$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/soxpng/$$f"; \
104	done
105
106uninstall-html:
107	@$(NORMAL_UNINSTALL)
108	@list='$(DOCHTML)'; for p in $$list; do \
109	f=$(am__strip_dir) \
110	echo " $(RM) '$(DESTDIR)$(htmldir)/$$f'"; \
111	$(RM) "$(DESTDIR)$(htmldir)/$$f"; \
112	done; \
113	$(RM) -fr "$(DESTDIR)$(htmldir)/soxpng";
114
115DISTCLEANFILES = $(DOCHTML) $(DOCPDF)
116MAINTAINERCLEANFILES = $(DOCTXT)
117
118install-data-hook:
119	cd $(DESTDIR)$(mandir)/man1 && $(RM) play.1 && $(LN_S) sox.1 play.1
120	cd $(DESTDIR)$(mandir)/man1 && $(RM) rec.1 && $(LN_S) sox.1 rec.1
121	cd $(DESTDIR)$(mandir)/man7 && $(RM) soxeffect.7 && $(LN_S) ../man1/sox.1 soxeffect.7
122
123uninstall-hook:
124	$(RM) $(DESTDIR)$(mandir)/man1/play.1
125	$(RM) $(DESTDIR)$(mandir)/man1/rec.1
126	$(RM) $(DESTDIR)$(mandir)/man7/soxeffect.7
127
128# Automatically update libtool script if it gets out-of-date
129libtool: $(LIBTOOL_DEPS)
130	$(SHELL) ./config.status --recheck
131