]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
build: Introduce $prefixed_executables.
authorAndre Noll <maan@systemlinux.org>
Sun, 15 Sep 2013 01:30:27 +0000 (01:30 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:57:20 +0000 (11:57 +0100)
Currently $executables contains the full basename of all
executables (para_server, para_client, ...), while the autoconf
variable @executables@ is used for the variants without the "para_"
prefix. This is rather confusing, so introduce $prefixed_executables
and stop using the @executables@ variant in Make recipes.

Makefile.in
t/makefile.test

index 50394e9ca570e9973f2d5e50eafd09b16292ffac..53ec53d6f1c5b3e968ca2c3748b5206792a07684 100644 (file)
@@ -8,7 +8,7 @@ PACKAGE_VERSION := @PACKAGE_VERSION@
 INSTALL := @install@
 STRIP := $(CROSS_COMPILE)strip
 HOSTCC ?= cc
-executables := $(addprefix para_, @executables@)
+executables := @executables@
 ggo_descriptions_declared := @ggo_descriptions_declared@
 object_executable_matrix := @object_executable_matrix@
 
@@ -50,6 +50,8 @@ nsl_ldflags := @nsl_ldflags@
 curses_ldflags := @curses_ldflags@
 core_audio_ldflags := @core_audio_ldflags@
 
+prefixed_executables := $(addprefix para_, $(executables))
+
 build_date := $(shell date)
 uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
 uname_rs := $(shell uname -rs)
@@ -106,7 +108,7 @@ CPPFLAGS += $(osl_cppflags)
 
 LDFLAGS += @clock_gettime_ldflags@
 
-man_pages := $(patsubst %, $(man_dir)/%.1, $(executables))
+man_pages := $(patsubst %, $(man_dir)/%.1, $(prefixed_executables))
 
 autocrap := config.h.in configure
 tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION)
@@ -123,7 +125,7 @@ else
 endif
 
 .PHONY: dep all clean distclean maintainer-clean install man tarball
-all: dep $(executables) $(man_pages)
+all: dep $(prefixed_executables) $(man_pages)
 dep: $(deps)
 man: $(man_pages)
 tarball: $(tarball)
@@ -235,7 +237,7 @@ 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))
-m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, @executables@))
+m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, $(executables)))
 
 recv_objs := $(addprefix $(object_dir)/, @recv_objs@)
 filter_objs := $(addprefix $(object_dir)/, @filter_objs@)
@@ -350,7 +352,7 @@ para_play: $(play_objs)
 
 clean:
        @[ -z "$(Q)" ] || echo 'CLEAN'
-       $(Q) rm -f $(executables)
+       $(Q) rm -f $(prefixed_executables)
        $(Q) rm -rf $(object_dir)
 
 clean2: clean
@@ -369,7 +371,8 @@ maintainer-clean: distclean
 
 install: all man
        $(MKDIR_P) $(BINDIR) $(MANDIR)
-       $(INSTALL) -s --strip-program $(STRIP) -m 755 $(executables) $(BINDIR)
+       $(INSTALL) -s --strip-program $(STRIP) -m 755 \
+               $(prefixed_executables) $(BINDIR)
        $(INSTALL) -m 644 $(man_pages) $(MANDIR)
        $(MKDIR_P) $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain
 
index 69c69bef36dcabe995a7e281ec6d790e98f5de37..a2bd4e538a473e6caea8342e6fdb2e102ccc6aac 100644 (file)
@@ -6,7 +6,7 @@ trash_dir := $(test_dir)/trashes
 test_options := --executables-dir $(shell pwd)
 test_options += --results-dir $(results_dir)
 test_options += --trash-dir $(trash_dir)
-test_options += --executables "$(executables)"
+test_options += --executables "$(prefixed_executables)"
 test_options += --objects "$(basename $(all_objs))"
 
 ifdef V