diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 7 |
4 files changed, 17 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index 6842f759f..955c97d36 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -61,8 +61,8 @@ doc/tutorial/gversion.texi | |||
61 | 61 | ||
62 | # top-level symlink can exist | 62 | # top-level symlink can exist |
63 | .clang-format | 63 | .clang-format |
64 | |||
65 | uncrustify.cfg | 64 | uncrustify.cfg |
65 | .style.yapf | ||
66 | 66 | ||
67 | # this exists outside of the main repository | 67 | # this exists outside of the main repository |
68 | cmake/ | 68 | cmake/ |
@@ -1,3 +1,7 @@ | |||
1 | Mon Oct 14 00:00:00 UTC 2019 | ||
2 | Add 'pretty' make rule to run uncrustify over the source tree. | ||
3 | -ng0 | ||
4 | |||
1 | Mon Sep 16 00:00:00 UTC 2019 | 5 | Mon Sep 16 00:00:00 UTC 2019 |
2 | Remove checks for CXX and CPP. Scans found no | 6 | Remove checks for CXX and CPP. Scans found no |
3 | (remaining) cxx code. ccache with clang on | 7 | (remaining) cxx code. ccache with clang on |
diff --git a/Makefile.am b/Makefile.am index d69dd3a82..e8bd98da1 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -38,3 +38,8 @@ docdir = $(datadir)/doc/gnunet/ | |||
38 | doc_DATA = COPYING README | 38 | doc_DATA = COPYING README |
39 | 39 | ||
40 | ACLOCAL_AMFLAGS = -I m4 | 40 | ACLOCAL_AMFLAGS = -I m4 |
41 | |||
42 | if HAVE_UNCRUSTIFY_BINARY | ||
43 | pretty: | ||
44 | find $(top_srcdir) -type f -name '*.c' -or -name '*.h' -print0 | xargs -0 uncrustify -c $(top_srcdir)/contrib/uncrustify.cfg --replace --no-backup 2>&1 || true | ||
45 | endif | ||
diff --git a/configure.ac b/configure.ac index 7af7e83df..5ca5f55d1 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -313,6 +313,13 @@ AS_IF([test x"$VAR_UPNPC_BINARY" != x"false"], | |||
313 | [AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])], | 313 | [AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])], |
314 | [AC_MSG_WARN([warning: 'upnpc' binary not found.])]) | 314 | [AC_MSG_WARN([warning: 'upnpc' binary not found.])]) |
315 | 315 | ||
316 | |||
317 | # uncrustify | ||
318 | # TODO: maybe add flag to pass location | ||
319 | AC_CHECK_PROG(UNCRUSTIFY_BINARY, uncrustify, true) | ||
320 | AM_CONDITIONAL(HAVE_UNCRUSTIFY_BINARY, $UNCRUSTIFY_BINARY) | ||
321 | |||
322 | |||
316 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 323 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
317 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, | 324 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, |
318 | [Define if struct tm has the tm_gmtoff member.])], | 325 | [Define if struct tm has the tm_gmtoff member.])], |