]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'refs/heads/t/build_system'
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 Dec 2014 14:29:17 +0000 (15:29 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 Dec 2014 14:31:56 +0000 (15:31 +0100)
Cooking for more than a month.

* t/build_system:
  Add message to target maintainer-clean.
  Use git version for tarball and AC_INIT().
  Run autom4te instead of autoconf.
  Remove depend.sh.
  Simplify make clean.
  Do not create .d files for gengetopt source files.
  Introduce cmdlist_dir.
  Remove pointless autoconf checks.
  Avoid excessive dep generation on Makefile changes.
  Add -Wformat to STRICT_CFLAGS.
  Compile with -Wall -Wunused only on linux.
  Separate CPPFLAGS and CFLAGS.
  Rename DEBUG_CPPFLAGS to STRICT_CFLAGS.
  Only compile with osl_cppflags where necessary.
  Remove pointless -r option to cp for target tarball.
  Make tarball commands quiet.
  Do not opencode $(tarball).
  Run tr only once in configure.ac.
  Silence ggo_descriptions_declared command.
  Call AC_CONFIG_HEADERS rather than AM_CONFIG_HEADER.
  Remove duplicate -Wno-unused-function.
  Honor --with-xxx-headers also for dependencies.

13 files changed:
.gitignore
Doxyfile
Makefile.real
NEWS
audioc.c
audiod_command.c
autogen.sh
client.c
command.c
configure.ac
depend.sh [deleted file]
m4/gengetopt/makefile
play.c

index d340f2075c05f99ad6b8a3ccb85dd4f293fbcc19..6df2e505aba059b933bad7056e4cc12f1a303207 100644 (file)
@@ -14,9 +14,7 @@ config.log
 config.status
 Makefile
 TODO
-*_command_list.h
-*_command_list.man
-paraslash-git.tar.bz2
+paraslash-*.tar.bz2
 web/dia/overview.pdf
 *.swp
 error2.h
@@ -25,4 +23,3 @@ confdefs.h
 conftest
 conftest.c
 git-version.h
-*_completion.h
index 239cd2622ddb2a2db238749b4e815fae72a1e3cf..4f9743c74fdd5e136874cf7e80167ff086761497 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -621,8 +621,8 @@ EXCLUDE_SYMLINKS       = NO
 EXCLUDE_PATTERNS       = *.cmdline.* \
                          gcc-compat.h \
                          fade.c \
-                       *_command_list.h \
-                       *_completion.h
+                       *.command_list.h \
+                       *.completion.h
 
 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
 # (namespaces, classes, functions, etc.) that should be excluded from the
index ab2389536fd29a9b1cb6196c068a33b122600fd8..ee77cafc4e0b4eeb671c5ea7ec8b7281efe2ac1e 100644 (file)
@@ -21,6 +21,7 @@ object_dir := $(build_dir)/objects
 dep_dir := $(build_dir)/deps
 man_dir := $(build_dir)/man/man1
 cmdline_dir := $(build_dir)/cmdline
+cmdlist_dir := $(build_dir)/cmdlist
 m4depdir := $(build_dir)/m4deps
 help2man_dir := $(build_dir)/help2man
 hostbin_dir := $(build_dir)/host/bin
@@ -31,7 +32,7 @@ test_dir := t
 all_objs := $(sort $(recv_objs) $(filter_objs) $(client_objs) $(gui_objs) \
        $(audiod_objs) $(audioc_objs) $(fade_objs) $(server_objs) \
        $(write_objs) $(afh_objs) $(play_objs))
-deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d))
+deps := $(addprefix $(dep_dir)/, $(filter-out %.cmdline.d, $(all_objs:.o=.d)))
 m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, $(executables)))
 
 # now prefix all objects with object dir
@@ -50,7 +51,7 @@ play_objs := $(addprefix $(object_dir)/, $(play_objs))
 man_pages := $(patsubst %, $(man_dir)/%.1, $(prefixed_executables))
 
 autocrap := config.h.in configure
-tarball_pfx := $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
+tarball_pfx := $(PACKAGE_TARNAME)-$(shell git describe --dirty)
 tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
 tarball := $(tarball_pfx).tar.bz2
 
