Skip to content

Commit dee502b

Browse files
committed
Stop symlinking, move files to intended directory
Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <[email protected]> Reviewed-by: Rich Salz <[email protected]>
1 parent 30cd4ff commit dee502b

121 files changed

Lines changed: 129 additions & 151 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,13 @@
1414
/MINFO
1515
/TABLE
1616
/*.a
17-
/include
1817
/*.pc
1918
/rehash.time
2019
/inc.*
2120
/makefile.*
2221
/out.*
2322
/tmp.*
2423

25-
# Most *.c files under test/ are symlinks
26-
/test/*.c
27-
# Apart from these
28-
!/test/asn1test.c
29-
!/test/methtest.c
30-
!/test/dummytest.c
31-
!/test/igetest.c
32-
!/test/r160test.c
33-
!/test/fips_algvs.c
34-
!/test/testutil.c
35-
3624
/test/*.ss
3725
/test/*.srl
3826
/test/.rnd
@@ -94,8 +82,8 @@ crypto/sha/asm/sha512-sse2.asm
9482
!/crypto/des/times/486-50.sol
9583

9684
# Misc auto generated files
85+
include/openssl/opensslconf.h
9786
/tools/c_rehash
98-
/test/evptests.txt
9987
lib
10088
Makefile.save
10189
*.bak

Configure

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -779,13 +779,13 @@ my $no_gmp=0;
779779
my @skip=();
780780
my $Makefile="Makefile";
781781
my $des_locl="crypto/des/des_locl.h";
782-
my $des ="crypto/des/des.h";
783-
my $bn ="crypto/bn/bn.h";
784-
my $md2 ="crypto/md2/md2.h";
785-
my $rc4 ="crypto/rc4/rc4.h";
782+
my $des ="include/openssl/des.h";
783+
my $bn ="include/openssl/bn.h";
784+
my $md2 ="include/openssl/md2.h";
785+
my $rc4 ="include/openssl/rc4.h";
786786
my $rc4_locl="crypto/rc4/rc4_locl.h";
787-
my $idea ="crypto/idea/idea.h";
788-
my $rc2 ="crypto/rc2/rc2.h";
787+
my $idea ="include/openssl/idea.h";
788+
my $rc2 ="include/openssl/rc2.h";
789789
my $bf ="crypto/bf/bf_locl.h";
790790
my $bn_asm ="bn_asm.o";
791791
my $des_enc="des_enc.o fcrypt_b.o";
@@ -848,7 +848,6 @@ my $libs;
848848
my $libkrb5="";
849849
my $target;
850850
my $options;
851-
my $symlink;
852851
my $make_depend=0;
853852
my %withargs=();
854853
my $build_prefix = "release_";
@@ -869,7 +868,6 @@ while($argv_unprocessed)
869868
$libs="";
870869
$target="";
871870
$options="";
872-
$symlink=1;
873871

874872
$argv_unprocessed=0;
875873
$argvstring=join(' ',@argvcopy);
@@ -1192,8 +1190,6 @@ foreach (sort (keys %disabled))
11921190
{ }
11931191
elsif (/^zlib-dynamic$/)
11941192
{ }
1195-
elsif (/^symlinks$/)
1196-
{ $symlink = 0; }
11971193
elsif (/^sse2$/)
11981194
{ $no_sse2 = 1; }
11991195
else
@@ -1702,7 +1698,7 @@ my $shlib_version_history = "unknown";
17021698
my $shlib_major = "unknown";
17031699
my $shlib_minor = "unknown";
17041700

1705-
open(IN,'<crypto/opensslv.h') || die "unable to read opensslv.h:$!\n";
1701+
open(IN,'<include/openssl/opensslv.h') || die "unable to read opensslv.h:$!\n";
17061702
while (<IN>)
17071703
{
17081704
$version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /;
@@ -1923,8 +1919,8 @@ foreach (sort split(/\s+/,$bn_ops))
19231919
}
19241920

19251921
open(IN,'<crypto/opensslconf.h.in') || die "unable to read crypto/opensslconf.h.in:$!\n";
1926-
unlink("crypto/opensslconf.h.new") || die "unable to remove old crypto/opensslconf.h.new:$!\n" if -e "crypto/opensslconf.h.new";
1927-
open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslconf.h.new:$!\n";
1922+
unlink("include/openssl/opensslconf.h.new") || die "unable to remove old include/openssl/opensslconf.h.new:$!\n" if -e "include/openssl/opensslconf.h.new";
1923+
open(OUT,'>include/openssl/opensslconf.h.new') || die "unable to create include/openssl/opensslconf.h.new:$!\n";
19281924
print OUT "/* opensslconf.h */\n";
19291925
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";
19301926

