chiark / gitweb /
Fix `distcheck' complaints.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 22 Jan 2016 10:58:36 +0000 (10:58 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 22 Jan 2016 22:39:03 +0000 (22:39 +0000)
  * Have `disobedience/Makefile.am' remove the images and desktop file
    it installs.

  * Remove `lib/versionstring.c' as well as its header file during
    clean.

  * Move source files (but not headers) from `lib/' to new `common/'
    directory if they're needed by other directories, and refer to them
    via the `VPATH' feature rather than using explicit pathnames.  (It
    doesn't work to have the whole of `lib/' on the VPATH because there
    are files in some of the other directories with the same names,
    which breaks in-tree builds.)

clients/Makefile.am
common/Makefile.am [new file with mode: 0644]
common/hreader.c [moved from lib/hreader.c with 100% similarity]
common/memgc.c [moved from lib/memgc.c with 100% similarity]
common/wav.c [moved from lib/wav.c with 100% similarity]
configure.ac
disobedience/Makefile.am
lib/Makefile.am
plugins/Makefile.am
server/Makefile.am
tests/Makefile.am

index bfb7ec2..b80feee 100644 (file)
@@ -16,6 +16,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+VPATH+=${top_srcdir}/common
+
 bin_PROGRAMS=disorder disorderfm disorder-playrtp
 noinst_PROGRAMS=filename-bytes rtpmon resample
 noinst_SCRIPTS=dump2wav
@@ -23,14 +25,14 @@ noinst_SCRIPTS=dump2wav
 AUTOMAKE_OPTIONS=subdir-objects
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 
-disorder_SOURCES=disorder.c authorize.c authorize.h \
-       ../lib/memgc.c
+disorder_SOURCES=disorder.c authorize.c authorize.h
+nodist_disorder_SOURCES=memgc.c
 disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) $(LIBICONV) $(LIBPTHREAD)
 disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
 
-disorderfm_SOURCES=disorderfm.c \
-       ../lib/memgc.c
+disorderfm_SOURCES=disorderfm.c
+nodist_disorderfm_SOURCES=memgc.c
 disorderfm_LDADD=$(LIBOBJS) ../lib/libdisorder.a $(LIBGC) $(LIBICONV)
 disorderfm_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
 
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644 (file)
index 0000000..e58e425
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# This file is part of DisOrder.
+# Copyright (C) 2006-2013 Richard Kettlewell
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+# This directory contains files which are used in other directories
+# implicitly, using make's `VPATH' feature.  The following is a slightly
+# scummy trick.
+EXTRA_LIBRARIES=libcommon.a
+libcommon_a_SOURCES=hreader.c memgc.c wav.c
similarity index 100%
rename from lib/hreader.c
rename to common/hreader.c
similarity index 100%
rename from lib/memgc.c
rename to common/memgc.c
similarity index 100%
rename from lib/wav.c
rename to common/wav.c
index 2ade4ca..52893a4 100644 (file)
@@ -341,7 +341,7 @@ if test -z "$dochtmldir"; then
 fi
 AC_SUBST([dochtmldir])
 
-subdirs="scripts lib"
+subdirs="scripts common lib"
 if test $want_tests = yes; then
   subdirs="${subdirs} libtests"
 fi
