From 7ae24732c78513061d83fc8f078332a58d0117c4 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 16 Jan 2022 12:08:43 -0500 Subject: [PATCH] clang-format generated hdb, spnego and krb5 asn1.c files Alphabetically sorted the $(spnego_files), $(gssapi_files), and $(gen_files_hdb) lists. Added rules to execute clang-format when available on the included files. Change-Id: If3cde862f3237bc7cd100bc82d4fbbf568f1a354 --- lib/gssapi/Makefile.am | 19 +++++++++++++------ lib/hdb/Makefile.am | 33 ++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/lib/gssapi/Makefile.am b/lib/gssapi/Makefile.am index 9ebf3b9f1..a69ebffb0 100644 --- a/lib/gssapi/Makefile.am +++ b/lib/gssapi/Makefile.am @@ -307,19 +307,20 @@ nobase_include_HEADERS = \ gssapidir = $(includedir)/gssapi nodist_gssapi_HEADERS = gkrb5_err.h negoex_err.h -gssapi_files = asn1_GSSAPIContextToken.c +gssapi_files = \ + asn1_GSSAPIContextToken.c spnego_files = \ asn1_ContextFlags.c \ asn1_MechType.c \ asn1_MechTypeList.c \ - asn1_NegotiationToken.c \ - asn1_NegotiationToken2.c \ asn1_NegHints.c \ + asn1_NegStateEnum.c \ asn1_NegTokenInit.c \ asn1_NegTokenInit2.c \ asn1_NegTokenResp.c \ - asn1_NegStateEnum.c + asn1_NegotiationToken.c \ + asn1_NegotiationToken2.c BUILTHEADERS = \ $(srcdir)/krb5/gsskrb5-private.h \ @@ -347,7 +348,14 @@ CLEANFILES = $(BUILT_SOURCES) \ spnego_asn1.json spnego_asn1_oids.c spnego_asn1_syms.c $(spnego_files) spnego_asn1.h spnego_asn1-priv.h: spnego_asn1_files + for genfile in '$(spnego_files)'; do \ + $(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i $${genfile}; \ + done + $(gssapi_files) gssapi_asn1.h gssapi_asn1-priv.h: gssapi_asn1_files + for genfile in '$(gssapi_files)'; do \ + $(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i $${genfile}; \ + done spnego_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/spnego/spnego.asn1 $(srcdir)/spnego/spnego.opt $(ASN1_COMPILE) --option-file=$(srcdir)/spnego/spnego.opt $(srcdir)/spnego/spnego.asn1 spnego_asn1 @@ -367,7 +375,7 @@ $(srcdir)/sanon/sanon-private.h: cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p sanon/sanon-private.h $(sanonsrc) || rm -f sanon/sanon-private.h TESTS = test_oid test_names test_cfx -# test_sequence +# test_sequence test_cfx_SOURCES = krb5/test_cfx.c @@ -458,4 +466,3 @@ test_negoex_mech_la_LDFLAGS = -module test_negoex_mech_la_LIBADD = \ $(top_builddir)/lib/asn1/libasn1.la \ libgssapi.la - diff --git a/lib/hdb/Makefile.am b/lib/hdb/Makefile.am index fbc6b9efb..89ab15d9d 100644 --- a/lib/hdb/Makefile.am +++ b/lib/hdb/Makefile.am @@ -20,30 +20,30 @@ BUILT_SOURCES = \ hdb_err.h gen_files_hdb = \ - asn1_Salt.c \ - asn1_Key.c \ asn1_Event.c \ - asn1_HDBFlags.c \ asn1_GENERATION.c \ + asn1_HDB_EncTypeList.c \ + asn1_HDB_Ext_Aliases.c \ + asn1_HDB_Ext_Constrained_delegation_acl.c \ + asn1_HDB_Ext_KeyRotation.c \ + asn1_HDB_Ext_KeySet.c \ + asn1_HDB_Ext_Lan_Manager_OWF.c \ + asn1_HDB_Ext_Password.c \ asn1_HDB_Ext_PKINIT_acl.c \ asn1_HDB_Ext_PKINIT_cert.c \ asn1_HDB_Ext_PKINIT_hash.c \ - asn1_HDB_Ext_Constrained_delegation_acl.c \ - asn1_HDB_Ext_KeyRotation.c \ - asn1_HDB_Ext_Lan_Manager_OWF.c \ - asn1_HDB_Ext_Password.c \ - asn1_HDB_Ext_Aliases.c \ - asn1_HDB_Ext_KeySet.c \ + asn1_HDB_EntryOrAlias.c \ + asn1_HDB_entry_alias.c \ + asn1_HDB_entry.c \ asn1_HDB_extension.c \ asn1_HDB_extensions.c \ - asn1_HDB_EncTypeList.c \ - asn1_HDB_EntryOrAlias.c \ + asn1_HDB_keyset.c \ + asn1_HDBFlags.c \ + asn1_Key.c \ asn1_KeyRotation.c \ asn1_KeyRotationFlags.c \ - asn1_HDB_entry.c \ - asn1_HDB_entry_alias.c \ - asn1_HDB_keyset.c \ - asn1_Keys.c + asn1_Keys.c \ + asn1_Salt.c CLEANFILES = $(BUILT_SOURCES) $(gen_files_hdb) \ hdb_asn1{,-priv}.h hdb_asn1_files hdb_asn1-template.c \ @@ -144,6 +144,9 @@ $(srcdir)/hdb-private.h: $(dist_libhdb_la_SOURCES) cd $(srcdir); perl ../../cf/make-proto.pl -q -P comment -p hdb-private.h $(dist_libhdb_la_SOURCES) || rm -f hdb-private.h $(gen_files_hdb) hdb_asn1.h hdb_asn1-priv.h: hdb_asn1_files + for genfile in '$(gen_files_hdb)'; do \ + $(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i $${genfile}; \ + done hdb_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/hdb.asn1 $(ASN1_COMPILE) --option-file=$(srcdir)/hdb.opt $(srcdir)/hdb.asn1 hdb_asn1