[glibmm] manual refactor target: Error if clang-format is not available.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] manual refactor target: Error if clang-format is not available.
- Date: Sat, 27 Feb 2016 14:43:30 +0000 (UTC)
commit da03715eb0bba919e82e01e041d2afc842807e99
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Feb 27 15:28:06 2016 +0100
manual refactor target: Error if clang-format is not available.
Makefile.am | 4 ++++
configure.ac | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7473185..a0df8af 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,5 +57,9 @@ DISTCLEANFILES = $(filter %mmconfig.h,$(msvc_files))
include $(top_srcdir)/build/dist-changelog.am
reformat:
+if HAVE_CLANG_FORMAT
$(CLANG_FORMAT) -i `find . -name "*.h"`
$(CLANG_FORMAT) -i `find . -name "*.cc"`
+else
+ $(error clang-format was not not found during configure.)
+endif
diff --git a/configure.ac b/configure.ac
index b7f88f8..3832689 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,8 @@ AC_DEFINE([GLIBMM_PROPERTIES_ENABLED],[1], [This is always set. This is only for
AC_DEFINE([GLIBMM_VFUNCS_ENABLED],[1], [This is always set. This is only for backwards compatibility.])
AC_DEFINE([GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED],[1], [This is always set. This is only for backwards
compatibility.])
-AC_CHECK_PROGS([CLANG_FORMAT], [clang-format clang-format-3.9 clang-format-3.8 clang-format-3.7],
[clang-format])
+AC_CHECK_PROGS([CLANG_FORMAT], [clang-format clang-format-3.9 clang-format-3.8 clang-format-3.7], [])
+AM_CONDITIONAL([HAVE_CLANG_FORMAT], test -n "$CLANG_FORMAT")
AC_CONFIG_FILES([Makefile
tools/Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]