]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add verbose mode to more boiler make files
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Aug 2015 23:23:15 +0000 (19:23 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Aug 2015 23:36:06 +0000 (19:36 -0400)
scripts/install.mk
scripts/libtool.mk

index eb40c9dd9e546bc41fb436d28c74dabcbf7fe13e..9c0bfe6b3831cd4b4db63c315f163648500e0463 100644 (file)
 #   replacing the line after the "mkdir"
 #
 
+#
+#  You can watch what it's doing by:
+#
+#      $ VERBOSE=1 make ... args ...
+#
+ifeq "${VERBOSE}" ""
+    Q=@
+else
+    Q=
+endif
+
 # ADD_INSTALL_RULE.exe - Parameterized "function" that adds a new rule
 #   and phony target for installing an executable.
 #
@@ -37,9 +48,9 @@ define ADD_INSTALL_RULE.exe
     # Install executable ${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/${1} $${${1}_INSTALLDIR}/
-       @$${${1}_POSTINSTALL}
+       $(Q)$${PROGRAM_INSTALL} -d -m 755 $${${1}_INSTALLDIR}
+       $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
+       $(Q)$${${1}_POSTINSTALL}
 
 endef
 
@@ -57,9 +68,9 @@ define ADD_INSTALL_RULE.a
     # Install static library ${1}
     $${${1}_INSTALLDIR}/$(notdir ${1}): ${1}
        @$(ECHO) INSTALL ${1}
-       @$${PROGRAM_INSTALL} -d -m 755 $${${1}_INSTALLDIR}
-       @$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
-       @$${${1}_POSTINSTALL}
+       $(Q)$${PROGRAM_INSTALL} -d -m 755 $${${1}_INSTALLDIR}
+       $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+       $(Q)$${${1}_POSTINSTALL}
 
 endef
 
@@ -80,9 +91,9 @@ define ADD_INSTALL_RULE.la
     # Install libtool library ${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/${1} $${${1}_INSTALLDIR}/
-       @$${${1}_POSTINSTALL}
+       $(Q)$${PROGRAM_INSTALL} -d -m 755 $${${1}_INSTALLDIR}
+       $(Q)$${PROGRAM_INSTALL} -c -m 755 $${RELINK_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+       $(Q)$${${1}_POSTINSTALL}
 
 endef
 
@@ -101,8 +112,8 @@ define ADD_INSTALL_RULE.man
     # Install manual page ${1}
     ${2}/$(notdir ${1}): ${1}
        @$(ECHO) INSTALL $(notdir ${1})
-       @[ -d ${2} ] || $${PROGRAM_INSTALL} -d -m 755 ${2}
-       @$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
+       $(Q)[ -d ${2} ] || $${PROGRAM_INSTALL} -d -m 755 ${2}
+       $(Q)$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
 
 endef
 
@@ -118,7 +129,7 @@ define ADD_INSTALL_TARGET
         ifeq "$${TGT_INSTALLDIR}" ".."
             TGT_INSTALLDIR := $${bindir}
         endif
-    else 
+    else
         ifeq "$${TGT_INSTALLDIR}" ".."
             TGT_INSTALLDIR := $${libdir}
         endif
@@ -203,7 +214,7 @@ endif
 # We also want to uninstall only when there are "install_foo" targets.
 .PHONY: uninstall
 uninstall:
-       @rm -f ${ALL_INSTALL} ./.no_such_file
+       $(Q)rm -f ${ALL_INSTALL} ./.no_such_file
 
 # Wrapper around INSTALL
 ifeq "${PROGRAM_INSTALL}" ""
@@ -225,5 +236,5 @@ install: install_ERROR
 .PHONY: install_ERROR
 install_ERROR:
        @$(ECHO) Please define INSTALL in order to enable the installation rules.
-       @exit 1
+       $(Q)exit 1
 endif
index 6d36a25f4830055641070604e342efcc43f2de9f..a95dc307497e8e1f29ecd01b4488196b42eb9351 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+#
+#  You can watch what it's doing by:
+#
+#      $ VERBOSE=1 make ... args ...
+#
+ifeq "${VERBOSE}" ""
+    Q=@
+else
+    Q=
+endif
+
 # Add these rules only when LIBTOOL is being used.
 ifneq "${LIBTOOL}" ""
 
@@ -83,12 +94,12 @@ define ADD_TARGET_RULE.la
 
     # Create libtool library ${1}
     $${${1}_BUILD}/${1}: $${${1}_OBJS} $${${1}_PRLIBS}
-           @$(strip mkdir -p $(dir $${${1}_BUILD}/${1}))
+           $(Q)$(strip mkdir -p $(dir $${${1}_BUILD}/${1}))
            @$(ECHO) LINK $${${1}_BUILD}/${1}
-           @$${${1}_LINKER} -o $${${1}_BUILD}/${1} $${RPATH_FLAGS} $${LDFLAGS} \
+           $(Q)$${${1}_LINKER} -o $${${1}_BUILD}/${1} $${RPATH_FLAGS} $${LDFLAGS} \
                 $${${1}_LDFLAGS} $${${1}_OBJS} $${LDLIBS} $${${1}_LDLIBS} \
                $${${1}_PRLIBS}
-           @$${${1}_POSTMAKE}
+           $(Q)$${${1}_POSTMAKE}
 
     ifneq "${ANALYZE.c}" ""
         scan.${1}: $${${1}_PLISTS}
@@ -105,11 +116,11 @@ define ADD_RELINK_RULE.exe
 
     # 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}/$${RELINK}${1} $${RELINK_FLAGS} $${LDFLAGS} \
+           $(Q)$(strip mkdir -p $${${1}_BUILD}/${RELINK}/)
+           $(Q)$${${1}_LINKER} -o $${${1}_BUILD}/$${RELINK}${1} $${RELINK_FLAGS} $${LDFLAGS} \
                 $${${1}_LDFLAGS} $${${1}_OBJS} $${${1}_R_PRLIBS} \
                 $${LDLIBS} $${${1}_LDLIBS}
-           @$${${1}_POSTMAKE}
+           $(Q)$${${1}_POSTMAKE}
 endef
 
 # ADD_RELINK_RULE.la - Parametric "function" that adds a rule to relink
@@ -122,10 +133,10 @@ define ADD_RELINK_RULE.la
 
     # 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}/$${RELINK}${1} $${RELINK_FLAGS} $${LDFLAGS} \
+           $(Q)$(strip mkdir -p $${${1}_BUILD}/${RELINK}/)
+           $(Q)$${${1}_LINKER} -o $${${1}_BUILD}/$${RELINK}${1} $${RELINK_FLAGS} $${LDFLAGS} \
                 $${${1}_LDFLAGS} $${${1}_OBJS} $${LDLIBS} $${${1}_LDLIBS}
-           @$${${1}_POSTMAKE}
+           $(Q)$${${1}_POSTMAKE}
 
 endef