diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx
index f713294da0e6cee5ec4a9fd51360c95c0e92d351..0b9bae3a51d04e77a7d67f033486585f858d8e2b 100644
--- a/CommandLineArguments.cxx
+++ b/CommandLineArguments.cxx
@@ -23,11 +23,11 @@
 # include "String.hxx.in"
 #endif
 
-#include <vector>
+#include <iostream>
 #include <map>
 #include <set>
 #include <sstream>
-#include <iostream>
+#include <vector>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in
index 2496b457aac5f4ed8173c503722cdb4c17272ff7..07a1063ae28f892325040424b1f3a0b11374ad6f 100644
--- a/ConsoleBuf.hxx.in
+++ b/ConsoleBuf.hxx.in
@@ -13,13 +13,15 @@
 #define @KWSYS_NAMESPACE@_ConsoleBuf_hxx
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
+
 #include <@KWSYS_NAMESPACE@/Encoding.hxx>
-#include <string>
+
 #include <cstring>
-#include <sstream>
-#include <streambuf>
 #include <iostream>
+#include <sstream>
 #include <stdexcept>
+#include <streambuf>
+#include <string>
 
 #if defined(_WIN32)
 #  include <windows.h>
diff --git a/Directory.cxx b/Directory.cxx
index 15480e1fdf7f240a494019bcf4baa98c154e3aab..f234c10843efab1aebbcdfcbc7b84eaf6d7b26c1 100644
--- a/Directory.cxx
+++ b/Directory.cxx
@@ -19,9 +19,9 @@
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "Directory.hxx.in"
-# include "Configure.hxx.in"
-# include "Encoding.hxx.in"
+#include "Configure.hxx.in"
+#include "Directory.hxx.in"
+#include "Encoding.hxx.in"
 #endif
 
 #include <string>
@@ -88,9 +88,10 @@ void Directory::Clear()
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #include <windows.h>
-#include <io.h>
+
 #include <ctype.h>
 #include <fcntl.h>
+#include <io.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -209,6 +210,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
 // Now the POSIX style directory access
 
 #include <sys/types.h>
+
 #include <dirent.h>
 
 // PGI with glibc has trouble with dirent and large file support:
diff --git a/Directory.hxx.in b/Directory.hxx.in
index e68f337739079cb93adfe1217c591ac686dd0e5f..e92ecbc0d4a559eef431c38be6eea908e2d1fbd9 100644
--- a/Directory.hxx.in
+++ b/Directory.hxx.in
@@ -13,6 +13,7 @@
 #define @KWSYS_NAMESPACE@_Directory_hxx
 
 #include <@KWSYS_NAMESPACE@/Configure.h>
+
 #include <string>
 
 namespace @KWSYS_NAMESPACE@
diff --git a/DynamicLoader.cxx b/DynamicLoader.cxx
index 1941d965acc20111eba72a4790929945f9545fba..add12075918d8b59b85ace77673d605e4001330f 100644
--- a/DynamicLoader.cxx
+++ b/DynamicLoader.cxx
@@ -17,8 +17,8 @@
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "DynamicLoader.hxx.in"
-# include "Configure.hxx.in"
+#include "Configure.hxx.in"
+#include "DynamicLoader.hxx.in"
 #endif
 
 // This file is actually 3 different implementations.
@@ -32,8 +32,8 @@
 // ---------------------------------------------------------------
 // 1. Implementation for HPUX  machines
 #ifdef __hpux
-#include <errno.h>
 #include <dl.h>
+#include <errno.h>
 #define DYNAMICLOADER_DEFINED 1
 
 namespace KWSYS_NAMESPACE
@@ -107,8 +107,8 @@ const char* DynamicLoader::LastError()
 // 2. Implementation for Mac OS X 10.2.x and earlier
 #ifdef __APPLE__
 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030
-#include <string.h> // for strlen
 #include <mach-o/dyld.h>
+#include <string.h> // for strlen
 #define DYNAMICLOADER_DEFINED 1
 
 namespace KWSYS_NAMESPACE