@@ -68,7 +69,7 @@ ifeq ($(findstring clean, $(MAKECMDGOALS)),)
 endif
 
 $(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir) $(m4depdir) \
-               $(help2man_dir) $(hostbin_dir):
+               $(help2man_dir) $(hostbin_dir) $(cmdlist_dir):
        $(Q) $(MKDIR_P) $@
 
 # When in doubt, use brute force (Ken Thompson)
@@ -80,40 +81,42 @@ $(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,\
 $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\
 $(subst z,Z,$1))))))))))))))))))))))))))
 
-
-DEBUG_CPPFLAGS += -g -Wunused -Wundef -W
-DEBUG_CPPFLAGS += -Wredundant-decls
-DEBUG_CPPFLAGS += -Wall -Wno-sign-compare -Wno-unknown-pragmas
-DEBUG_CPPFLAGS += -Wformat-security
-DEBUG_CPPFLAGS += -Wmissing-format-attribute
-
-ifeq ($(uname_s),Linux)
-       CPPFLAGS += -fdata-sections -ffunction-sections
-       LDFLAGS += -Wl,--gc-sections
-       CPPFLAGS += -Wstrict-prototypes
-       CPPFLAGS += -Wshadow
-       # causes warnings on *BSD for the feature test macros
-       CPPFLAGS += -Wunused-macros
-endif
-CPPFLAGS += -Os
-CPPFLAGS += -Wuninitialized
-CPPFLAGS += -Wchar-subscripts
 CPPFLAGS += -DBINDIR='"$(BINDIR)"'
 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
 CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
-CPPFLAGS += -Werror-implicit-function-declaration
-CPPFLAGS += -Wmissing-noreturn
-CPPFLAGS += -Wbad-function-cast
-CPPFLAGS += -fno-strict-aliasing
 CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F)
 CPPFLAGS += $(arch_cppflags)
 CPPFLAGS += -I/usr/local/include
 CPPFLAGS += -I$(cmdline_dir)
-CPPFLAGS += $(osl_cppflags)
+CPPFLAGS += -I$(cmdlist_dir)
+
+CFLAGS += -Os
+CFLAGS += -Wuninitialized
+CFLAGS += -Wchar-subscripts
+CFLAGS += -Werror-implicit-function-declaration
+CFLAGS += -Wmissing-noreturn
+CFLAGS += -Wbad-function-cast
+CFLAGS += -fno-strict-aliasing
+
+STRICT_CFLAGS = $(CFLAGS)
+STRICT_CFLAGS += -g -Wundef -W
+STRICT_CFLAGS += -Wredundant-decls
+STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas
+STRICT_CFLAGS += -Wformat -Wformat-security
+STRICT_CFLAGS += -Wmissing-format-attribute
 
 LDFLAGS += $(clock_gettime_ldflags)
 
+ifeq ($(uname_s),Linux)
+       # these cause warnings on *BSD
+       STRICT_CFLAGS += -fdata-sections -ffunction-sections
+       STRICT_CFLAGS += -Wstrict-prototypes
+       STRICT_CFLAGS += -Wshadow
+       STRICT_CFLAGS += -Wunused -Wall
+       LDFLAGS += -Wl,--gc-sections
+endif
+
 # To put more focus on warnings, be less verbose as default
 # Use 'make V=1' to see the full commands
 ifeq ("$(origin V)", "command line")
@@ -122,24 +125,36 @@ else
        Q := @
 endif
 
-%_command_list.h: %.cmd %.c
+$(cmdlist_dir)/%.command_list.h: %.cmd %.c | $(cmdlist_dir)
        @[ -z "$(Q)" ] || echo 'GEN $@'
        $(Q) ./command_util.bash h < $< >$@
-%_command_list.man: %.cmd %.c
+$(cmdlist_dir)/%.command_list.man: %.cmd %.c | $(cmdlist_dir)
        @[ -z "$(Q)" ] || echo 'GEN $@'
        $(Q) ./command_util.bash man < $< > $@
