Hack dependencies to get "touch foo.c;make install" to work
authorAlan T. DeKok <aland@freeradius.org>
Sat, 22 Sep 2012 07:32:32 +0000 (09:32 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 22 Sep 2012 07:52:52 +0000 (09:52 +0200)
the installed files depend on the "relink" versions, which have
the correct library paths in them.  The normal versions have the
in-source paths, to allow in-source execution.

The relink versions now have a dependency on the normal versions,
which causes the normal versions to get built, too.

We should probably change the "relink" target to "final", and
get rid of the ADD_LIBTOOL_PATH stuff.

scripts/libtool.mk

index c1b9392..403ca95 100644 (file)
@@ -99,6 +99,9 @@ endef
 define ADD_RELINK_RULE.exe
     ${1}: $${${1}_BUILD}/$${${1}_RELINK}
 
+    # force the in-source file to be re-built, too
+    $${${1}_BUILD}/$${${1}_RELINK}: $${${1}_BUILD}/${1}
+
     # used to fix up RPATH for ${1} on install.
     $${${1}_BUILD}/$${${1}_RELINK}: $${${1}_OBJS} $${${1}_PRBIN} $${${1}_R_PRLIBS}
            @$(strip mkdir -p $${${1}_BUILD}/${RELINK}/)
@@ -116,6 +119,9 @@ endef
 define ADD_RELINK_RULE.la
     ${1}: $${${1}_BUILD}/$${${1}_RELINK}
 
+    # force the in-source file to be re-built, too
+    $${${1}_BUILD}/$${${1}_RELINK}: $${${1}_BUILD}/${1}
+
     # used to fix up RPATH for ${1} on install.
     $${${1}_BUILD}/$${${1}_RELINK}: $${${1}_OBJS} $${${1}_PREREQS}
            @$(strip mkdir -p $${${1}_BUILD}/${RELINK}/)