@@ -428,10 +428,10 @@ const char* DynamicLoader::LastError()
 #ifdef __MINT__
 #define DYNAMICLOADER_DEFINED 1
 #define _GNU_SOURCE /* for program_invocation_name */
-#include <string.h>
-#include <malloc.h>
-#include <errno.h>
 #include <dld.h>
+#include <errno.h>
+#include <malloc.h>
+#include <string.h>
 
 namespace KWSYS_NAMESPACE
 {
diff --git a/DynamicLoader.hxx.in b/DynamicLoader.hxx.in
index 1e4a91265a07b12b9ba6b5595a0ad524fe812ee0..e41ce0c944993a2bbe0b5d0d9403e3373463bdbb 100644
--- a/DynamicLoader.hxx.in
+++ b/DynamicLoader.hxx.in
@@ -13,6 +13,7 @@
 #define @KWSYS_NAMESPACE@_DynamicLoader_hxx
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
+
 #include <string>
 
 #if defined(__hpux)
diff --git a/Encoding.h.in b/Encoding.h.in
index 591c5a8986ded9955e42bbc6f83b34d28246309e..3790cc3062be1e7245a4e4e98ec1a6147dd6e522 100644
--- a/Encoding.h.in
+++ b/Encoding.h.in
@@ -13,6 +13,7 @@
 #define @KWSYS_NAMESPACE@_Encoding_h
 
 #include <@KWSYS_NAMESPACE@/Configure.h>
+
 #include <wchar.h>
 
 /* Redefine all public interface symbol names to be in the proper
diff --git a/Encoding.hxx.in b/Encoding.hxx.in
index 87b1c215042409df310abce8d176b012ee38a3ce..f2d20bdd70be2a252fa32d55b4eefe5104f4f05e 100644
--- a/Encoding.hxx.in
+++ b/Encoding.hxx.in
@@ -13,6 +13,7 @@
 #define @KWSYS_NAMESPACE@_Encoding_hxx
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
+
 #include <string>
 #include <vector>
 
diff --git a/EncodingCXX.cxx b/EncodingCXX.cxx
index 597d4bd1947ea18dc3cd15db67465eaffe70b275..9860af02b6043cfcca7116060f5a953e301cf8e5 100644
--- a/EncodingCXX.cxx
+++ b/EncodingCXX.cxx
@@ -23,13 +23,13 @@
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "Encoding.hxx.in"
-# include "Encoding.h.in"
+#include "Encoding.h.in"
+#include "Encoding.hxx.in"
 #endif
 
-#include <vector>
 #include <stdlib.h>
 #include <string.h>
+#include <vector>
 
 #ifdef _MSC_VER
 # pragma warning (disable: 4786)
@@ -37,8 +37,9 @@
 
 // Windows API.
 #if defined(_WIN32)
-# include <windows.h>
-# include <shellapi.h>
+#include <windows.h>
+
+#include <shellapi.h>
 #endif
 
 namespace KWSYS_NAMESPACE
diff --git a/FStream.hxx.in b/FStream.hxx.in
index a9ff972a955006e7a9f2b5c163fe2637a141890b..99d01e41270054e14cedf66879c7dfae031012f2 100644
--- a/FStream.hxx.in
+++ b/FStream.hxx.in
@@ -12,9 +12,9 @@
 #ifndef @KWSYS_NAMESPACE@_FStream_hxx
 #define @KWSYS_NAMESPACE@_FStream_hxx
 
+#include <fstream>
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 #include <@KWSYS_NAMESPACE@/Encoding.hxx>
-#include <fstream>
 #if defined(_WIN32)
 # if !defined(_MSC_VER) && @KWSYS_NAMESPACE@_CXX_HAS_EXT_STDIO_FILEBUF_H
 #  include <ext/stdio_filebuf.h>
diff --git a/Glob.cxx b/Glob.cxx
index 9d634595123d18a991f6789322852e47baf36993..42f73eeaef96161e48dd95351147e667ad819afd 100644
--- a/Glob.cxx
+++ b/Glob.cxx
@@ -21,16 +21,16 @@
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "Glob.hxx.in"
-# include "Directory.hxx.in"
-# include "Configure.hxx.in"
-# include "RegularExpression.hxx.in"
-# include "SystemTools.hxx.in"
+#include "Configure.hxx.in"
+#include "Directory.hxx.in"
+#include "Glob.hxx.in"
+#include "RegularExpression.hxx.in"
+#include "SystemTools.hxx.in"
 #endif
 
+#include <algorithm>
 #include <string>
 #include <vector>
-#include <algorithm>
 
 #include <ctype.h>
 #include <stdio.h>
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index b577982203fd16995d7faf74040df7341d71518c..c048d3a0bb757396cdaa0c2b6568c8cbe0657f08 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -53,22 +53,22 @@ do.
 # define FD_SETSIZE 16384
 #endif
 
+#include <assert.h>    /* assert */
+#include <ctype.h>     /* isspace */
+#include <dirent.h>    /* DIR, dirent */
+#include <errno.h>     /* errno */
+#include <fcntl.h>     /* fcntl */
+#include <signal.h>    /* sigaction */
 #include <stddef.h>    /* ptrdiff_t */
 #include <stdio.h>     /* snprintf */
 #include <stdlib.h>    /* malloc, free */
 #include <string.h>    /* strdup, strerror, memset */
+#include <sys/stat.h>  /* open mode */
 #include <sys/time.h>  /* struct timeval */
 #include <sys/types.h> /* pid_t, fd_set */
 #include <sys/wait.h>  /* waitpid */
-#include <sys/stat.h>  /* open mode */
-#include <unistd.h>    /* pipe, close, fork, execvp, select, _exit */
-#include <fcntl.h>     /* fcntl */
-#include <errno.h>     /* errno */
 #include <time.h>      /* gettimeofday */
-#include <signal.h>    /* sigaction */
-#include <dirent.h>    /* DIR, dirent */
-#include <ctype.h>     /* isspace */
-#include <assert.h>    /* assert */
+#include <unistd.h>    /* pipe, close, fork, execvp, select, _exit */
 
 #if defined(__VMS)
 # define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK
diff --git a/ProcessWin32.c b/ProcessWin32.c
index 2b93e6963ff688159d22ac3105c3ac4257d62914..a8d8807628f9ec2932b3caaf8e3ea4403e245f64 100644
--- a/ProcessWin32.c
+++ b/ProcessWin32.c
@@ -16,8 +16,8 @@
 /* Work-around CMake dependency scanning limitation.  This must
    duplicate the above list of headers.  */
 #if 0
-# include "Process.h.in"
-# include "Encoding.h.in"
+#include "Encoding.h.in"
+#include "Process.h.in"
 #endif
 
 /*
@@ -37,9 +37,9 @@ a UNIX-style select system call.
 #if defined(_MSC_VER) && _MSC_VER >= 1800
 # define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 #endif
-#include <string.h>  /* strlen, strdup */
-#include <stdio.h>   /* sprintf */
-#include <io.h>      /* _unlink */
+#include <io.h>     /* _unlink */
+#include <stdio.h>  /* sprintf */
+#include <string.h> /* strlen, strdup */
 #ifdef __WATCOMC__
 #define _unlink unlink
 #endif
diff --git a/SharedForward.h.in b/SharedForward.h.in
index f80ef84703de8fd233a44e2b1e876c7a1a99e34c..0d6c2f26b59ffb248ed08a427c012aea51985938 100644
--- a/SharedForward.h.in
+++ b/SharedForward.h.in
@@ -160,21 +160,22 @@
 /*--------------------------------------------------------------------------*/
 /* Include needed system headers.  */
 
-#include <stddef.h> /* size_t */
+#include <errno.h>
 #include <limits.h>
+#include <stddef.h> /* size_t */
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <stdio.h>
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-# include <io.h>
-# include <windows.h>
-# include <process.h>
-# define KWSYS_SHARED_FORWARD_ESCAPE_ARGV /* re-escape argv for execvp */
+#include <windows.h>
+
+#include <io.h>
+#include <process.h>
+#define KWSYS_SHARED_FORWARD_ESCAPE_ARGV /* re-escape argv for execvp */
 #else
-# include <unistd.h>
-# include <sys/stat.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #endif
 
 /*--------------------------------------------------------------------------*/
diff --git a/System.c b/System.c
index ccc7e8164d17502af3897e66afdde456e977269b..54eeef61e98155cc15e36b82e2dff05c83ee0580 100644
--- a/System.c
+++ b/System.c
@@ -18,10 +18,10 @@
 # include "System.h.in"
 #endif
 
+#include <ctype.h>  /* isspace */
 #include <stddef.h> /* ptrdiff_t */
 #include <stdlib.h> /* malloc, free */
 #include <string.h> /* memcpy */
-#include <ctype.h>  /* isspace */
 
 #include <stdio.h>
 
diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 56a635a673ce68cabb7ca7fa35594ddb163ccf49..93605c0b1118c31e54bd3f7af854c2569696d651 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -41,13 +41,13 @@
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "SystemInformation.hxx.in"
-# include "Process.h.in"
+#include "Process.h.in"
+#include "SystemInformation.hxx.in"
 #endif
 
+#include <fstream>
 #include <iostream>
 #include <sstream>
-#include <fstream>
 #include <string>
 #include <vector>
 
@@ -64,14 +64,15 @@
 typedef int siginfo_t;
 # endif
 #else
-# include <sys/types.h>
-# include <sys/time.h>
-# include <sys/utsname.h> // int uname(struct utsname *buf);
-# include <sys/resource.h> // getrlimit
-# include <unistd.h>
-# include <signal.h>
-# include <fcntl.h>
-# include <errno.h> // extern int errno;
+#include <sys/types.h>
+
+#include <errno.h> // extern int errno;
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/resource.h> // getrlimit
+#include <sys/time.h>
+#include <sys/utsname.h> // int uname(struct utsname *buf);
+#include <unistd.h>
 #endif
 
 #if defined (__CYGWIN__) && !defined(_WIN32)
@@ -80,15 +81,15 @@ typedef int siginfo_t;
 #endif
 
 #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
-# include <sys/param.h>
-# include <sys/sysctl.h>
-# include <sys/socket.h>
-# include <netdb.h>
-# include <netinet/in.h>
-# if defined(KWSYS_SYS_HAS_IFADDRS_H)
-#  include <ifaddrs.h>
-#  define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
-# endif
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+#if defined(KWSYS_SYS_HAS_IFADDRS_H)
+#include <ifaddrs.h>
+#define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+#endif
 #endif
 
 #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H)
@@ -96,36 +97,36 @@ typedef int siginfo_t;
 #endif
 
 #ifdef __APPLE__
-# include <sys/sysctl.h>
-# include <mach/vm_statistics.h>
-# include <mach/host_info.h>
-# include <mach/mach.h>
-# include <mach/mach_types.h>
-# include <fenv.h>
-# include <sys/socket.h>
-# include <netdb.h>
-# include <netinet/in.h>
-# if defined(KWSYS_SYS_HAS_IFADDRS_H)
-#  include <ifaddrs.h>
-#  define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
-# endif
-# if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050)
-#  undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE
-# endif
+#include <fenv.h>
+#include <mach/host_info.h>
+#include <mach/mach.h>
+#include <mach/mach_types.h>
+#include <mach/vm_statistics.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+#if defined(KWSYS_SYS_HAS_IFADDRS_H)
+#include <ifaddrs.h>
+#define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+#endif
+#if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0 >= 1050)
+#undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE
+#endif
 #endif
 
-#if defined(__linux) || defined (__sun) || defined(_SCO_DS)
-# include <fenv.h>
-# include <sys/socket.h>
-# include <netdb.h>
-# include <netinet/in.h>
-# if defined(KWSYS_SYS_HAS_IFADDRS_H)
-#  include <ifaddrs.h>
-#  if !defined(__LSB_VERSION__) /* LSB has no getifaddrs */
-#   define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
-#  endif
-# endif
-# if defined(KWSYS_CXX_HAS_RLIMIT64)
+#if defined(__linux) || defined(__sun) || defined(_SCO_DS)
+#include <fenv.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#if defined(KWSYS_SYS_HAS_IFADDRS_H)
+#include <ifaddrs.h>
+#if !defined(__LSB_VERSION__) /* LSB has no getifaddrs */
+#define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
+#endif
+#endif
+#if defined(KWSYS_CXX_HAS_RLIMIT64)
 typedef struct rlimit64 ResourceLimitType;
 #  define GetResourceLimit getrlimit64
 # else
@@ -157,11 +158,11 @@ typedef struct rlimit ResourceLimitType;
 # undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP
 #endif
 
+#include <ctype.h> // int isdigit(int c);
 #include <memory.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <ctype.h> // int isdigit(int c);
 
 #if defined(KWSYS_USE_LONG_LONG)
 # if defined(KWSYS_IOS_HAS_OSTREAM_LONG_LONG)
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in
index 7c453887e95b4612080c320f0e473ec2d4ad4c40..7a9be647d7e2e95005719e3f6de8bae9e816ede1 100644
--- a/SystemInformation.hxx.in
+++ b/SystemInformation.hxx.in
@@ -13,6 +13,7 @@
 #define @KWSYS_NAMESPACE@_SystemInformation_h
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
+
 #include <stddef.h> /* size_t */
 #include <string>
 
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 5da715f48a49413e21b72e3359fbf0add0b3b282..aed16a2f5ba70d68a36bd1f4f3ac93f7ab261f25 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -31,20 +31,20 @@
 #include KWSYS_HEADER(FStream.hxx)
 #include KWSYS_HEADER(Encoding.hxx)
 
-#include <iostream>
 #include <fstream>
-#include <sstream>
+#include <iostream>
 #include <set>
+#include <sstream>
 #include <vector>
 
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "RegularExpression.hxx.in"
-# include "SystemTools.hxx.in"
-# include "Directory.hxx.in"
-# include "FStream.hxx.in"
-# include "Encoding.hxx.in"
+#include "Directory.hxx.in"
+#include "Encoding.hxx.in"
+#include "FStream.hxx.in"
+#include "RegularExpression.hxx.in"
+#include "SystemTools.hxx.in"
 #endif
 
 #ifdef _MSC_VER
@@ -76,13 +76,13 @@
 
 // support for realpath call
 #ifndef _WIN32
-#include <sys/time.h>
-#include <utime.h>
 #include <limits.h>
-#include <sys/wait.h>
+#include <pwd.h>
 #include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/wait.h>
 #include <unistd.h>
-#include <pwd.h>
+#include <utime.h>
 #ifndef __VMS
 #include <sys/param.h>
 #include <termios.h>
@@ -156,8 +156,8 @@ public:
 #endif
 
 #if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) ||defined(__BORLANDC__) || defined(__MINGW32__))
-#include <io.h>
 #include <direct.h>
+#include <io.h>
 #define _unlink unlink
 #endif
 
@@ -304,6 +304,7 @@ inline void Realpath(const std::string& path,
 }
 #else
 #include <sys/types.h>
+
 #include <fcntl.h>
 #include <unistd.h>
 inline int Mkdir(const std::string& dir)
diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in
index 5849145d45f726f3f9bd4af1ccc7da52eeb3c098..2c2f983ab317ace93f41c93073d2c302ad37803b 100644
--- a/SystemTools.hxx.in
+++ b/SystemTools.hxx.in
@@ -15,9 +15,9 @@
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 
 #include <iosfwd>
+#include <map>
 #include <string>
 #include <vector>
-#include <map>
 
 #include <@KWSYS_NAMESPACE@/String.hxx>
 
diff --git a/Terminal.c b/Terminal.c
index a8abb6cc680272638d27a33de29ddd0a33d024b3..c451fee77c05ba711e806593c46b00b7158af472 100644
--- a/Terminal.c
+++ b/Terminal.c
@@ -30,13 +30,13 @@
 /*--------------------------------------------------------------------------*/
 /* Include needed system APIs.  */
 
+#include <stdarg.h> /* va_list */
 #include <stdlib.h> /* getenv */
 #include <string.h> /* strcmp */
-#include <stdarg.h> /* va_list */
 
 #if defined(KWSYS_TERMINAL_SUPPORT_CONSOLE)
-# include <windows.h> /* SetConsoleTextAttribute */
-# include <io.h>      /* _get_osfhandle */
+#include <io.h>      /* _get_osfhandle */
+#include <windows.h> /* SetConsoleTextAttribute */
 #endif
 
 #if defined(KWSYS_TERMINAL_ISATTY_WORKS)
diff --git a/hash_fun.hxx.in b/hash_fun.hxx.in
index 4872b51c7ebdec75461f3144977294151678a469..515a274ba4fa3c55d28366791a1a23b8539782ac 100644
--- a/hash_fun.hxx.in
+++ b/hash_fun.hxx.in
@@ -38,7 +38,8 @@
 #define @KWSYS_NAMESPACE@_hash_fun_hxx
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
-#include <stddef.h>        // size_t
+
+#include <stddef.h> // size_t
 #include <string>
 
 namespace @KWSYS_NAMESPACE@
diff --git a/hash_map.hxx.in b/hash_map.hxx.in
index 60c708607ac58ef05129a59a8844b53b8cea8c93..7c304e255c3017702c8cb28a656089ea4219e785 100644
--- a/hash_map.hxx.in
+++ b/hash_map.hxx.in
@@ -38,7 +38,9 @@
 #define @KWSYS_NAMESPACE@_hash_map_hxx
 
 #include <@KWSYS_NAMESPACE@/hashtable.hxx>
+
 #include <@KWSYS_NAMESPACE@/hash_fun.hxx>
+
 #include <functional> // equal_to
 
 #if defined(_MSC_VER)
diff --git a/hash_set.hxx.in b/hash_set.hxx.in
index c314979f9ef970a1a0e67b701f9b228de293cf24..9fd3bd1cd8ebfd49eac7c384786fe4993af1bf46 100644
--- a/hash_set.hxx.in
+++ b/hash_set.hxx.in
@@ -38,7 +38,9 @@
 #define @KWSYS_NAMESPACE@_hash_set_hxx
 
 #include <@KWSYS_NAMESPACE@/hashtable.hxx>
+
 #include <@KWSYS_NAMESPACE@/hash_fun.hxx>
+
 #include <functional> // equal_to
 
 #if defined(_MSC_VER)
diff --git a/hashtable.hxx.in b/hashtable.hxx.in
index 9a2022657ce0d4678bca715eb6d1f3dfe69337ea..21dd1fe4c409909b9747683da6f33f1584fb26ba 100644
--- a/hashtable.hxx.in
+++ b/hashtable.hxx.in
@@ -44,11 +44,11 @@
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 
-#include <stddef.h>   // size_t
 #include <algorithm>  // lower_bound
 #include <functional> // unary_function
 #include <iterator>   // iterator_traits
 #include <memory>     // allocator
+#include <stddef.h>   // size_t
 #include <utility>    // pair
 #include <vector>     // vector
 
diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx
index b35808b14db6059dc5bdf1e01e9cd18ad1a20881..f28bfd0ca4ed2ee0874d89785bb6f3be1f0080ee 100644
--- a/kwsysPlatformTestsCXX.cxx
+++ b/kwsysPlatformTestsCXX.cxx
@@ -34,6 +34,7 @@ int main()
 
 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIM
 #include <sys/types.h>
+
 #include <sys/stat.h>
 #include <unistd.h>
 int main()
@@ -47,6 +48,7 @@ int main()
 
 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
 #include <sys/types.h>
+
 #include <sys/stat.h>
 #include <unistd.h>
 int main()
@@ -137,8 +139,9 @@ int main()
 #define _LARGE_FILES
 #define _FILE_OFFSET_BITS 64
 #include <sys/types.h>
-#include <sys/stat.h>
+
 #include <assert.h>
+#include <sys/stat.h>
 #if KWSYS_CXX_HAS_CSTDIO
 # include <cstdio>
 #endif
diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx
index d7775e6d88b8ab4f77468f5a998dbc881a360e23..54ab677d1300c3fe14169d901c6756a93343bffe 100644
--- a/testConsoleBuf.cxx
+++ b/testConsoleBuf.cxx
@@ -27,12 +27,13 @@
 
 #if defined(_WIN32)
 
-#include <windows.h>
-#include <string.h>
-#include <wchar.h>
-#include <iostream>
 #include <iomanip>
+#include <iostream>
 #include <stdexcept>
+#include <string.h>
+#include <wchar.h>
+#include <windows.h>
+
 #include "testConsoleBuf.hxx"
 
 #if defined(_MSC_VER) && _MSC_VER >= 1800
diff --git a/testConsoleBufChild.cxx b/testConsoleBufChild.cxx
index 2da39f2858d9591e7504157f414ab04a8ba77fac..1ceb1085fb8b975b0bea45426a9bfcefa21639a4 100644
--- a/testConsoleBufChild.cxx
+++ b/testConsoleBufChild.cxx
@@ -22,6 +22,7 @@
 #endif
 
 #include <iostream>
+
 #include "testConsoleBuf.hxx"
 
 //----------------------------------------------------------------------------
diff --git a/testDynamicLoader.cxx b/testDynamicLoader.cxx
index 7c58769695dd75e4e22d3f62718da1b2d3b238a1..8d5cfa5bebbbf536634e7c2891f9113304993659 100644
--- a/testDynamicLoader.cxx
+++ b/testDynamicLoader.cxx
@@ -23,8 +23,8 @@
 # include "DynamicLoader.hxx.in"
 #endif
 
-#include <string>
 #include <iostream>
+#include <string>
 
 // Include with <> instead of "" to avoid getting any in-source copy
 // left on disk.
diff --git a/testEncoding.cxx b/testEncoding.cxx
index 80ec040f4d5b9664aecf9424ad5e496b3cba5946..2be257282b4ed198472b14e0c1c82b6298a94a29 100644
--- a/testEncoding.cxx
+++ b/testEncoding.cxx
@@ -20,14 +20,14 @@
 
 #include <iostream>
 #include <locale.h>
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
 
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
-# include "Encoding.hxx.in"
-# include "Encoding.h.in"
+#include "Encoding.h.in"
+#include "Encoding.hxx.in"
 #endif
 
 //----------------------------------------------------------------------------
diff --git a/testIOS.cxx b/testIOS.cxx
index 5ff7955bfa7d4e9496eaff2352bd89de0ade17a9..a1376eb4e5a5771a9282d9d5cac72c596877a08b 100644
--- a/testIOS.cxx
+++ b/testIOS.cxx
@@ -12,11 +12,11 @@
 #include "kwsysPrivate.h"
 #include KWSYS_HEADER(Configure.hxx)
 
-#include <sstream>
 #include <fstream>
 #include <iostream>
-#include <vector>
+#include <sstream>
 #include <string.h> /* strlen */
+#include <vector>
 
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
diff --git a/testProcess.c b/testProcess.c
index 8fd3382e94027fa83e72320933624cecd38f2167..abcd03857e36643b3b2825172d67cf19920322f2 100644
--- a/testProcess.c
+++ b/testProcess.c
@@ -16,8 +16,8 @@
 /* Work-around CMake dependency scanning limitation.  This must
    duplicate the above list of headers.  */
 #if 0
-# include "Process.h.in"
-# include "Encoding.h.in"
+#include "Encoding.h.in"
+#include "Process.h.in"
 #endif
 
 #include <assert.h>
@@ -27,10 +27,10 @@
 #include <string.h>
 
 #if defined(_WIN32)
-# include <windows.h>
+#include <windows.h>
 #else
-# include <unistd.h>
-# include <signal.h>
+#include <signal.h>
+#include <unistd.h>
 #endif
 
 #if defined(__BORLANDC__)