- @if test -a $(INSTALLdir)/directory.list ; then \
- echo "NOTE: directory.list already exists, not changed." ; else \
- cp -v default/directory.list $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_american ; then \
- echo "NOTE: american tones already exists, not overwritten." ; else \
- cp -a tones_american $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_german ; then \
- echo "NOTE: german tones already exists, not overwritten." ; else \
- cp -a tones_german $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/vbox_german ; then \
- echo "NOTE: german vbox tones already exists, not overwritten." ; else \
- cp -a vbox_german $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/vbox_english ; then \
- echo "NOTE: english vbox tones already exists, not overwritten." ; else \
- cp -a vbox_english $(INSTALLdir) ; fi
- @if test -a $(INSTALLdir)/tones_efi ; then \
- echo "NOTE: special efi tones already exists, not overwritten." ; else \
- cp -a tones_efi $(INSTALLdir) ; fi
-if ENABLE_ASTERISK_CHANNEL_DRIVER
- @echo "Moving chan_lcr.so (if it fails, do it manually)"
- mv $(sbindir)/chan_lcr.so $(astmoddir)
-endif
+ @ds='$(TONEDIRS)' ; for d in $$ds ; do \
+ destdir="$(DESTDIR)$(SHAREdir)/$$d" ; \
+ if test -a "$$destdir" ; then \
+ echo "NOTE: $$d already exists, not overwritten." ; \
+ else mkdir -p "$$destdir" ; cp -a $(srcdir)/$$d/* "$$destdir/" ; fi ; \
+ done
+
+
+# Because distuninstallcheck expects relative filenames, we cannot
+# replace './' with $(prefix) in _listfiles. Therefore we do it the
+# other way around to filter out configuration files and tones.
+distcheck_CONFIGdir = echo $(CONFIGdir) | sed 's|^$(prefix)/|./|'
+distcheck_SHAREdir = echo $(SHAREdir) | sed 's|^$(prefix)/|./|'
+
+distuninstallcheck_listfiles = find . -type f -print \
+ | $(GREP) -v "$$( $(distcheck_CONFIGdir) )" \
+ | $(GREP) -v "$$( $(distcheck_SHAREdir) )"
+
+
+clean-generic:
+ rm -f *.po