fix the previous uncrustify commit.
authorng0 <ng0@n0.is>
Mon, 14 Oct 2019 14:06:58 +0000 (14:06 +0000)
committerng0 <ng0@n0.is>
Mon, 14 Oct 2019 14:06:58 +0000 (14:06 +0000)
Makefile.am
configure.ac

index f2b48b35875bb24619149e8daca38aa34f326d47..e8bd98da178705f16937323eb82a7aacf2aa8277 100644 (file)
@@ -39,7 +39,7 @@ doc_DATA = COPYING README
 
 ACLOCAL_AMFLAGS = -I m4
 
-if HAVE_UNCRUSTIFY
+if HAVE_UNCRUSTIFY_BINARY
 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
+       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
 endif
index e486a893daa07349ad8e9173a8e11f0c6031fa27..5ca5f55d174b6c1b1ab1ce0211b635d609a004b0 100644 (file)
@@ -315,11 +315,9 @@ AS_IF([test x"$VAR_UPNPC_BINARY" != x"false"],
 
 
 # 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.])])
+# TODO: maybe add flag to pass location
+AC_CHECK_PROG(UNCRUSTIFY_BINARY, uncrustify, true)
+AM_CONDITIONAL(HAVE_UNCRUSTIFY_BINARY, $UNCRUSTIFY_BINARY)
 
 
 AC_CHECK_MEMBER(struct tm.tm_gmtoff,