-%_completion.h: %.cmd %.c
+$(cmdlist_dir)/%.completion.h: %.cmd %.c | $(cmdlist_dir)
        @[ -z "$(Q)" ] || echo 'GEN $@'
        $(Q) ./command_util.bash compl $(strip $(call TOUPPER,$(*F)))_COMPLETERS \
                $(strip $(call TOUPPER,$(*F)))_COMMANDS < $< > $@
 
-server_command_list.h server_command_list.man server_completion.h: command.c
-afs_command_list.h afs_command_list.man afs_completion.h: afs.c aft.c attribute.c
-audiod_command_list.h audiod_command_list.man audiod_completion.h: audiod_command.c
+$(cmdlist_dir)/server.command_list.h \
+$(cmdlist_dir)/server.command_list.man \
+$(cmdlist_dir)/server.completion.h \
+: command.c
 
-server_command_lists := server_command_list.man afs_command_list.man
-audiod_command_lists := audiod_command_list.man
-play_command_lists := play_command_list.man
+$(cmdlist_dir)/afs.command_list.h \
+$(cmdlist_dir)/afs.command_list.man \
+$(cmdlist_dir)/afs.completion.h \
+: afs.c aft.c attribute.c
+
+$(cmdlist_dir)/audiod,command_list.h \
+$(cmdlist_dir)/audiod,command_list.man \
+$(cmdlist_dir)/audiod,completion.h \
+: audiod_command.c
+
+server_command_lists := $(cmdlist_dir)/server.command_list.man \
+       $(cmdlist_dir)/afs.command_list.man
+audiod_command_lists := $(cmdlist_dir)/audiod.command_list.man
+play_command_lists := $(cmdlist_dir)/play.command_list.man
 
 $(man_dir)/para_server.1: $(server_command_lists)
 $(man_dir)/para_audiod.1: $(audiod_command_lists)
@@ -166,58 +181,78 @@ $(man_dir)/para_%.1: $(ggo_dir)/%.ggo man_util.bash | $(man_dir) $(help2man_dir)
 $(hostbin_dir)/error2: error2.c | $(hostbin_dir)
        @[ -z "$(Q)" ] || echo 'HCC $<'
        $(Q) $(HOSTCC) -o $@ $<
-error2.h: $(hostbin_dir)/error2 Makefile
+error2.h: $(hostbin_dir)/error2 config.h
        @[ -z "$(Q)" ] || echo 'ER2 $<'
        @echo "$(object_executable_matrix)" | $< > $@
 
 $(object_dir)/%.o: %.c | $(object_dir)
-$(object_dir)/opus%.o: CPPFLAGS += $(opus_cppflags)
-$(object_dir)/gui%.o: CPPFLAGS += $(curses_cppflags)
-$(object_dir)/spx%.o: CPPFLAGS += $(speex_cppflags)
-$(object_dir)/%.cmdline.o: CPPFLAGS += -Wno-unused-function
-
-$(object_dir)/mp3_afh.o: CPPFLAGS += $(id3tag_cppflags)
-$(object_dir)/crypt.o: CPPFLAGS += $(openssl_cppflags)
-$(object_dir)/gcrypt.o: CPPFLAGS += $(gcrypt_cppflags)
-$(object_dir)/mp3dec_filter.o: CPPFLAGS += $(mad_cppflags)
-$(object_dir)/compress_filter.o: CPPFLAGS += -O3
-$(object_dir)/ao_write.o: CPPFLAGS += $(ao_cppflags)
-
-$(object_dir)/aacdec_filter.o \
-$(object_dir)/aac_common.o \
-$(object_dir)/aac_afh.o \
+
+$(object_dir)/opus%.o $(dep_dir)/opus%.d: CPPFLAGS += $(opus_cppflags)
+$(object_dir)/gui%.o $(dep_dir)/gui%.d: CPPFLAGS += $(curses_cppflags)
+$(object_dir)/spx%.o $(dep_dir)/spx%.d: CPPFLAGS += $(speex_cppflags)
+$(object_dir)/mp3_afh.o $(dep_dir)/mp3_afh.d: CPPFLAGS += $(id3tag_cppflags)
+$(object_dir)/crypt.o $(dep_dir)/crypt.d: CPPFLAGS += $(openssl_cppflags)
+$(object_dir)/gcrypt.o $(dep_dir)/gcrypt.d: CPPFLAGS += $(gcrypt_cppflags)
+$(object_dir)/ao_write.o $(dep_dir)/ao_write.d: CPPFLAGS += $(ao_cppflags)
+
+$(object_dir)/mp3dec_filter.o $(dep_dir)/mp3dec_filter.d \
+: CPPFLAGS += $(mad_cppflags)
+
+$(object_dir)/aacdec_filter.o $(dep_dir)/aacdec_filter.d \
+$(object_dir)/aac_common.o $(dep_dir)/aac_common.d \
+$(object_dir)/aac_afh.o $(dep_dir)/aac_afh.d \
 : CPPFLAGS += $(faad_cppflags)
 
