OSDN Git Service

Preserve order of tests for integrity of header files.
authorKeith Marshall <keith@users.osdn.me>
Fri, 17 Jan 2020 19:41:14 +0000 (19:41 +0000)
committerKeith Marshall <keith@users.osdn.me>
Fri, 17 Jan 2020 19:41:14 +0000 (19:41 +0000)
mingwrt/ChangeLog
mingwrt/tests/Makefile.in
mingwrt/tests/headers.at
w32api/ChangeLog
w32api/tests/Makefile.in
w32api/tests/headers.at

index 97c7d4e..498182c 100644 (file)
@@ -1,5 +1,15 @@
 2020-01-17  Keith Marshall  <keith@users.osdn.me>
 
+       Preserve order of tests for integrity of header files.
+
+       * tests/Makefile.in: Explicitly sort $wildcard output, within...
+       (list_headers): ...this new function-style macro.
+       (enum_headers): Use it.
+
+       * tests/headers.at: Adjust to recent GNU make $sort order.
+
+2020-01-17  Keith Marshall  <keith@users.osdn.me>
+
        Update handling of <process.h> test-suite limitation.
 
        * include/process.h (-Wbuiltin-declaration-mismatch)
index 5951eac..9c3172c 100644 (file)
@@ -5,7 +5,7 @@
 # $Id$
 #
 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2016, 2017, 2019, MinGW.org Project
+# Copyright (C) 2016, 2017, 2019, 2020, MinGW.org Project
 #
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -85,13 +85,14 @@ testsuite.at.tmp: %.tmp: ../config.status %.in
 headers.at.pretest: MINGWRT_AT_ENUM := MINGWRT_AT_PACKAGE_HEADERS
 headers.at.pretest: %.pretest:
        sed '/^m4_define(\[$(MINGWRT_AT_ENUM)],/q' ${srcdir}/$* > $@
-       $(call enum_headers,hdr,${top_srcdir}/include, dnl >> $@;)
-       $(call enum_headers,hdr,${top_srcdir}/include/sys, dnl >> $@;,sys)
+       $(call enum_headers,${top_srcdir}/include) >> $@
+       $(call enum_headers,${top_srcdir}/include, sys) >> $@
        sed -n '/^])# $(MINGWRT_AT_ENUM)/,$$p' ${srcdir}/$* >> $@
        cmp -s $@ ${srcdir}/$* || cp -f $@ ${srcdir}/$*
        $(RM) $@
 
