]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix dependency checking for configure.h (v2)
authorDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 22 Apr 2010 21:01:31 +0000 (23:01 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 21 Oct 2010 19:21:05 +0000 (21:21 +0200)
Alon Bar-Lev indicated commit f27bf509315a48b0070294c3993a718df0c2626c
was missing proper dependency checking.  This patch corrects this and
fixes an issue when creating configure.h via make distcheck.

This is an enhanced version of the one sent to the openvpn-devel mailing
list April 13, 2010 [1], after having received some feedback from Gert
Doering, cleaning up configure_log.awk further.

[1] <http://thread.gmane.org/gmane.network.openvpn.devel/3410/focus=3491>

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Makefile.am
configure_log.awk
options.c

index 3b858e21cc6431d175e0bfc0f327dea3b40f7507..fdc9def689d5782dac5340aa0c285db5021bc778 100644 (file)
@@ -66,7 +66,8 @@ dist_noinst_SCRIPTS = \
        $(TESTS) \
        doclean \
        domake-win \
-       t_cltsrv-down.sh
+       t_cltsrv-down.sh \
+       configure_h.awk configure_log.awk
 
 dist_noinst_DATA = \
        openvpn.spec \
@@ -142,9 +143,12 @@ openvpn_SOURCES = \
        win32.h win32.c \
        cryptoapi.h cryptoapi.c
 
+nodist_openvpn_SOURCES = configure.h
+options.$(OBJEXT): configure.h
+
 configure.h: Makefile
-       awk -f configure_h.awk config.h > $@
-       awk -f configure_log.awk config.log >> $@
+       awk -f $(srcdir)/configure_h.awk config.h > $@
+       awk -f $(srcdir)/configure_log.awk config.log >> $@
 
 clean-local:
        -rm -f configure.h
index b305f71e1428631547dff794ea201c59e017b82c..099e5c498c63dd2d76180e3db144cf70f110952c 100644 (file)
 #  ./config.log.
 #
 
-BEGIN {
-       printf ("#define CONFIGURE_CALL \"")
-}
-/\$ .\/configure/ {
-       print $0,"\""
+/\$ (.*)\/configure/ {
+       printf ("#define CONFIGURE_CALL \"%s\"\n", $0)
        exit 0
 }
index 1f360894aef4205aec1b7f5d3b4454791c79ccbe..a11425cf01d6f0288e5c1edbaa9b2f3cd6c9087b 100644 (file)
--- a/options.c
+++ b/options.c
@@ -2921,7 +2921,9 @@ usage_version (void)
   msg (M_INFO|M_NOPREFIX, "%s", title_string);
   msg (M_INFO|M_NOPREFIX, "Originally developed by James Yonan");
   msg (M_INFO|M_NOPREFIX, "Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>");
+#ifdef CONFIGURE_CALL
   msg (M_INFO|M_NOPREFIX, "\n%s\n", CONFIGURE_CALL);
+#endif
   msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES);
   openvpn_exit (OPENVPN_EXIT_STATUS_USAGE); /* exit point */
 }