-$(object_dir)/ogg_afh.o \
-$(object_dir)/oggdec_filter.o \
+$(object_dir)/ogg_afh.o $(dep_dir)/ogg_afh.d \
+$(object_dir)/oggdec_filter.o $(dep_dir)/oggdec_filter.d \
 : CPPFLAGS += $(vorbis_cppflags)
 
-$(object_dir)/spx_common.o \
-$(object_dir)/spxdec_filter.o \
-$(object_dir)/spx_afh.o \
-$(object_dir)/oggdec_filter.o \
-$(object_dir)/ogg_afh.o \
-$(object_dir)/ogg_afh_common.o \
-$(object_dir)/opus%.o \
+$(object_dir)/spx_common.o $(dep_dir)/spx_common.d \
+$(object_dir)/spxdec_filter.o $(dep_dir)/spxdec_filter.d \
+$(object_dir)/spx_afh.o $(dep_dir)/spx_afh.d \
+$(object_dir)/oggdec_filter.o $(dep_dir)/oggdec_filter.d \
+$(object_dir)/ogg_afh.o $(dep_dir)/ogg_afh.d \
+$(object_dir)/ogg_afh_common.o $(dep_dir)/ogg_afh_common.d \
+$(object_dir)/opus%.o $(dep_dir)/opus%.d \
 : CPPFLAGS += $(ogg_cppflags)
 
+$(object_dir)/afs.o $(dep_dir)/afs.d \
+$(object_dir)/aft.o $(dep_dir)/aft.d \
+$(object_dir)/attribute.o $(dep_dir)/attribute.d \
+$(object_dir)/blob.o $(dep_dir)/blob.d  \
+$(object_dir)/mood.o $(dep_dir)/mood.d \
+$(object_dir)/playlist.o $(dep_dir)/playlist.d \
+$(object_dir)/score.o $(dep_dir)/score.d \
+$(object_dir)/server.o $(dep_dir)/server.d \
+$(object_dir)/vss.o $(dep_dir)/vss.d \
+$(object_dir)/command.o $(dep_dir)/command.d \
+$(object_dir)/http_send.o $(dep_dir)/http_send.d \
+$(object_dir)/dccp_send.o $(dep_dir)/dccp_send.d \
+$(object_dir)/udp_send.o $(dep_dir)/udp_send.d \
+$(object_dir)/send_common.o $(dep_dir)/send_common.d \
+$(object_dir)/mm.o $(dep_dir)/mm.d \
+: CPPFLAGS += $(osl_cppflags)
+
+$(object_dir)/%.cmdline.o: CFLAGS += -Wno-unused-function
+$(object_dir)/compress_filter.o: CFLAGS += -O3
+
 $(object_dir)/%.o: %.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
-       $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
+       $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(STRICT_CFLAGS) $<
 
 $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
-       $(Q) $(CC) -c $(CPPFLAGS) -Wno-unused-function -o $@ $<
-
-$(dep_dir)/%.cmdline.d: $(cmdline_dir)/%.cmdline.c error2.h | $(dep_dir)
-       @[ -z "$(Q)" ] || echo 'DEP $<'
-       $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \
-               $(CPPFLAGS) $< > $@
+       $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
 
+# The compiler outputs dependencies either as foo.h or as some_directory/foo.h,
+# depending on whether the latter file exists. Since make needs the directory
+# part we prefix the dependency as appropriate.
 $(dep_dir)/%.d: %.c error2.h | $(dep_dir)
        @[ -z "$(Q)" ] || echo 'DEP $<'