@@ -2039,8 +2035,8 @@ print OUT "#ifdef __cplusplus\n";
20392035
print OUT "}\n";
20402036
print OUT "#endif\n";
20412037
close(OUT);
2042-
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
2043-
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";
2038+
rename("include/openssl/opensslconf.h","include/openssl/opensslconf.h.bak") || die "unable to rename include/openssl/opensslconf.h\n" if -e "include/openssl/opensslconf.h";
2039+
rename("include/openssl/opensslconf.h.new","include/openssl/opensslconf.h") || die "unable to rename include/openssl/opensslconf.h.new\n";
20442040

20452041

20462042
# Fix the date
@@ -2082,9 +2078,7 @@ EOF
20822078
} else {
20832079
my $make_command = "$make PERL=\'$perl\'";
20842080
my $make_targets = "";
2085-
$make_targets .= " links" if $symlink;
20862081
$make_targets .= " depend" if $depflags ne $default_depflags && $make_depend;
2087-
$make_targets .= " gentests" if $symlink;
20882082
(system $make_command.$make_targets) == 0 or die "make $make_targets failed"
20892083
if $make_targets ne "";
20902084
if ( $perl =~ m@^/@) {

Makefile.org

Lines changed: 9 additions & 14 deletions

crypto/err/openssl.ec

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,38 @@
44

55
# files that may have to be rewritten by util/mkerr.pl
66
L ERR NONE NONE
7-
L BN crypto/bn/bn.h crypto/bn/bn_err.c
8-
L RSA crypto/rsa/rsa.h crypto/rsa/rsa_err.c
9-
L DH crypto/dh/dh.h crypto/dh/dh_err.c
10-
L EVP crypto/evp/evp.h crypto/evp/evp_err.c
11-
L BUF crypto/buffer/buffer.h crypto/buffer/buf_err.c
12-
L OBJ crypto/objects/objects.h crypto/objects/obj_err.c
13-
L PEM crypto/pem/pem.h crypto/pem/pem_err.c
14-
L DSA crypto/dsa/dsa.h crypto/dsa/dsa_err.c
15-
L X509 crypto/x509/x509.h crypto/x509/x509_err.c
16-
L ASN1 crypto/asn1/asn1.h crypto/asn1/asn1_err.c
17-
L CONF crypto/conf/conf.h crypto/conf/conf_err.c
18-
L CRYPTO crypto/crypto.h crypto/cpt_err.c
19-
L EC crypto/ec/ec.h crypto/ec/ec_err.c
20-
L SSL ssl/ssl.h ssl/ssl_err.c
21-
L BIO crypto/bio/bio.h crypto/bio/bio_err.c
22-
L PKCS7 crypto/pkcs7/pkcs7.h crypto/pkcs7/pkcs7err.c
23-
L X509V3 crypto/x509v3/x509v3.h crypto/x509v3/v3err.c
24-
L PKCS12 crypto/pkcs12/pkcs12.h crypto/pkcs12/pk12err.c
25-
L RAND crypto/rand/rand.h crypto/rand/rand_err.c
26-
L DSO crypto/dso/dso.h crypto/dso/dso_err.c
27-
L ENGINE crypto/engine/engine.h crypto/engine/eng_err.c
28-
L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_err.c
29-
L UI crypto/ui/ui.h crypto/ui/ui_err.c
30-
L COMP crypto/comp/comp.h crypto/comp/comp_err.c
31-
L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c
32-
L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c
33-
L STORE crypto/store/store.h crypto/store/str_err.c
34-
L TS crypto/ts/ts.h crypto/ts/ts_err.c
35-
L HMAC crypto/hmac/hmac.h crypto/hmac/hmac_err.c
36-
L CMS crypto/cms/cms.h crypto/cms/cms_err.c
37-
L JPAKE crypto/jpake/jpake.h crypto/jpake/jpake_err.c
7+
L BN include/openssl/bn.h crypto/bn/bn_err.c
8+
L RSA include/openssl/rsa.h crypto/rsa/rsa_err.c
9+
L DH include/openssl/dh.h crypto/dh/dh_err.c
10+
L EVP include/openssl/evp.h crypto/evp/evp_err.c
11+
L BUF include/openssl/buffer.h crypto/buffer/buf_err.c
12+
L OBJ include/openssl/objects.h crypto/objects/obj_err.c
13+
L PEM include/openssl/pem.h crypto/pem/pem_err.c
14+
L DSA include/openssl/dsa.h crypto/dsa/dsa_err.c
15+
L X509 include/openssl/x509.h crypto/x509/x509_err.c
16+
L ASN1 include/openssl/asn1.h crypto/asn1/asn1_err.c
17+
L CONF include/openssl/conf.h crypto/conf/conf_err.c
18+
L CRYPTO include/openssl/crypto.h crypto/cpt_err.c
19+
L EC include/openssl/ec.h crypto/ec/ec_err.c
20+
L SSL include/openssl/ssl.h ssl/ssl_err.c
21+
L BIO include/openssl/bio.h crypto/bio/bio_err.c
22+
L PKCS7 include/openssl/pkcs7.h crypto/pkcs7/pkcs7err.c
23+
L X509V3 include/openssl/x509v3.h crypto/x509v3/v3err.c
24+
L PKCS12 include/openssl/pkcs12.h crypto/pkcs12/pk12err.c
25+
L RAND include/openssl/rand.h crypto/rand/rand_err.c
26+
L DSO include/openssl/dso.h crypto/dso/dso_err.c
27+
L ENGINE include/openssl/engine.h crypto/engine/eng_err.c
28+
L OCSP include/openssl/ocsp.h crypto/ocsp/ocsp_err.c
29+
L UI include/openssl/ui.h crypto/ui/ui_err.c
30+
L COMP include/openssl/comp.h crypto/comp/comp_err.c
31+
L ECDSA include/openssl/ecdsa.h crypto/ecdsa/ecs_err.c
32+
L ECDH include/openssl/ecdh.h crypto/ecdh/ech_err.c
33+
L STORE include/openssl/store.h crypto/store/str_err.c
34+
L TS include/openssl/ts.h crypto/ts/ts_err.c
35+
L HMAC include/openssl/hmac.h crypto/hmac/hmac_err.c
36+
L CMS include/openssl/cms.h crypto/cms/cms_err.c
37+
L JPAKE include/openssl/jpake.h crypto/jpake/jpake_err.c
38+
L FIPS include/openssl/fips.h crypto/fips_err.h
3839

3940
# additional header files to be scanned for function names
4041
L NONE crypto/x509/x509_vfy.h NONE

crypto/objects/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ lib: $(LIBOBJ)
3838
$(RANLIB) $(LIB) || echo Never mind.
3939
@touch lib
4040

41-
obj_dat.h: obj_dat.pl obj_mac.h
42-
$(PERL) obj_dat.pl obj_mac.h obj_dat.h
41+
obj_dat.h: obj_dat.pl ../../include/openssl/obj_mac.h
42+
$(PERL) obj_dat.pl ../../include/openssl/obj_mac.h obj_dat.h
4343

4444
# objects.pl both reads and writes obj_mac.num
45-
obj_mac.h: objects.pl objects.txt obj_mac.num
46-
$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
47-
@sleep 1; touch obj_mac.h; sleep 1
45+
../../include/openssl/obj_mac.h: objects.pl objects.txt obj_mac.num
46+
$(PERL) objects.pl objects.txt obj_mac.num ../../include/openssl/obj_mac.h
47+
@sleep 1; touch ../../include/openssl/obj_mac.h; sleep 1
4848

4949
obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
5050
$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)