-enum_headers = $(foreach $1,$(notdir $(wildcard $2/*.h)),echo $(4:%=%/)$($1)$3)
+enum_headers = printf '%s dnl\n' $(call list_headers,$1$(2:%=/%),$(2:%=%/))
+list_headers = $(addprefix $2,$(sort $(notdir $(wildcard $1/*.h))))
 
 # Compile the testsuite, from autotest sources.
 #
index 37eb725..0951523 100644 (file)
@@ -8,7 +8,7 @@
 # $Id$
 #
 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2016, MinGW.org Project
+# Copyright (C) 2016, 2020, MinGW.org Project
 #
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -42,9 +42,9 @@ assert.h dnl
 complex.h dnl
 conio.h dnl
 ctype.h dnl
+dir.h dnl
 direct.h dnl
 dirent.h dnl
-dir.h dnl
 dlfcn.h dnl
 dos.h dnl
 errno.h dnl
@@ -89,8 +89,8 @@ sys/file.h dnl
 sys/locking.h dnl
 sys/param.h dnl
 sys/stat.h dnl
-sys/timeb.h dnl
 sys/time.h dnl
+sys/timeb.h dnl
 sys/types.h dnl
 sys/unistd.h dnl
 sys/utime.h dnl
index 316844f..db87969 100644 (file)
@@ -1,3 +1,13 @@
+2020-01-17  Keith Marshall  <keith@users.osdn.me>
+
+       Preserve order of tests for integrity of header files.
+
+       * tests/Makefile.in: Explicitly sort $wildcard output, within...
+       (list_headers): ...this new function-style macro.
+       (enum_headers, enum_header_subdirs): Use it.
+
+       * tests/headers.at: Adjust to recent GNU make $sort order.
+
 2020-01-15  Keith Marshall  <keith@users.osdn.me>
 
        Incorporate <winnls.h> updates for Vista and Windows-7.
index f57f129..3f39e4d 100644 (file)
@@ -5,7 +5,7 @@
 # $Id$
 #
 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2017, 2019, MinGW.org Project
+# Copyright (C) 2017, 2019, 2020, MinGW.org Project
 #
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -85,14 +85,15 @@ testsuite.at.tmp: %.tmp: ../config.status %.in
 headers.at.pretest: W32API_AT_ENUM := W32API_AT_PACKAGE_HEADERS
 headers.at.pretest: %.pretest:
        sed '/^m4_define(\[$(W32API_AT_ENUM)],/q' ${srcdir}/$* > $@
-       $(call enum_headers,hdr,${top_srcdir}/include, dnl >> $@;)
-       $(call enum_header_subdirs,${top_srcdir}/include,$(HEADER_SUBDIRS),$@;)
+       $(call enum_headers,${top_srcdir}/include) >> $@
+       $(call enum_header_subdirs,${top_srcdir}/include,$(HEADER_SUBDIRS))
        sed -n '/^])# $(W32API_AT_ENUM)/,$$p' ${srcdir}/$* >> $@
        cmp -s $@ ${srcdir}/$* || cp -f $@ ${srcdir}/$*
        $(RM) $@
 
-enum_headers = $(foreach $1,$(notdir $(wildcard $2/*.h)),echo $(4:%=%/)$($1)$3)
-enum_header_subdirs = $(foreach d,$2,$(call enum_headers,h,$1/$d, dnl >> $3,$d))
+enum_header_subdirs = $(foreach d,$2,$(call enum_headers,$1,$d) >> $@;)
+enum_headers = printf '%s dnl\n' $(call list_headers,$1$(2:%=/%),$(2:%=%/))
+list_headers = $(addprefix $2,$(sort $(notdir $(wildcard $1/*.h))))
 
 # Compile the testsuite, from autotest sources.
 #
index 9069693..417d25a 100644 (file)
@@ -8,7 +8,7 @@
 # $Id$
 #
 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-# Copyright (C) 2017, MinGW.org Project
+# Copyright (C) 2017, 2020, MinGW.org Project
 #
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -57,8 +57,8 @@ comcat.h dnl
 commctrl.h dnl
 commdlg.h dnl
 control.h dnl
-cplext.h dnl
 cpl.h dnl
+cplext.h dnl
 custcntl.h dnl
 dbt.h dnl
 dde.h dnl
@@ -104,6 +104,7 @@ isguids.h dnl
 ks.h dnl
 ksmedia.h dnl
 largeint.h dnl
+lm.h dnl
 lmaccess.h dnl
 lmalert.h dnl
 lmapibuf.h dnl
@@ -115,7 +116,6 @@ lmconfig.h dnl
 lmcons.h dnl
 lmerr.h dnl
 lmerrlog.h dnl
-lm.h dnl
 lmmsg.h dnl
 lmremutl.h dnl
 lmrepl.h dnl
@@ -124,8 +124,8 @@ lmshare.h dnl
 lmsname.h dnl
 lmstats.h dnl
 lmsvc.h dnl
-lmuseflg.h dnl
 lmuse.h dnl
+lmuseflg.h dnl
 lmwksta.h dnl
 lzexpand.h dnl
 mapi.h dnl
@@ -160,6 +160,7 @@ objsafe.h dnl
 objsel.h dnl
 ocidl.h dnl
 odbcinst.h dnl
+ole.h dnl
 ole2.h dnl
 ole2ver.h dnl
 oleacc.h dnl
@@ -167,7 +168,6 @@ oleauto.h dnl
 olectl.h dnl
 olectlid.h dnl
 oledlg.h dnl
-ole.h dnl
 oleidl.h dnl
 poppack.h dnl
 powrprof.h dnl
@@ -179,19 +179,19 @@ pshpack4.h dnl
 pshpack8.h dnl
 qedit.h dnl
 rapi.h dnl
+ras.h dnl
 rasdlg.h dnl
 raserror.h dnl
-ras.h dnl
 rassapi.h dnl
 reason.h dnl
 regstr.h dnl
 richedit.h dnl
 richole.h dnl
 routprot.h dnl
-rpcdce2.h dnl
+rpc.h dnl
 rpcdce.h dnl
+rpcdce2.h dnl
 rpcdcep.h dnl
-rpc.h dnl
 rpcndr.h dnl
 rpcnsi.h dnl
 rpcnsip.h dnl
@@ -215,8 +215,8 @@ shlwapi.h dnl
 shobjidl.h dnl
 snmp.h dnl
 specstrings.h dnl
-sqlext.h dnl
 sql.h dnl
+sqlext.h dnl
 sqltypes.h dnl
 sqlucode.h dnl
 sspi.h dnl
@@ -254,8 +254,8 @@ winperf.h dnl
 winreg.h dnl
 winresrc.h dnl
 winsnmp.h dnl
-winsock2.h dnl
 winsock.h dnl
+winsock2.h dnl
 winspool.h dnl
 winsvc.h dnl
 winuser.h dnl