-       $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \
-               $(CPPFLAGS) $< > $@
+       $(Q) $(CC) $(CPPFLAGS) -MM -MG -MP -MT $@ -MT $(object_dir)/$(*F).o $< \
+               | sed -e "s@ \([a-zA-Z0-9_]\{1,\}\.cmdline.h\)@ $(cmdline_dir)/\1@g" \
+               -e "s@ \([a-zA-Z0-9_]\{1,\}\.command_list.h\)@ $(cmdlist_dir)/\1@g" \
+               -e "s@ \([a-zA-Z0-9_]\{1,\}\.completion.h\)@ $(cmdlist_dir)/\1@g" > $@
 
 para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags)
 para_write para_play para_audiod: LDFLAGS += $(ao_ldflags) $(core_audio_ldflags)
@@ -276,22 +311,21 @@ $(prefixed_executables):
 
 clean:
        @[ -z "$(Q)" ] || echo 'CLEAN'
-       $(Q) rm -f $(prefixed_executables)
+       $(Q) rm -f para_*
        $(Q) rm -rf $(object_dir)
 
 clean2: clean
        @[ -z "$(Q)" ] || echo 'CLEAN2'
-       $(Q) rm -f *_command_list.* *_completion.h
        $(Q) rm -rf $(build_dir)
 distclean: clean2 test-clean
        @[ -z "$(Q)" ] || echo 'DISTCLEAN'
        $(Q) rm -f Makefile autoscan.log config.status config.log error2.h
-       $(Q) rm -rf autom4te.cache
        $(Q) rm -f GPATH GRTAGS GSYMS GTAGS
 
 maintainer-clean: distclean
-       rm -f *.tar.bz2 config.h configure config.h.in
-       rm -rf web_sync
+       @[ -z "$(Q)" ] || echo 'MAINTAINER-CLEAN'
+       $(Q) rm -f *.tar.bz2 config.h configure config.h.in
+       $(Q) rm -rf web_sync
 
 install: all man
        $(MKDIR_P) $(BINDIR) $(MANDIR)
@@ -301,13 +335,14 @@ install: all man
        $(MKDIR_P) $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain
 
 $(tarball):
-       rm -rf $(tarball_pfx).tar.bz2 $(tarball_pfx)
-       git archive --format=tar --prefix=$(tarball_pfx)/ HEAD \
+       $(Q) rm -rf $(tarball) $(tarball_pfx)
+       $(Q) git archive --format=tar --prefix=$(tarball_pfx)/ HEAD \
                | tar --delete $(tarball_delete) > $(tarball_pfx).tar
