1## Process this file with automake to produce Makefile.in
2
3ACLOCAL_AMFLAGS = -I m4
4
5SUBDIRS = lpc10 src
6DIST_SUBDIRS = lpc10 src
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	     sox.pc.in LICENSE.GPL LICENSE.LGPL \
15	     cygbuild README.win32 README.osx scripts/batch-example.bat \
16	     README.sh FEATURES.in
17
18pkgconfig_DATA = sox.pc
19
20play.1 rec.1: sox.1
21	$(RM) $@ && $(LN_S) $< $@
22
23README: README.sh FEATURES.in
24	./README.sh
25
26# Rule for making text man pages.  Uses GNU nroff's -c so not portable.
27.1.txt:
28	tbl $< | nroff -man -c | sed "s/.//g" > $@
29.3.txt:
30	tbl $< | nroff -man -c | sed "s/.//g" > $@
31.7.txt:
32	tbl $< | nroff -man -c | sed "s/.//g" > $@
33
34DOCTXT = sox.txt soxi.txt soxformat.txt libsox.txt README
35txt: $(DOCTXT)
36
37# Rule for making PDF man pages
38.1.pdf:
39	pdfroff -t -man --no-toc-relocation -Tps $< > $@
40.3.pdf:
41	pdfroff -t -man --no-toc-relocation -Tps $< > $@
42.7.pdf:
43	pdfroff -t -man --no-toc-relocation -Tps $< > $@
44
45DOCPDF = sox.pdf soxi.pdf soxformat.pdf libsox.pdf
46pdf: $(DOCPDF)
47
48install-pdf: pdf
49	@$(NORMAL_INSTALL)
50	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
51	@list='$(DOCPDF)'; for p in $$list; do \
52	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
53	  f=$(am__strip_dir) \
54	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
55	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
56	  done
57
58uninstall-pdf:
59	@$(NORMAL_UNINSTALL)
60	@list='$(DOCPDF)'; for p in $$list; do \
61	  f=$(am__strip_dir) \
62	  echo " $(RM) '$(DESTDIR)$(pdfdir)/$$f'"; \
63	  $(RM) "$(DESTDIR)$(pdfdir)/$$f"; \
64	  done
65
66distclean-local:
67	$(RM) mingw32-config.cache
68	$(RM) -r -f soxpng
69
70# Rule for making HTML man pages
71#
72# Get rid on unneeded Content-Type, man directory and manpage index in extension.
73# e.g. ../man1/soxi.1.html becomes ../soxi.html
74# Return to Main Contents and link to man2html are also modified.
75FIXHTML = sed 's,<head>,&<link rel="stylesheet" href="http://sox.sourceforge.net/pub/skins/sox/sox.css" type="text/css"></link>,'
76
77.1.html:
78	groff -t -man -Thtml -P -Dsoxpng $< | $(FIXHTML) > $@
79.3.html:
80	groff -t -man -Thtml -P -Dsoxpng $< | $(FIXHTML) > $@
81.7.html:
82	groff -t -man -Thtml -P -Dsoxpng $< | $(FIXHTML) > $@
83
84DOCHTML = sox.html soxi.html soxformat.html libsox.html
85html: $(DOCHTML)
86
87install-html: html
88	@$(NORMAL_INSTALL)
89	test -z "$(htmldir)/soxpng" || $(MKDIR_P) "$(DESTDIR)$(htmldir)/soxpng"
90	@list='$(DOCHTML)'; for p in $$list; do \
91	if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
92	f=$(am__strip_dir) \
93	echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)//$$f'"; \
94	$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
95	done; \
96	@for p in soxpng/*; do \
97	if test -f "$$p"; then d=; else d="$(srcdir)"; fi; \
98	f=$(am__strip_dir) \
99	echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/soxpng/$$f'"; \
100	$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/soxpng/$$f"; \
101	done
102
103uninstall-html:
104	@$(NORMAL_UNINSTALL)
105	@list='$(DOCHTML)'; for p in $$list; do \
106	f=$(am__strip_dir) \
107	echo " $(RM) '$(DESTDIR)$(htmldir)/$$f'"; \
108	$(RM) "$(DESTDIR)$(htmldir)/$$f"; \
109	done; \
110	$(RM) -fr "$(DESTDIR)$(htmldir)/soxpng";
111
112DISTCLEANFILES = $(DOCHTML) $(DOCPDF)
113MAINTAINERCLEANFILES = $(DOCTXT)
114
115install-data-hook:
116	cd $(DESTDIR)$(mandir)/man1 && $(RM) play.1 && $(LN_S) sox.1 play.1
117	cd $(DESTDIR)$(mandir)/man1 && $(RM) rec.1 && $(LN_S) sox.1 rec.1
118	cd $(DESTDIR)$(mandir)/man7 && $(RM) soxeffect.7 && $(LN_S) ../man1/sox.1 soxeffect.7
119
120uninstall-hook:
121	$(RM) $(DESTDIR)$(mandir)/man1/play.1
122	$(RM) $(DESTDIR)$(mandir)/man1/rec.1
123	$(RM) $(DESTDIR)$(mandir)/man7/soxeffect.7
124