From 24776ba02c4870e77fda6a586b8586863672c40e Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Fri, 17 Jan 2020 19:41:14 +0000 Subject: [PATCH] Preserve order of tests for integrity of header files. --- mingwrt/ChangeLog | 10 ++++++++++ mingwrt/tests/Makefile.in | 9 +++++---- mingwrt/tests/headers.at | 6 +++--- w32api/ChangeLog | 10 ++++++++++ w32api/tests/Makefile.in | 11 ++++++----- w32api/tests/headers.at | 20 ++++++++++---------- 6 files changed, 44 insertions(+), 22 deletions(-) diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 97c7d4e..498182c 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,15 @@ 2020-01-17 Keith Marshall + 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 + Update handling of test-suite limitation. * include/process.h (-Wbuiltin-declaration-mismatch) diff --git a/mingwrt/tests/Makefile.in b/mingwrt/tests/Makefile.in index 5951eac..9c3172c 100644 --- a/mingwrt/tests/Makefile.in +++ b/mingwrt/tests/Makefile.in @@ -5,7 +5,7 @@ # $Id$ # # Written by Keith Marshall -# 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. # diff --git a/mingwrt/tests/headers.at b/mingwrt/tests/headers.at index 37eb725..0951523 100644 --- a/mingwrt/tests/headers.at +++ b/mingwrt/tests/headers.at @@ -8,7 +8,7 @@ # $Id$ # # Written by Keith Marshall -# 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 diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 316844f..db87969 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,13 @@ +2020-01-17 Keith Marshall + + 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 Incorporate updates for Vista and Windows-7. diff --git a/w32api/tests/Makefile.in b/w32api/tests/Makefile.in index f57f129..3f39e4d 100644 --- a/w32api/tests/Makefile.in +++ b/w32api/tests/Makefile.in @@ -5,7 +5,7 @@ # $Id$ # # Written by Keith Marshall -# 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. # diff --git a/w32api/tests/headers.at b/w32api/tests/headers.at index 9069693..417d25a 100644 --- a/w32api/tests/headers.at +++ b/w32api/tests/headers.at @@ -8,7 +8,7 @@ # $Id$ # # Written by Keith Marshall -# 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 -- 2.11.0