1# If the installation of man pages by you (e.g. you're a package builder)
2# You may want to disable it
3man_MANS = lavplay.1  lavrec.1  mjpegtools.1  mpeg2enc.1  mplex.1 \
4	yuvplay.1 lav2wav.1 lav2yuv.1 lavtrans.1 mp2enc.1 \
5	yuvscaler.1 lavpipe.1 yuv2lav.1 yuvdenoise.1 jpeg2yuv.1 \
6	png2yuv.1 \
7        pgmtoy4m.1 ppmtoy4m.1 y4mtoppm.1 y4mcolorbars.1 \
8	y4mtopnm.1 pnmtoy4m.1 \
9        yuvkineco.1 yuvycsnoise.1 yuvmedianfilter.1 \
10	y4munsharp.1 y4mscaler.1 \
11	lav2mpeg.1 yuv4mpeg.5 yuvfps.1 yuvinactive.1 y4mdenoise.1
12
13info_INFO = mjpeg-howto.info
14
15EXTRA_DIST = \
16	$(man_MANS) \
17	FAQ.txt \
18	authors.sgml \
19	lavtools.sgml
20
21MAINTAINERCLEANFILES = Makefile.in
22
23# (Ronald) this stuff comes from texinfos.am on my
24# installation. We need it for proper in-auto-build
25# installation of info pages.
26# It's adapted to handle the debian install-info case
27# too...
28
29INSTALL_INFO = /sbin/install-info
30INFO_ENTRY = "* mjpeg-howto: (mjpeg-howto).        How to use the mjpeg tools"
31INFO_DESCRIPTION = "mjpeg tools documentation"
32
33install-exec-hook: install-info
34dist-hook: dist-info
35
36## Look in both . and srcdir because the info pages might have been
37## rebuilt in the build directory.  Can't cd to srcdir; that might
38## break a possible install-sh reference.
39## Funny name due to --cygnus influence; we want to reserve
40## `install-info' for the user.
41install-info-am: $(info_INFO)
42	@$(NORMAL_INSTALL)
43	$(mkinstalldirs) $(DESTDIR)$(infodir)
44	@list='$(info_INFO)'; \
45	for file in $$list; do \
46	  d=$(srcdir); \
47## We use these strange circumlocutions because we want the "ifile" to
48## be relative, for the install.
49	  for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
50	    if test -f $$d/$$ifile; then \
51	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
52	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
53	    else : ; fi; \
54	  done; \
55	done
56	@$(POST_INSTALL)
57	@if test x$(INSTALL_INFO) != x && test -f $(INSTALL_INFO); then \
58	  list='$(info_INFO)'; \
59	  for file in $$list; do \
60## Run `:' after install-info in case install-info fails.  We really
61## don't care about failures here, because they can be spurious.  For
62## instance if you don't have a dir file, install-info will fail.  I
63## think instead it should create a new dir file for you.  This bug
64## causes the `make distcheck' target to fail reliably.
65	    echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
66## Use `|| :' here because Sun make passes -e to sh; if install-info
67## fails then we'd fail if we used `;'.
68	    if $(SHELL) -c '$(INSTALL_INFO) --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
69	      $(INSTALL_INFO) --entry=$(INFO_ENTRY) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
70	    else \
71## Special Debian case
72	      $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --menuentry=$(INFO_ENTRY) --description=$(INFO_DESCRPITION) $(DESTDIR)$(infodir)/$$file || :; \
73	    fi; \
74	  done; \
75	fi
76
77uninstall-info-am:
78	$(PRE_UNINSTALL)
79## Run two loops here so that we can handle PRE_UNINSTALL and
80## NORMAL_UNINSTALL correctly.
81	if test x$(INSTALL_INFO) != x && test -f $(INSTALL_INFO); then \
82	  list='$(info_INFO)'; \
83	  for file in $$list; do \
84	    if $(SHELL) -c '$(INSTALL_INFO) --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
85## GNU case
86	      $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
87	    else \
88## Debian case
89	      $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --delete $$file; \
90	    fi; \
91	  done; \
92	fi
93	@$(NORMAL_UNINSTALL)
94	list='$(info_INFO)'; \
95	for file in $$list; do \
96	  (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
97	done
98
99dist-info: $(info_INFO)
100	list='$(info_INFO)'; \
101	for base in $$list; do \
102	  d=$(srcdir); \
103	  for file in `cd $$d && eval echo $$base*`; do \
104	    test -f $(distdir)/$$file \
105	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
106	    || cp -p $$d/$$file $(distdir)/$$file; \
107	  done; \
108	done
109