]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Re-order directories for sanity
authorAlan T. DeKok <aland@freeradius.org>
Thu, 22 Nov 2012 14:14:54 +0000 (09:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 22 Nov 2012 14:16:33 +0000 (09:16 -0500)
installable files are in ${BUILD}/bin and ${BUILD/lib
ones which can be run from the build tree are ${BUILD}/bin/local

It's not perfect, but it seems to work for now.

scripts/install.mk
scripts/libtool.mk

index c7473a2cca5010590d1bc1cd9db5e7028aed19f2..b7b252ca63fb891a5d6b17975f7f1a3740e78d2a 100644 (file)
@@ -35,10 +35,10 @@ define ADD_INSTALL_RULE.exe
     install: $${${1}_INSTALLDIR}/$(notdir ${1})
 
     # Install executable ${1}
-    $${${1}_INSTALLDIR}/$(notdir ${1}): $${${1}_BUILD}/$${RELINK}${1}
+    $${${1}_INSTALLDIR}/$(notdir ${1}): $${${1}_BUILD}/${1}
        @$(ECHO) INSTALL ${1}
        @$${PROGRAM_INSTALL} -d -m 755 $${${1}_INSTALLDIR}
-       @$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/$${RELINK}${1} $${${1}_INSTALLDIR}/
+       @$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
        @$${${1}_POSTINSTALL}
 
 endef
@@ -78,10 +78,10 @@ define ADD_INSTALL_RULE.la
     install: $${${1}_INSTALLDIR}/$(notdir ${1})
 
     # Install libtool library ${1}
-    $${${1}_INSTALLDIR}/$(notdir ${1}): $${${1}_BUILD}/$${RELINK}${1}
+    $${${1}_INSTALLDIR}/$(notdir ${1}): $${${1}_BUILD}/${1}
        @$(ECHO) INSTALL ${1}
        @$${PROGRAM_INSTALL} -d -m 755 $${${1}_INSTALLDIR}
-       @$${PROGRAM_INSTALL} -c -m 755 $${RELINK_FLAGS_MIN} $${BUILD_DIR}/lib/$${RELINK}${1} $${${1}_INSTALLDIR}/
+       @$${PROGRAM_INSTALL} -c -m 755 $${RELINK_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
        @$${${1}_POSTINSTALL}
 
 endef
index a490414dd62e926430b411ee2488dbc9ac972c6f..ab972dbc458987743a0ec45622f725e5999868af 100644 (file)
@@ -98,15 +98,12 @@ endef
 #   USE WITH EVAL
 #
 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}
+    ${1}: $${${1}_BUILD}/$${RELINK}${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}/)
-           @$${${1}_LINKER} -o $${${1}_BUILD}/$${${1}_RELINK} $${RELINK_FLAGS} $${LDFLAGS} \
+           @$${${1}_LINKER} -o $${${1}_BUILD}/$${RELINK}${1} $${RELINK_FLAGS} $${LDFLAGS} \
                 $${${1}_LDFLAGS} $${${1}_OBJS} $${${1}_R_PRLIBS} \
                 $${LDLIBS} $${${1}_LDLIBS}
            @$${${1}_POSTMAKE}
@@ -118,15 +115,12 @@ endef
 #   USE WITH EVAL
 #
 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}
+    ${1}: $${${1}_BUILD}/$${RELINK}${1}
 
     # used to fix up RPATH for ${1} on install.
     $${${1}_BUILD}/$${${1}_RELINK}: $${${1}_OBJS} $${${1}_PRLIBS}
            @$(strip mkdir -p $${${1}_BUILD}/${RELINK}/)
-           @$${${1}_LINKER} -o $${${1}_BUILD}/$${${1}_RELINK} $${RELINK_FLAGS} $${LDFLAGS} \
+           @$${${1}_LINKER} -o $${${1}_BUILD}/$${RELINK}${1} $${RELINK_FLAGS} $${LDFLAGS} \
                 $${${1}_LDFLAGS} $${${1}_OBJS} $${LDLIBS} $${${1}_LDLIBS}
            @$${${1}_POSTMAKE}
 
@@ -147,14 +141,15 @@ endif
 
 # Check if we build shared libraries.
 ifeq "${bm_shared_libs}" "yes"
-    # RPATH  : flags use to build executables that can be run
-    #          from the build directory / source tree.
-    # RELINK : flags use to build executables that are installed,
+    RELINK := local/
+
+    # RPATH  : flags use to build executables that are installed,
     #          with no dependency on the source. 
-    RPATH_FLAGS := -rpath $(abspath ${BUILD_DIR})/lib/.libs -rdynamic
-    RELINK_FLAGS := -rpath ${libdir} -rdynamic
+    # RELINL : flags use to build executables that can be run
+    #          from the build directory / source tree.
+    RPATH_FLAGS := -rpath ${libdir} -rdynamic
+    RELINK_FLAGS := -rpath $(abspath ${BUILD_DIR})/lib/${RELINK}/.libs -rdynamic
     RELINK_FLAGS_MIN := -rpath ${libdir}
-    RELINK := relink/
 
     ifneq "${bm_static_libs}" "yes"
         RPATH_FLAGS += --shared
@@ -210,7 +205,7 @@ define ADD_LIBTOOL_TARGET
     ifneq "$${$${TGT}_RELINK}" ""
         # add rules to relink the target
 
-        $${TGT}_R_PRLIBS := $$(subst /lib/,/lib/relink/,$${$${TGT}_PRLIBS})
+        $${TGT}_R_PRLIBS := $$(subst /lib/,/lib/${RELINK},$${$${TGT}_PRLIBS})
 
         $$(eval $$(call ADD_RELINK_RULE$${$${TGT}_SUFFIX},$${TGT}))
     endif