Testsuite: do not use VPATH and $<
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 24 Nov 2016 14:10:06 +0000 (15:10 +0100)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 24 Nov 2016 14:10:06 +0000 (15:10 +0100)
It is not portable, was a GNU extension, available in GNU make
only.

test/Makefile.in

index 28b59c1c8059c5ce0e08d2d52c37b2e2fed1bc1d..0c8d9b71cd310c41425ca2a913ba19f6f43323e7 100644 (file)
@@ -12,7 +12,7 @@ LOADED=@LOADED@
 LOADED_OPT=@LOADED_OPT@
 LIBS=@LIBS@
 
-VPATH = @srcdir@
+SRC = @srcdir@/src
 
 ##############################################################################
 
@@ -28,7 +28,7 @@ makebin:;       @if [ ! -e bin ] ; then mkdir bin 2>/dev/null; echo ""; fi
 
 # Compile and link the programs:
 #
-# bin/cf              a "compare" program 
+# bin/cf              a "compare" program
 # bin/checkaccess     tests whether the exim uid/gid can access the files
 # bin/client          an SMTP script-driven client, without TLS support
 # bin/client-gnutls   ditto, with GnuTLS support
@@ -41,66 +41,66 @@ makebin:;       @if [ ! -e bin ] ; then mkdir bin 2>/dev/null; echo ""; fi
 # bin/server          an SMTP (socket) script-driven server (no TLS support)
 # bin/showids         output current uid, gid, euid, egid
 
-bin/cf:         src/cf.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $<
+bin/cf:         $(SRC)/cf.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/cf $(SRC)/cf.c
                @echo ">>> bin/cf command build"
                @echo " "
 
-bin/client:     src/client.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $< $(LIBS)
+bin/client:     $(SRC)/client.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/client $(SRC)/client.c $(LIBS)
                @echo ">>> bin/client command built"
                @echo " "
 
-bin/client-gnutls: src/client.c Makefile
-               $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/client-gnutls $< -lgnutls -lgcrypt $(LIBS)
+bin/client-gnutls: $(SRC)/client.c Makefile
+               $(CC) $(CFLAGS) -DHAVE_GNUTLS $(LDFLAGS) -o bin/client-gnutls $(SRC)/client.c -lgnutls -lgcrypt $(LIBS)
                @echo ">>> bin/client-gnutls command built"
                @echo " "
 
-bin/client-ssl: src/client.c Makefile
-               $(CC) $(CFLAGS) -DHAVE_OPENSSL $(LDFLAGS) -o bin/client-ssl $< -lssl -lcrypto $(LIBS)
+bin/client-ssl: $(SRC)/client.c Makefile
+               $(CC) $(CFLAGS) -DHAVE_OPENSSL $(LDFLAGS) -o bin/client-ssl $(SRC)/client.c -lssl -lcrypto $(LIBS)
                @echo ">>> bin/client-ssl command built"
                @echo " "
 
-bin/checkaccess:src/checkaccess.c Makefile
-               $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $<
+bin/checkaccess:$(SRC)/checkaccess.c Makefile
+               $(CC) $(CFLAGS) -DNO_TLS $(LDFLAGS) -o bin/checkaccess $(SRC)/checkaccess.c
                @echo ">>> bin/checkaccess command built"
                @echo " "
 
-bin/fakens:     src/fakens.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $< $(LIBS)
+bin/fakens:     $(SRC)/fakens.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fakens $(SRC)/fakens.c $(LIBS)
                @echo ">>> bin/fakens command built"
                @echo " "
 
-bin/fd:         src/fd.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $<
+bin/fd:         $(SRC)/fd.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/fd $(SRC)/fd.c
                @echo ">>> bin/fd command built"
                @echo " "
 
-bin/iefbr14:    src/iefbr14.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $<
+bin/iefbr14:    $(SRC)/iefbr14.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/iefbr14 $(SRC)/iefbr14.c
                @echo ">>> bin/iefbr14 command built"
                @echo " "
 
-bin/loaded:     src/loaded.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $<
+bin/loaded:     $(SRC)/loaded.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) $(LOADED_OPT) -o bin/loaded $(SRC)/loaded.c
                @echo ">>> bin/loaded command built"
                @echo " "
 
-bin/mtpscript:  src/mtpscript.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $<
+bin/mtpscript:  $(SRC)/mtpscript.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) $(mtpscript_OPT) -o bin/mtpscript $(SRC)/mtpscript.c
                @echo ">>> bin/mtpscript command built"
                @echo " "
 
-bin/server:     src/server.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $< $(LIBS)
+bin/server:     $(SRC)/server.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/server $(SRC)/server.c $(LIBS)
                @echo ">>> bin/server command built"
                @echo " "
 
-bin/showids:    src/showids.c Makefile
-               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $<
+bin/showids:    $(SRC)/showids.c Makefile
+               $(CC) $(CFLAGS) $(LDFLAGS) -o bin/showids $(SRC)/showids.c
                @echo ">>> bin/showids command built"
                @echo " "
-                
-clean:;         rm -rf bin/* 
+
+clean:;         rm -rf bin/*
 
 # End