# 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.
#
# 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
# 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
# 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
# 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
ifeq "$${TGT_INSTALLDIR}" ".."
TGT_INSTALLDIR := $${bindir}
endif
- else
+ else
ifeq "$${TGT_INSTALLDIR}" ".."
TGT_INSTALLDIR := $${libdir}
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}" ""
.PHONY: install_ERROR
install_ERROR:
@$(ECHO) Please define INSTALL in order to enable the installation rules.
- @exit 1
+ $(Q)exit 1
endif
# 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}" ""
# 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}
# 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
# 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