rate: add some sanity checking
[sox.git] / Makefile.am
blobab025cdbc0a4b2f74707aeba18fc0a826d955bd0
1 ## Process this file with automake to produce Makefile.in
3 ACLOCAL_AMFLAGS = -I m4
5 SUBDIRS = lpc10 src
6 DIST_SUBDIRS = lpc10 src
8 RM = rm -f
10 # man pages are not considered to be sources, so need to add "dist_"
11 # prefix to ensure they are added to the distribution.
12 dist_man_MANS = sox.1 soxi.1 soxformat.7 libsox.3
13 EXTRA_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
18 pkgconfig_DATA = sox.pc
20 play.1 rec.1: sox.1
21         $(RM) $@ && $(LN_S) $< $@
23 README: README.sh FEATURES.in
24         ./README.sh
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/.\b//g" > $@
29 .3.txt:
30         tbl $< | nroff -man -c | sed "s/.\b//g" > $@
31 .7.txt:
32         tbl $< | nroff -man -c | sed "s/.\b//g" > $@
34 DOCTXT = sox.txt soxi.txt soxformat.txt libsox.txt README
35 txt: $(DOCTXT)
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 $< > $@
45 DOCPDF = sox.pdf soxi.pdf soxformat.pdf libsox.pdf
46 pdf: $(DOCPDF)
48 install-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
58 uninstall-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
66 distclean-local:
67         $(RM) mingw32-config.cache
68         $(RM) -r -f soxpng
70 # Rule for making HTML man pages
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.
75 FIXHTML = sed 's,<head>,&<link rel="stylesheet" href="http://sox.sourceforge.net/pub/skins/sox/sox.css" type="text/css"></link>,' 
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) > $@
84 DOCHTML = sox.html soxi.html soxformat.html libsox.html
85 html: $(DOCHTML)
87 install-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
103 uninstall-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";
112 DISTCLEANFILES = $(DOCHTML) $(DOCPDF)
113 MAINTAINERCLEANFILES = $(DOCTXT)
115 install-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
120 uninstall-hook:
121         $(RM) $(DESTDIR)$(mandir)/man1/play.1
122         $(RM) $(DESTDIR)$(mandir)/man1/rec.1
123         $(RM) $(DESTDIR)$(mandir)/man7/soxeffect.7