@@ -892,6 +892,7 @@ AH_BOTTOM([#ifdef __GNUC__
 AC_CONFIG_FILES([Makefile
                 images/Makefile
                 scripts/Makefile
+                common/Makefile
                 lib/Makefile
                 server/Makefile
                 cgi/Makefile
index 2328bca..bfd5614 100644 (file)
@@ -16,6 +16,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+VPATH+=${top_srcdir}/common
+
 bin_PROGRAMS=disobedience
 SUBDIRS=manual
 
@@ -27,9 +29,10 @@ disobedience_SOURCES=disobedience.h disobedience.c client.c queue.c  \
        recent.c added.c queue-generic.c queue-generic.h queue-menu.c   \
        choose.c choose-menu.c choose-search.c popup.c misc.c           \
        control.c properties.c menu.c log.c progress.c login.c rtp.c    \
-       help.c ../lib/memgc.c settings.c users.c lookup.c choose.h      \
+       help.c settings.c users.c lookup.c choose.h                     \
        popup.h playlists.c multidrag.c multidrag.h autoscroll.c        \
        autoscroll.h globals.c
+nodist_disobedience_SOURCES=memgc.c
 disobedience_LDADD=../lib/libdisorder.a $(LIBPCRE) $(LIBGC) $(LIBGCRYPT) \
        $(LIBASOUND) $(COREAUDIO) $(LIBICONV) -lm \
        $(PULSEAUDIO_SIMPLE_LIBS) $(PULSEAUDIO_LIBS)
@@ -52,6 +55,13 @@ install-data-local:
        $(INSTALL) -m 644 ${top_srcdir}/images/disobedience256x256.png \
                ${DESTDIR}${datarootdir}/icons/hicolor/256x256/apps/disobedience.png
 
+uninstall-local:
+       rm -f ${DESTDIR}${datarootdir}/applications/disobedience.desktop
+       rm -f ${DESTDIR}${datarootdir}/icons/hicolor/48x48/apps/disobedience.png
+       rm -f ${DESTDIR}${datarootdir}/icons/hicolor/64x64/apps/disobedience.png
+       rm -f ${DESTDIR}${datarootdir}/icons/hicolor/128x128/apps/disobedience.png
+       rm -f ${DESTDIR}${datarootdir}/icons/hicolor/256x256/apps/disobedience.png
+
 check: check-help
 
 misc.o: ../images/images.h
index 9d0ff9b..22a9097 100644 (file)
@@ -16,6 +16,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+VPATH+=${top_srcdir}/common
+
 noinst_LIBRARIES=libdisorder.a
 include_HEADERS=disorder.h
 
@@ -52,7 +54,7 @@ libdisorder_a_SOURCES=charset.c charsetf.c charset.h  \
        heap.h                                          \
        hex.c hex.h                                     \
        hostname.c hostname.h                           \
-       hreader.c hreader.h                             \
+       hreader.h                                       \
        ifreq.c ifreq.h                                 \
        inputline.c inputline.h                         \
        kvp.c kvp.h                                     \
@@ -98,9 +100,11 @@ libdisorder_a_SOURCES=charset.c charsetf.c charset.h        \
        vector.c vector.h                               \
        version.c version.h                             \
        versionstring.c                                 \
-       wav.h wav.c                                     \
+       wav.h                                           \
        wstat.c wstat.h                                 \
        disorder.h
+nodist_libdisorder_a_SOURCES=hreader.c                 \
+       wav.c
 
 version-string: ../config.status ${top_srcdir}/scripts/make-version-string
        CC="${CC}" ${top_srcdir}/scripts/make-version-string > $@.new
@@ -142,7 +146,7 @@ client.o: client-stubs.c
 rebuild-unicode:
        cd ${srcdir} && ${top_srcdir}/scripts/make-unidata
 
-CLEANFILES=definitions.h definitions.h.new version-string versionstring.h \
+CLEANFILES=definitions.h definitions.h.new version-string versionstring.[ch] \
           *.gcda *.gcov *.gcno *.c.html index.html
 
 EXTRA_DIST=trackdb.c trackdb-stub.c client-stubs.c eclient-stubs.c \
index c8883b5..ed189c0 100644 (file)
@@ -16,6 +16,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+VPATH+=${top_srcdir}/common
+
 pkglib_LTLIBRARIES=disorder-tracklength.la fs.la notify.la exec.la shell.la \
                   execraw.la
 AUTOMAKE_OPTIONS=subdir-objects
@@ -26,8 +28,8 @@ notify_la_LDFLAGS=-module
 
 disorder_tracklength_la_SOURCES=tracklength.c tracklength.h    \
 tracklength-mp3.c tracklength-ogg.c tracklength-wav.c          \
-tracklength-flac.c mad.c madshim.h ../lib/wav.h ../lib/wav.c   \
-../lib/hreader.h ../lib/hreader.c
+tracklength-flac.c mad.c madshim.h
+nodist_disorder_tracklength_la_SOURCES=wav.c hreader.c
 disorder_tracklength_la_LDFLAGS=-module
 disorder_tracklength_la_LIBADD=$(LIBVORBISFILE) $(LIBMAD) $(LIBFLAC) -lm
 
index 2f049ee..bd17ea9 100644 (file)
@@ -16,6 +16,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+VPATH+=${top_srcdir}/common
+
 sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
              disorder-speaker disorder-decode disorder-normalize \
              disorder-stats disorder-dbupgrade disorder-choose
@@ -28,7 +30,8 @@ AM_CFLAGS=
 disorderd_SOURCES=disorderd.c api.c api-server.c daemonize.c play.c    \
        server.c server-queue.c queue-ops.c state.c plugin.c            \
        schedule.c dbparams.c background.c mount.c \
-       exports.c ../lib/memgc.c disorder-server.h
+       exports.c disorder-server.h
+nodist_disorderd_SOURCES=memgc.c
 disorderd_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBPCRE) $(LIBDB) $(LIBGC) $(LIBGCRYPT) $(LIBICONV) \
        $(LIBASOUND) $(COREAUDIO) $(LIBPTHREAD) $(LIBDL) \
@@ -70,14 +73,16 @@ disorder_normalize_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
 disorder_normalize_DEPENDENCIES=../lib/libdisorder.a
 
 disorder_rescan_SOURCES=rescan.c plugin.c api.c api-server.c exports.c \
-       ../lib/memgc.c disorder-server.h
+       disorder-server.h
+nodist_disorder_rescan_SOURCES=memgc.c
 disorder_rescan_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT) $(LIBDL)
 disorder_rescan_LDFLAGS=-export-dynamic
 disorder_rescan_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_choose_SOURCES=choose.c server-queue.c ../lib/memgc.c \
+disorder_choose_SOURCES=choose.c server-queue.c \
                        disorder-server.h
+nodist_disorder_choose_SOURCES=memgc.c
 disorder_choose_LDADD=$(LIBOBJS) ../lib/libdisorder.a   \
        $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_choose_LDFLAGS=-export-dynamic
@@ -88,12 +93,14 @@ disorder_stats_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_stats_DEPENDENCIES=../lib/libdisorder.a
 
-disorder_dump_SOURCES=dump.c disorder-server.h ../lib/memgc.c
+disorder_dump_SOURCES=dump.c disorder-server.h
+nodist_disorder_dump_SOURCES=memgc.c
 disorder_dump_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBPCRE) $(LIBDB) $(LIBICONV) $(LIBGC) $(LIBGCRYPT)
 disorder_dump_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a
 
-disorder_dbupgrade_SOURCES=dbupgrade.c ../lib/memgc.c disorder-server.h
+disorder_dbupgrade_SOURCES=dbupgrade.c disorder-server.h
+nodist_disorder_dbupgrade_SOURCES=memgc.c
 disorder_dbupgrade_LDADD=$(LIBOBJS) ../lib/libdisorder.a \
        $(LIBDB) $(LIBGC) $(LIBPCRE) $(LIBICONV) $(LIBGCRYPT)
 disorder_dbupgrade_DEPENDENCIES=../lib/libdisorder.a
index 633c73c..cab7004 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+VPATH+=${top_srcdir}/common
+
 noinst_PROGRAMS=disorder-udplog
 
 AUTOMAKE_OPTIONS=subdir-objects
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 
-disorder_udplog_SOURCES=udplog.c ../lib/memgc.c
+disorder_udplog_SOURCES=udplog.c
+nodist_disorder_udplog_SOURCES=memgc.c
 disorder_udplog_LDADD=$(LIBOBJS) ../lib/libdisorder.a $(LIBGC)
 disorder_udplog_DEPENDENCIES=../lib/libdisorder.a