[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 01/06: 'make pretty' rule using uncrustify, detect
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 01/06: 'make pretty' rule using uncrustify, detect uncrustify in configure script. |
Date: |
Mon, 14 Oct 2019 16:12:18 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnunet.
commit 341fd49b42855e5b197ecfd98bafc66e65eccfa8
Author: ng0 <address@hidden>
AuthorDate: Mon Oct 14 12:10:35 2019 +0000
'make pretty' rule using uncrustify, detect uncrustify in configure script.
closes #5904
---
Makefile.am | 5 +++++
configure.ac | 9 +++++++++
2 files changed, 14 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index d69dd3a82..f2b48b358 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,3 +38,8 @@ docdir = $(datadir)/doc/gnunet/
doc_DATA = COPYING README
ACLOCAL_AMFLAGS = -I m4
+
+if HAVE_UNCRUSTIFY
+pretty:
+ find $(top_srcdir) -type f ! -path '*/.*' ! -path '*/_*' -name '*.c'
-name '*.h' -print0 | xargs -0 uncrustify -c $(top_srcdir) --replace
--no-backup 2>&1 || true
+endif
diff --git a/configure.ac b/configure.ac
index 7af7e83df..e486a893d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,6 +313,15 @@ AS_IF([test x"$VAR_UPNPC_BINARY" != x"false"],
[AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])],
[AC_MSG_WARN([warning: 'upnpc' binary not found.])])
+
+# uncrustify
+AC_PATH_TARGET_TOOL(VAR_UNCRUSTIFY_BINARY, uncrustify, false)
+
+AS_IF([test x"$VAR_UNCRUSTIFY_BINARY" != x"false"],
+ [AC_DEFINE_UNQUOTED([HAVE_UNCRUSTIFY], "$VAR_UNCRUSTIFY_BINARY", [Path to
uncrustify binary])],
+ [AC_MSG_WARN([warning: 'uncrustify' binary not found.])])
+
+
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
[Define if struct tm has the tm_gmtoff member.])],
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnunet] branch master updated (0bd7e2106 -> 0169bf2da), gnunet, 2019/10/14
- [GNUnet-SVN] [gnunet] 05/06: Merge branch 'master' of gnunet.org:gnunet, gnunet, 2019/10/14
- [GNUnet-SVN] [gnunet] 04/06: Changelog, gnunet, 2019/10/14
- [GNUnet-SVN] [gnunet] 02/06: gitignore yapf, gnunet, 2019/10/14
- [GNUnet-SVN] [gnunet] 06/06: po/POTFILES.in, gnunet, 2019/10/14
- [GNUnet-SVN] [gnunet] 03/06: fix the previous uncrustify commit., gnunet, 2019/10/14
- [GNUnet-SVN] [gnunet] 01/06: 'make pretty' rule using uncrustify, detect uncrustify in configure script.,
gnunet <=