diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-05-11 15:35:43 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2022-08-23 08:50:44 +0200 |
commit | d040a1b9a028e89f0a33b36fb99f0151d2fdd4c3 (patch) | |
tree | 4c677b6be2075f81573bea6243b44b5f6e871ce6 | |
parent | 0e55c3ab8d702ffc897c9beb51d19b14b7896182 (diff) |
Makefile: Generate crypto objects only as far as needed
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/15224)
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 43 | ||||
-rw-r--r-- | crypto/objects/obj_dat.c | 2 |
2 files changed, 34 insertions, 11 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index c9c956024c..21fac4ccfb 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -1130,44 +1130,67 @@ md-nits: lint: lint -DLINT $(INCLUDES) $(SRCS) -generate_apps: +$(SRCDIR)/apps/openssl-vms.cnf: $(SRCDIR)/apps/openssl.cnf ( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \ < apps/openssl.cnf > apps/openssl-vms.cnf ) +.PHONY: generate_apps +generate_apps: $(SRCDIR)/apps/openssl-vms.cnf -generate_crypto_bn: +$(SRCDIR)/crypto/bn/bn_prime.h: $(SRCDIR)/crypto/bn/bn_prime.pl ( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h ) +.PHONY: generate_crypto_bn +generate_crypto_bn: $(SRCDIR)/crypto/bn/bn_prime.h -generate_crypto_objects: +$(SRCDIR)/crypto/objects/obj_mac.num: $(SRCDIR)/crypto/objects/objects.pl \ + $(SRCDIR)/crypto/objects/objects.txt ( cd $(SRCDIR); $(PERL) crypto/objects/objects.pl -n \ crypto/objects/objects.txt \ crypto/objects/obj_mac.num \ > crypto/objects/obj_mac.new && \ mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num ) +$(SRCDIR)/include/openssl/obj_mac.h: $(SRCDIR)/crypto/objects/objects.pl \ + $(SRCDIR)/crypto/objects/obj_dat.pl \ + $(SRCDIR)/crypto/objects/obj_mac.num \ + $(SRCDIR)/crypto/objects/obj_compat.h ( cd $(SRCDIR); $(PERL) crypto/objects/objects.pl \ crypto/objects/objects.txt \ crypto/objects/obj_mac.num \ - > include/openssl/obj_mac.h ) - ( cd $(SRCDIR); $(PERL) crypto/objects/obj_dat.pl \ + > include/openssl/obj_mac.h && \ + $(PERL) crypto/objects/obj_dat.pl \ include/openssl/obj_mac.h \ - > crypto/objects/obj_dat.h ) + > crypto/objects/obj_dat.h && \ + sed -e '1,8d' crypto/objects/obj_compat.h \ + >> include/openssl/obj_mac.h ) +$(SRCDIR)/crypto/objects/obj_dat.h: $(SRCDIR)/include/openssl/obj_mac.h +$(SRCDIR)/crypto/objects/obj_xref.h: $(SRCDIR)/crypto/objects/objxref.pl \ + $(SRCDIR)/crypto/objects/obj_mac.num \ + $(SRCDIR)/crypto/objects/obj_xref.txt ( cd $(SRCDIR); $(PERL) crypto/objects/objxref.pl \ crypto/objects/obj_mac.num \ crypto/objects/obj_xref.txt \ > crypto/objects/obj_xref.h ) - ( cd $(SRCDIR); sed -e '1,8d' crypto/objects/obj_compat.h >> include/openssl/obj_mac.h ) +.PHONY: generate_crypto_objects +generate_crypto_objects: $(SRCDIR)/crypto/objects/obj_dat.h \ + $(SRCDIR)/crypto/objects/obj_xref.h -generate_crypto_conf: +$(SRCDIR)/crypto/conf/conf_def.h: $(SRCDIR)/crypto/conf/keysets.pl ( cd $(SRCDIR); $(PERL) crypto/conf/keysets.pl \ > crypto/conf/conf_def.h ) +.PHONY: generate_crypto_conf +generate_crypto_conf: $(SRCDIR)/crypto/conf/conf_def.h -generate_crypto_asn1: +$(SRCDIR)/crypto/asn1/charmap.h: $(SRCDIR)/crypto/asn1/charmap.pl ( cd $(SRCDIR); $(PERL) crypto/asn1/charmap.pl \ > crypto/asn1/charmap.h ) +.PHONY: generate_crypto_asn1 +generate_crypto_asn1: $(SRCDIR)/crypto/asn1/charmap.h -generate_fuzz_oids: +$(SRCDIR)/fuzz/oids.txt: $(SRCDIR)/fuzz/mkfuzzoids.pl $(SRCDIR)/crypto/objects/obj_dat.h ( cd $(SRCDIR); $(PERL) fuzz/mkfuzzoids.pl \ crypto/objects/obj_dat.h \ > fuzz/oids.txt ) +.PHONY: generate_fuzz_oids +generate_fuzz_oids: $(SRCDIR)/fuzz/oids.txt generate_doc_buildinfo: ( $(PERL) -I$(BLDDIR) -Mconfigdata \ diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 7ad55711cf..852039b6da 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -20,7 +20,7 @@ #include "crypto/asn1.h" #include "obj_local.h" -/* obj_dat.h is generated from objects.h by obj_dat.pl */ +/* obj_dat.h is generated from objects.txt and obj_mac.{num,h} by obj_dat.pl */ #include "obj_dat.h" DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn); |