-       $(MKDIR_P) $(tarball_pfx)
-       ./GIT-VERSION-GEN > $(tarball_pfx)/VERSION
-       cp -r $(autocrap) $(tarball_pfx)
-       tar rf $(tarball_pfx).tar $(tarball_pfx)/*
-       bzip2 -9 $(tarball_pfx).tar
-       ls -l $(tarball_pfx).tar.bz2
-       rm -rf $(tarball_pfx)
+       $(Q) $(MKDIR_P) $(tarball_pfx)
+       $(Q) ./GIT-VERSION-GEN > $(tarball_pfx)/VERSION
+       $(Q) cp $(autocrap) $(tarball_pfx)
+       $(Q) tar rf $(tarball_pfx).tar $(tarball_pfx)/*
+       $(Q) bzip2 -9 $(tarball_pfx).tar
+       $(Q) ls -l $(tarball)
+       $(Q) ln -sf $(tarball) paraslash-git.tar.bz2
+       $(Q) rm -rf $(tarball_pfx)
diff --git a/NEWS b/NEWS
index 82e0f0d5b495b1eb4badfd19407cb30a5d35a18b..87337d1c0b18b969e3d231a79aef2353ae6d68a6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,12 +5,15 @@ NEWS
 0.5.4 (to be announced) "exponential alignment"
 -----------------------------------------------
 
+Another cleanup and bugfix release.
+
        - Minor cleanups to daemon.c.
        - New URLs for home page and git services.
        - Improved error diagnostics for the mvblob commands.
        - New sender subcommand: status.
        - Improved help text for server and afs commands.
        - audiod memory leak fixes.
+       - Miscellaneous improvements to the build system.
        - oss_writer improvements.
 
 Download: ./releases/paraslash-git.tar.bz2
index 001619d5eb07f6a0da0368c2055a263be7f381e1..a2bfeb1995abc458daf953b036a0d2edcdd3aed1 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -72,7 +72,7 @@ fail:
 #include "sched.h"
 #include "buffer_tree.h"
 #include "interactive.h"
-#include "audiod_completion.h"
+#include "audiod.completion.h"
 
 static struct sched sched;
 
index 2aae0d805e8286303a43df96b8a172b73e21e093..df8f3936faf89a2c5b5550901d2e6e9bcf12ebdb 100644 (file)
@@ -30,7 +30,7 @@
 #include "write.h"
 #include "fd.h"
 #include "version.h"
-#include "audiod_command_list.h"
+#include "audiod.command_list.h"
 
 extern struct sched sched;
 extern char *stat_item_values[NUM_STAT_ITEMS];
index 2e138de2d5d98dc78796539a30d6f21bd94979c9..d432adbb64aa08a74e4dab7bd21360ebb2ef4227 100755 (executable)
@@ -14,7 +14,12 @@ echo preparing, parallel=$n...
 if test -f Makefile; then
        make maintainer-clean > /dev/null 2>&1
 fi
-autoconf
+autom4te \
+       --language=autoconf \
+       --output=configure \
+       --no-cache \
+       --warnings=all \
+       configure.ac
 autoheader
 echo configuring...
 ./configure $@ > /dev/null
index 4c4806f928950919d0d763a02104e5d93f316796..2159117e7cbff55b04e38d1ab167482419546680 100644 (file)
--- a/client.c
+++ b/client.c
@@ -35,8 +35,8 @@ __printf_2_3 void (*para_log)(int, const char*, ...) = stderr_log;
 
 #ifdef HAVE_READLINE
 #include "interactive.h"
-#include "server_completion.h"
-#include "afs_completion.h"
+#include "server.completion.h"
+#include "afs.completion.h"
 
 struct exec_task {
        struct task *task;
index db28b39dff8362a76d668d16ca6c7ac13541a9c7..80584510b88437a6272c5490c455c8721b9759ba 100644 (file)
--- a/command.c
+++ b/command.c
@@ -35,8 +35,8 @@
 #include "fd.h"
 #include "ipc.h"
 #include "user_list.h"
-#include "server_command_list.h"
-#include "afs_command_list.h"
+#include "server.command_list.h"
+#include "afs.command_list.h"
 #include "signal.h"
 #include "version.h"
 
index 37f2fbc6135d92d532570a0edfc0c1d8503cfe08..79b41a3addcf36f0066838c68edfea2b8de0b7c9 100644 (file)
@@ -3,8 +3,9 @@
 
 AC_PREREQ([2.61])
 
-AC_INIT([paraslash],[git],[maan@tuebingen.mpg.de])
-AC_CONFIG_HEADER([config.h])
+AC_INIT([paraslash], [m4_esyscmd_s(./GIT-VERSION-GEN)],
+       [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/paraslash/])
+AC_CONFIG_HEADERS([config.h])
 
 AC_CONFIG_FILES([Makefile])
 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
@@ -55,54 +56,6 @@ test -z "$install" && AC_MSG_ERROR(
 AC_PROG_CC
 AC_PROG_CPP
 
-AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_STDBOOL
-AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h limits.h netdb.h netinet/in.h \
-       stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h \
-       sys/ipc.h unistd.h utime.h stddef.h],
-       [], [AC_MSG_ERROR([$ac_header not found])])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-AC_TYPE_INT8_T
-AC_TYPE_INT16_T
-AC_TYPE_INT32_T
-AC_TYPE_INT64_T
-AC_TYPE_MODE_T
-AC_TYPE_SSIZE_T
-AC_TYPE_UID_T
-AC_TYPE_UINT8_T
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-
-# Checks for library functions.
-AC_FUNC_FORK
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MEMCMP
-AC_FUNC_MKTIME
-AC_FUNC_MMAP
-AC_FUNC_SELECT_ARGTYPES
-AC_FUNC_STAT
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_FUNC_CLOSEDIR_VOID
-AC_FUNC_LSTAT
-
-AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
-       regcomp select strchr strdup strerror strstr strtol uname \
-       fchdir gettimeofday localtime_r munmap strcasecmp strcspn \
-       strncasecmp strrchr strspn alarm mkdir inet_ntoa socket], [],
-       [AC_MSG_ERROR([function not found, cannot live without it])])
-
 executables="recv filter audioc write afh play"
 ################################################################## clock_gettime
 clock_gettime_lib=
@@ -1541,9 +1494,8 @@ done
 # use echo to replace newlines by space
 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
 
-for obj in $all_errlist_objs; do
-       SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
-done
+SS=$(for obj in $all_errlist_objs; do
+       printf '%s' " SS_$obj,"; done | tr 'a-z' 'A-Z')
 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
        [enum {$SS NUM_SS}],
        [list of all objects that use the paraslash error facility]
diff --git a/depend.sh b/depend.sh
deleted file mode 100755 (executable)
index c6424da..0000000
--- a/depend.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# Call gcc to output a rule suitable for make describing the dependencies of
-# the given input file and parse the output to add a *.d target with the same
-# dependencies.
-
-# The first three arguments to that script are special: $1 is the
-# dependency directory and $2 is the object directory. These are used
-# to prefix the .d and .o targets respectively. $3 is the directory
-# that contains the *.cmdline.h files generated by gengetopt.
-
-# As gcc outputs the dependencies on the *.cmdline.h files either as
-# foo.cmdline.h or as $cmdline_dir/foo.cmdline.h, depending on whether the
-# latter file exists, we prefix the former with $2/
-
-dep_dir="$1"
-object_dir="$2"
-cmdline_dir="$3"
-shift
-shift
-shift
-
-LC_ALL=C cc -MM -MG "$@" \
-       | sed -e "s@^\(.*\)\.o:@$dep_dir/\1.d $object_dir/\1.o:@" \
-       -e "s@[         ^]\([a-zA-Z0-9_]\{1,\}\.cmdline.h\)@ $cmdline_dir/\1@g"
index 79e101a3e4e88f3e55b096b90780615b82b2e602..af90d5bd68cc70d520dbb87fb331ac0ba3f7e317 100644 (file)
@@ -13,7 +13,7 @@ $(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdl
        @[ -z "$(Q)" ] || echo 'GGO $<'
        $(Q) $(GENGETOPT) $(ggo_opts) < $<
 ifeq ($(ggo_descriptions_declared),no)
-       echo 'extern const char *$(*F)_args_info_description;' >> $(cmdline_dir)/$(*F).cmdline.h
+       @echo 'extern const char *$(*F)_args_info_description;' >> $(cmdline_dir)/$(*F).cmdline.h
 endif
 
 $(m4depdir)/%.m4d: $(m4_ggo_dir)/%.m4 | $(m4depdir)
diff --git a/play.c b/play.c
index ed1c6fefb84a060458714b77388e79183bdca762..90207520f5dc1eb21c38c706cf0bd8384de83e69 100644 (file)
--- a/play.c
+++ b/play.c
@@ -633,7 +633,7 @@ static char **get_mapped_keyseqs(void)
        return result;
 }
 
-#include "play_completion.h"
+#include "play.completion.h"
 
 
 /* defines one command of para_play */
@@ -645,11 +645,11 @@ struct pp_command {
        const char *help;
 };
 
-#include "play_command_list.h"
+#include "play.command_list.h"
 static struct pp_command pp_cmds[] = {DEFINE_PLAY_CMD_ARRAY};
 #define FOR_EACH_COMMAND(c) for (c = 0; pp_cmds[c].name; c++)
 
-#include "play_completion.h"
+#include "play.completion.h"
 static struct i9e_completer pp_completers[];
 
 I9E_DUMMY_COMPLETER(jmp);