Commit dee502be authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarGeoff Thorpe <geoff@openssl.org>

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 30cd4ff2
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
/MINFO
/TABLE
/*.a
/include
/*.pc
/rehash.time
/inc.*
@@ -22,17 +21,6 @@
/out.*
/tmp.*

# Most *.c files under test/ are symlinks
/test/*.c
# Apart from these
!/test/asn1test.c
!/test/methtest.c
!/test/dummytest.c
!/test/igetest.c
!/test/r160test.c
!/test/fips_algvs.c
!/test/testutil.c

/test/*.ss
/test/*.srl
/test/.rnd
@@ -94,8 +82,8 @@ crypto/sha/asm/sha512-sse2.asm
!/crypto/des/times/486-50.sol

# Misc auto generated files
include/openssl/opensslconf.h
/tools/c_rehash
/test/evptests.txt
lib
Makefile.save
*.bak
+11 −17
Original line number Diff line number Diff line
@@ -779,13 +779,13 @@ my $no_gmp=0;
my @skip=();
my $Makefile="Makefile";
my $des_locl="crypto/des/des_locl.h";
my $des	="crypto/des/des.h";
my $bn	="crypto/bn/bn.h";
my $md2	="crypto/md2/md2.h";
my $rc4	="crypto/rc4/rc4.h";
my $des	="include/openssl/des.h";
my $bn	="include/openssl/bn.h";
my $md2	="include/openssl/md2.h";
my $rc4	="include/openssl/rc4.h";
my $rc4_locl="crypto/rc4/rc4_locl.h";
my $idea	="crypto/idea/idea.h";
my $rc2	="crypto/rc2/rc2.h";
my $idea	="include/openssl/idea.h";
my $rc2	="include/openssl/rc2.h";
my $bf	="crypto/bf/bf_locl.h";
my $bn_asm	="bn_asm.o";
my $des_enc="des_enc.o fcrypt_b.o";
@@ -848,7 +848,6 @@ my $libs;
my $libkrb5="";
my $target;
my $options;
my $symlink;
my $make_depend=0;
my %withargs=();
my $build_prefix = "release_";
@@ -869,7 +868,6 @@ while($argv_unprocessed)
	$libs="";
	$target="";
	$options="";
	$symlink=1;

	$argv_unprocessed=0;
	$argvstring=join(' ',@argvcopy);
@@ -1192,8 +1190,6 @@ foreach (sort (keys %disabled))
		{ }
	elsif (/^zlib-dynamic$/)
		{ }
	elsif (/^symlinks$/)
		{ $symlink = 0; }
	elsif (/^sse2$/)
		{ $no_sse2 = 1; }
	else
@@ -1702,7 +1698,7 @@ my $shlib_version_history = "unknown";
my $shlib_major = "unknown";
my $shlib_minor = "unknown";

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

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

@@ -2039,8 +2035,8 @@ print OUT "#ifdef __cplusplus\n";
print OUT "}\n";
print OUT "#endif\n";
close(OUT);
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";
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";
rename("include/openssl/opensslconf.h.new","include/openssl/opensslconf.h") || die "unable to rename include/openssl/opensslconf.h.new\n";


# Fix the date
@@ -2082,9 +2078,7 @@ EOF
} else {
	my $make_command = "$make PERL=\'$perl\'";
	my $make_targets = "";
	$make_targets .= " links" if $symlink;
	$make_targets .= " depend" if $depflags ne $default_depflags && $make_depend;
	$make_targets .= " gentests" if $symlink;
	(system $make_command.$make_targets) == 0 or die "make $make_targets failed"
		if $make_targets ne "";
	if ( $perl =~ m@^/@) {
+9 −14
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ BASEADDR=
DIRS=   crypto ssl engines apps test tools
ENGDIRS= ccgost
SHLIBDIRS= crypto ssl
INSTALL_SUBS= engines apps tools

# dirs in crypto to build
SDIRS=  \
@@ -426,11 +427,6 @@ files:
	$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
	@set -e; target=files; $(RECURSIVE_BUILD_CMD)

links:
	@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
	@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
	@set -e; target=links; $(RECURSIVE_BUILD_CMD)

gentests:
	@(cd test && echo "generating dummy tests (if needed)..." && \
	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
@@ -486,10 +482,10 @@ util/libeay.num::
util/ssleay.num::
	$(PERL) util/mkdef.pl ssl update

crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
	$(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
	$(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
crypto/objects/obj_dat.h: 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
include/openssl/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
	$(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num include/openssl/obj_mac.h
crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
	$(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h

@@ -547,12 +543,11 @@ uninstall: uninstall_sw uninstall_docs

install_sw:
	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
	@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
	do \
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
	@set -e; for i in include/openssl/*.h; do \
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \
	done;
	@set -e; target=install; $(RECURSIVE_BUILD_CMD)
	@set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done
	@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
	do \
		if [ -f "$$i" ]; then \
+32 −31
Original line number Diff line number Diff line
@@ -4,37 +4,38 @@

# files that may have to be rewritten by util/mkerr.pl
L ERR		NONE				NONE
L BN		crypto/bn/bn.h			crypto/bn/bn_err.c
L RSA		crypto/rsa/rsa.h		crypto/rsa/rsa_err.c
L DH		crypto/dh/dh.h			crypto/dh/dh_err.c
L EVP		crypto/evp/evp.h		crypto/evp/evp_err.c
L BUF		crypto/buffer/buffer.h		crypto/buffer/buf_err.c
L OBJ		crypto/objects/objects.h	crypto/objects/obj_err.c
L PEM		crypto/pem/pem.h		crypto/pem/pem_err.c
L DSA		crypto/dsa/dsa.h		crypto/dsa/dsa_err.c
L X509		crypto/x509/x509.h		crypto/x509/x509_err.c
L ASN1		crypto/asn1/asn1.h		crypto/asn1/asn1_err.c
L CONF		crypto/conf/conf.h		crypto/conf/conf_err.c
L CRYPTO	crypto/crypto.h			crypto/cpt_err.c
L EC		crypto/ec/ec.h			crypto/ec/ec_err.c
L SSL		ssl/ssl.h			ssl/ssl_err.c
L BIO		crypto/bio/bio.h		crypto/bio/bio_err.c
L PKCS7		crypto/pkcs7/pkcs7.h		crypto/pkcs7/pkcs7err.c
L X509V3	crypto/x509v3/x509v3.h		crypto/x509v3/v3err.c
L PKCS12	crypto/pkcs12/pkcs12.h		crypto/pkcs12/pk12err.c
L RAND		crypto/rand/rand.h		crypto/rand/rand_err.c
L DSO		crypto/dso/dso.h		crypto/dso/dso_err.c
L ENGINE	crypto/engine/engine.h		crypto/engine/eng_err.c
L OCSP		crypto/ocsp/ocsp.h		crypto/ocsp/ocsp_err.c
L UI		crypto/ui/ui.h			crypto/ui/ui_err.c
L COMP		crypto/comp/comp.h		crypto/comp/comp_err.c
L ECDSA		crypto/ecdsa/ecdsa.h		crypto/ecdsa/ecs_err.c
L ECDH		crypto/ecdh/ecdh.h		crypto/ecdh/ech_err.c
L STORE		crypto/store/store.h		crypto/store/str_err.c
L TS		crypto/ts/ts.h			crypto/ts/ts_err.c
L HMAC		crypto/hmac/hmac.h		crypto/hmac/hmac_err.c
L CMS		crypto/cms/cms.h		crypto/cms/cms_err.c
L JPAKE		crypto/jpake/jpake.h		crypto/jpake/jpake_err.c
L BN		include/openssl/bn.h		crypto/bn/bn_err.c
L RSA		include/openssl/rsa.h		crypto/rsa/rsa_err.c
L DH		include/openssl/dh.h		crypto/dh/dh_err.c
L EVP		include/openssl/evp.h		crypto/evp/evp_err.c
L BUF		include/openssl/buffer.h	crypto/buffer/buf_err.c
L OBJ		include/openssl/objects.h	crypto/objects/obj_err.c
L PEM		include/openssl/pem.h		crypto/pem/pem_err.c
L DSA		include/openssl/dsa.h		crypto/dsa/dsa_err.c
L X509		include/openssl/x509.h		crypto/x509/x509_err.c
L ASN1		include/openssl/asn1.h		crypto/asn1/asn1_err.c
L CONF		include/openssl/conf.h		crypto/conf/conf_err.c
L CRYPTO	include/openssl/crypto.h	crypto/cpt_err.c
L EC		include/openssl/ec.h		crypto/ec/ec_err.c
L SSL		include/openssl/ssl.h		ssl/ssl_err.c
L BIO		include/openssl/bio.h		crypto/bio/bio_err.c
L PKCS7		include/openssl/pkcs7.h		crypto/pkcs7/pkcs7err.c
L X509V3	include/openssl/x509v3.h	crypto/x509v3/v3err.c
L PKCS12	include/openssl/pkcs12.h	crypto/pkcs12/pk12err.c
L RAND		include/openssl/rand.h		crypto/rand/rand_err.c
L DSO		include/openssl/dso.h		crypto/dso/dso_err.c
L ENGINE	include/openssl/engine.h	crypto/engine/eng_err.c
L OCSP		include/openssl/ocsp.h		crypto/ocsp/ocsp_err.c
L UI		include/openssl/ui.h		crypto/ui/ui_err.c
L COMP		include/openssl/comp.h		crypto/comp/comp_err.c
L ECDSA		include/openssl/ecdsa.h		crypto/ecdsa/ecs_err.c
L ECDH		include/openssl/ecdh.h		crypto/ecdh/ech_err.c
L STORE		include/openssl/store.h		crypto/store/str_err.c
L TS		include/openssl/ts.h		crypto/ts/ts_err.c
L HMAC		include/openssl/hmac.h		crypto/hmac/hmac_err.c
L CMS		include/openssl/cms.h		crypto/cms/cms_err.c
L JPAKE		include/openssl/jpake.h		crypto/jpake/jpake_err.c
L FIPS		include/openssl/fips.h		crypto/fips_err.h

# additional header files to be scanned for function names
L NONE		crypto/x509/x509_vfy.h		NONE
+5 −5
Original line number Diff line number Diff line
@@ -38,13 +38,13 @@ lib: $(LIBOBJ)
	$(RANLIB) $(LIB) || echo Never mind.
	@touch lib

obj_dat.h: obj_dat.pl obj_mac.h
	$(PERL) obj_dat.pl obj_mac.h obj_dat.h
obj_dat.h: obj_dat.pl ../../include/openssl/obj_mac.h
	$(PERL) obj_dat.pl ../../include/openssl/obj_mac.h obj_dat.h

# objects.pl both reads and writes obj_mac.num
obj_mac.h: objects.pl objects.txt obj_mac.num
	$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
	@sleep 1; touch obj_mac.h; sleep 1
../../include/openssl/obj_mac.h: objects.pl objects.txt obj_mac.num
	$(PERL) objects.pl objects.txt obj_mac.num ../../include/openssl/obj_mac.h
	@sleep 1; touch ../../include/openssl/obj_mac.h; sleep 1

obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
	$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
Loading