diff options
| author | Bob Beck <[email protected]> | 2026-08-08 01:38:56 +0200 |
|---|---|---|
| committer | Tomas Mraz <[email protected]> | 2026-09-01 16:00:49 +0200 |
| commit | 5c0fe36ea3626a3428e94fe257f917201bc716f9 (patch) | |
| tree | bc4bdcc724b98ebfe9c7825f4cb424cc2d59143e /Configurations | |
| parent | Skip the small generator scripts when their output is current (diff) | |
| download | openssl-5c0fe36ea3626a3428e94fe257f917201bc716f9.tar.gz openssl-5c0fe36ea3626a3428e94fe257f917201bc716f9.zip | |
Generate the committed generator-output headers at build time
Move charmap.h, bn_prime.h, conf_def.h, obj_mac.h, obj_dat.h and
obj_xref.h from committed generator output to GENERATE rules with
DEPENDs on their consumers; obj_mac.h joins the mandatory generated
headers built before everything else. objects.pl learns -a to append
the obj_compat.h aliases itself, replacing the sed step, and
obj_dat.pl reads only the guarded body of obj_mac.h so the appended
aliases cannot pollute its tables. obj_mac.num remains the curated NID
registry in git; the generate_crypto_objects developer target shrinks
to maintaining it, generate_fuzz_oids now depends on the
build-generated obj_dat.h, and the other generate_* developer targets
for these files are retired.
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Merge-date: Tue Sep 1 14:03:02 2026
Merged-from: https://github.com/openssl/openssl/pull/32243
Diffstat (limited to 'Configurations')
| -rw-r--r-- | Configurations/unix-Makefile.tmpl | 60 |
1 files changed, 12 insertions, 48 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 67cce9901d2..bf549abebce 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -1194,10 +1194,8 @@ update: generate errors ordinals generate_buildinfo ## Update errors, ordinals a # of a target that is already current. UPTODATE=$(PERL) -e 'my $$o = shift; exit 1 unless -e $$o; -M $$o < -M $$_ or exit 1 for @ARGV' -.PHONY: generate generate_apps generate_crypto_bn generate_crypto_objects \ - generate_crypto_conf generate_crypto_asn1 generate_fuzz_oids -generate: generate_apps generate_crypto_bn generate_crypto_objects \ - generate_crypto_conf generate_crypto_asn1 generate_fuzz_oids +.PHONY: generate generate_apps generate_crypto_objects generate_fuzz_oids +generate: generate_apps generate_crypto_objects generate_fuzz_oids .PHONY: generate_buildinfo generate_doc_buildinfo generate_buildinfo: generate_doc_buildinfo @@ -1245,59 +1243,25 @@ generate_apps: $(PERL) VMS/VMSify-conf.pl \ < apps/openssl.cnf > apps/openssl-vms.cnf ) -generate_crypto_bn: - ( cd $(SRCDIR); \ - $(UPTODATE) crypto/bn/bn_prime.h crypto/bn/bn_prime.pl || \ - $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h ) - generate_crypto_objects: ( cd $(SRCDIR); set -e; \ $(PERL) crypto/objects/objects.pl -n \ crypto/objects/objects.txt \ crypto/objects/obj_mac.num \ > crypto/objects/obj_mac.num.new; \ - $(PERL) crypto/objects/objects.pl \ - crypto/objects/objects.txt \ - crypto/objects/obj_mac.num.new \ - > include/openssl/obj_mac.h.new; \ - $(PERL) crypto/objects/obj_dat.pl \ - include/openssl/obj_mac.h.new \ - > crypto/objects/obj_dat.h.new; \ - $(PERL) crypto/objects/objxref.pl \ - crypto/objects/obj_mac.num.new \ - crypto/objects/obj_xref.txt \ - > crypto/objects/obj_xref.h.new; \ - sed -e '1,8d' crypto/objects/obj_compat.h \ - >> include/openssl/obj_mac.h.new; \ - for f in crypto/objects/obj_mac.num \ - include/openssl/obj_mac.h \ - crypto/objects/obj_dat.h \ - crypto/objects/obj_xref.h; do \ - if cmp $$f.new $$f > /dev/null 2>&1; then \ - rm $$f.new; \ - else \ - mv $$f.new $$f; \ - fi; \ - done ) + if cmp crypto/objects/obj_mac.num.new \ + crypto/objects/obj_mac.num > /dev/null 2>&1; then \ + rm crypto/objects/obj_mac.num.new; \ + else \ + mv crypto/objects/obj_mac.num.new crypto/objects/obj_mac.num; \ + fi ) -generate_crypto_conf: - ( cd $(SRCDIR); \ - $(UPTODATE) crypto/conf/conf_def.h crypto/conf/keysets.pl || \ - $(PERL) crypto/conf/keysets.pl \ - > crypto/conf/conf_def.h ) - -generate_crypto_asn1: - ( cd $(SRCDIR); \ - $(UPTODATE) crypto/asn1/charmap.h crypto/asn1/charmap.pl || \ - $(PERL) crypto/asn1/charmap.pl \ - > crypto/asn1/charmap.h ) - -generate_fuzz_oids: - ( cd $(SRCDIR); \ +generate_fuzz_oids: crypto/objects/obj_dat.h + ( b=`pwd`; cd $(SRCDIR); \ $(UPTODATE) fuzz/oids.txt \ - crypto/objects/obj_dat.h fuzz/mkfuzzoids.pl || \ + $$b/crypto/objects/obj_dat.h fuzz/mkfuzzoids.pl || \ $(PERL) fuzz/mkfuzzoids.pl \ - crypto/objects/obj_dat.h \ + $$b/crypto/objects/obj_dat.h \ > fuzz/oids.txt ) generate_doc_buildinfo: |
