Date: Fri, 20 Sep 2002 18:59:10 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Cc: "David O'Brien" <obrien@FreeBSD.org>, Kris Kennaway <kris@FreeBSD.org>, Bruce Evans <bde@FreeBSD.org> Subject: Re: cvs commit: src/secure/lib/libcrypto Makefile.inc src/secure/lib/libssl Makefile Message-ID: <20020920155910.GA69658@sunbay.com> In-Reply-To: <200209201233.g8KCXKvs056949@freefall.freebsd.org> References: <200209201233.g8KCXKvs056949@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Sep 20, 2002 at 05:33:19AM -0700, Ruslan Ermilov wrote:
> ru 2002/09/20 05:33:19 PDT
>
> Modified files:
> secure/lib/libcrypto Makefile.inc
> secure/lib/libssl Makefile
> Log:
> Bandaid for a broken world. The real fix is somewhat more
> complicated and will be sent for a review.
>
> Revision Changes Path
> 1.27 +3 -3 src/secure/lib/libcrypto/Makefile.inc
> 1.13 +7 -9 src/secure/lib/libssl/Makefile
>
My proposed "real fix" is to unobfuscate these makefiles by not
using the ${.OBJDIR}/openssl, at the cost of losing the ability
to build these libraries in the standalone mode (outside of the
buildworld and if new headers do not match /usr/include/openssl
stuff). This is IMO not a problem, as most utilities depend on
new headers already be installed to /usr/include. (Well, the
standalone building is still possible with this patch with the
"make includes; make ..." approarch, and that is the approach
we use during buildworld: "make includes" is the prerequisite
for a successful "make depend/all".) Please let me know what
do you think.
%%%
Index: libcrypto/Makefile
===================================================================
RCS file: /home/ncvs/src/secure/lib/libcrypto/Makefile,v
retrieving revision 1.48
diff -u -r1.48 Makefile
--- libcrypto/Makefile 30 Jul 2002 14:47:24 -0000 1.48
+++ libcrypto/Makefile 20 Sep 2002 13:06:35 -0000
@@ -30,8 +30,9 @@
MAINTAINER= kris
# base sources
-SRCS+= cpt_err.c cryptlib.c cversion.c ebcdic.c ex_data.c mem.c mem_dbg.c \
+SRCS= cpt_err.c cryptlib.c cversion.c ebcdic.c ex_data.c mem.c mem_dbg.c \
tmdiff.c uid.c
+INCS= crypto.h ebcdic.h opensslv.h symhacks.h tmdiff.h ../e_os.h ../e_os2.h
# asn1
@@ -50,6 +51,7 @@
t_spki.c t_x509.c t_x509a.c x_algor.c x_attrib.c x_cinf.c \
x_crl.c x_exten.c x_info.c x_name.c x_pkey.c x_pubkey.c \
x_req.c x_sig.c x_spki.c x_val.c x_x509.c x_x509a.c
+INCS+= asn1.h asn1_mac.h
# blowfish
SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c
@@ -62,11 +64,13 @@
.else
SRCS+= bf_enc.c
.endif
+INCS+= blowfish.h
# bio
SRCS+= b_dump.c b_print.c b_sock.c bf_buff.c bf_nbio.c bf_null.c \
bio_cb.c bio_err.c bio_lib.c bss_acpt.c bss_bio.c bss_conn.c \
bss_fd.c bss_file.c bss_log.c bss_mem.c bss_null.c bss_sock.c
+INCS+= bio.h
# bn
@@ -79,9 +83,11 @@
.else
SRCS+= bn_asm.c
.endif
+INCS+= bn.h
# buffer
SRCS+= buf_err.c buffer.c
+INCS+= buffer.h
# cast
SRCS+= c_cfb64.c c_ecb.c c_ofb64.c c_skey.c
@@ -90,12 +96,15 @@
.else
SRCS+= c_enc.c
.endif
+INCS+= cast.h
# comp
SRCS+= c_rle.c c_zlib.c comp_lib.c
+INCS+= comp.h
# conf
SRCS+= conf_api.c conf_def.c conf_err.c conf_lib.c
+INCS+= conf.h conf_api.h
# des
SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c \
@@ -108,20 +117,25 @@
.else
SRCS+= des_enc.c fcrypt_b.c
.endif
+INCS+= des.h
# dh
SRCS+= dh_check.c dh_err.c dh_gen.c dh_key.c dh_lib.c
+INCS+= dh.h
# dsa
SRCS+= dsa_asn1.c dsa_err.c dsa_gen.c dsa_key.c dsa_lib.c dsa_ossl.c \
dsa_sign.c dsa_vrf.c
+INCS+= dsa.h
# dso
SRCS+= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \
dso_openssl.c
+INCS+= dso.h
# err
SRCS+= err.c err_all.c err_prn.c
+INCS+= err.h
# evp
SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \
@@ -134,49 +148,62 @@
# hmac
SRCS+= hmac.c
+INCS+= hmac.h
# idea
.if defined(MAKE_IDEA) && ${MAKE_IDEA} == YES
SRCS+= i_ecb.c i_cbc.c i_cfb64.c i_ofb64.c i_skey.c
+INCS+= idea.h
.endif
# lhash
SRCS+= lh_stats.c lhash.c
+INCS+= lhash.h
# md2
SRCS+= md2_dgst.c md2_one.c
+INCS+= md2.h
# md4
SRCS+= md4_dgst.c md4_one.c
+INCS+= md4.h
# md5
SRCS+= md5_dgst.c md5_one.c
.if ${MACHINE_ARCH} == "i386"
SRCS+= md5-586.s
.endif
+INCS+= md5.h
# mdc2
SRCS+= mdc2dgst.c mdc2_one.c
+INCS+= mdc2.h
# objects
SRCS+= o_names.c obj_dat.c obj_err.c obj_lib.c
+INCS+= objects.h obj_mac.h
# pem
SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_seal.c pem_sign.c
+INCS+= pem.h pem2.h
# pkcs7
SRCS+= pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c pk7_smime.c pkcs7err.c
+INCS+= pkcs7.h
# pkcs12
SRCS+= p12_add.c p12_attr.c p12_bags.c p12_crpt.c p12_crt.c p12_decr.c \
p12_init.c p12_key.c p12_kiss.c p12_lib.c p12_mac.c p12_mutl.c \
p12_npas.c p12_sbag.c p12_utl.c pk12err.c
+INCS+= pkcs12.h
# rand
SRCS+= md_rand.c rand_egd.c rand_err.c rand_lib.c rand_win.c randfile.c
+INCS+= rand.h
# rc2
SRCS+= rc2_cbc.c rc2cfb64.c rc2_ecb.c rc2ofb64.c rc2_skey.c
+INCS+= rc2.h
# rc4
SRCS+= rc4_skey.c
@@ -185,6 +212,7 @@
.else
SRCS+= rc4_enc.c
.endif
+INCS+= rc4.h
# rc5
SRCS+= rc5cfb64.c rc5_ecb.c rc5ofb64.c rc5_skey.c
@@ -193,41 +221,74 @@
.else
SRCS+= rc5_enc.c
.endif
+INCS+= rc5.h
# ripemd
SRCS+= rmd_dgst.c rmd_one.c
.if ${MACHINE_ARCH} == "i386"
SRCS+= rmd-586.s
.endif
+INCS+= ripemd.h
# rsa
.if defined(WITH_RSA) && ${WITH_RSA} == YES
SRCS+= rsa_chk.c rsa_eay.c rsa_err.c rsa_gen.c rsa_lib.c rsa_none.c \
rsa_null.c rsa_oaep.c rsa_pk1.c rsa_saos.c rsa_sign.c rsa_ssl.c
.endif
+INCS+= rsa.h
# sha
SRCS+= sha_dgst.c sha_one.c sha1_one.c sha1dgst.c
.if ${MACHINE_ARCH} == "i386"
SRCS+= sha1-586.s
.endif
+INCS+= sha.h
# stack
SRCS+= stack.c
+INCS+= safestack.h stack.h
# txt_db
SRCS+= txt_db.c
+INCS+= txt_db.h
# x509
SRCS+= by_dir.c by_file.c x509_att.c x509_cmp.c x509_d2.c x509_def.c \
x509_err.c x509_ext.c x509_lu.c x509_obj.c x509_r2x.c \
x509_req.c x509_set.c x509_trs.c x509_txt.c x509_v3.c \
x509_vfy.c x509name.c x509rset.c x509spki.c x509type.c x_all.c
+INCS+= x509.h x509_vfy.h
# x509v3
SRCS+= v3_akey.c v3_alt.c v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c \
v3_crld.c v3_enum.c v3_extku.c v3_genn.c v3_ia5.c v3_info.c \
v3_int.c v3_lib.c v3_pku.c v3_prn.c v3_purp.c v3_skey.c \
v3_sxnet.c v3_utl.c v3err.c
+INCS+= x509v3.h
+
+SRCS+= buildinf.h
+INCS+= opensslconf.h evp.h
+INCSDIR=${INCLUDEDIR}/openssl
+INCSLINKS= openssl/des.h ${INCLUDEDIR}/des.h
+
+CLEANFILES+= buildinf.h opensslconf.h evp.h
+
+buildinf.h:
+ ( echo "#ifndef MK1MF_BUILD"; \
+ echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
+ echo " #define CFLAGS \"$(CC)\""; \
+ echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
+ echo " #define DATE \"`LC_ALL=C date`\""; \
+ echo "#endif" ) > ${.TARGET}
+
+opensslconf.h: opensslconf-${MACHINE_ARCH}.h
+ cp ${.ALLSRC} ${.TARGET}
+
+evp.h: ${LCRYPTO_SRC}/evp/evp.h
+.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
+ sed '/^#ifndef NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC} > ${.TARGET}
+.else
+ cp ${.ALLSRC} ${.TARGET}
+.endif
POD1+= apps/CA.pl.pod apps/asn1parse.pod apps/ca.pod \
apps/ciphers.pod apps/crl.pod \
@@ -365,10 +426,6 @@
des_crypt.3 des_cbc_cksum.3 des_crypt.3 des_quad_cksum.3 \
des_crypt.3 des_enc_read.3 des_crypt.3 des_enc_write.3 \
des_crypt.3 des_set_odd_parity.3 des_crypt.3 des_is_weak_key.3
-
-INCS= ${HDRS} openssl/evp.h openssl/opensslconf.h
-INCSDIR= ${INCLUDEDIR}/openssl
-INCSLINKS= openssl/des.h ${INCLUDEDIR}/des.h
afterinstall:
.if !defined(NOPIC)
Index: libcrypto/Makefile.inc
===================================================================
RCS file: /home/ncvs/src/secure/lib/libcrypto/Makefile.inc,v
retrieving revision 1.27
diff -u -r1.27 Makefile.inc
--- libcrypto/Makefile.inc 20 Sep 2002 12:33:18 -0000 1.27
+++ libcrypto/Makefile.inc 20 Sep 2002 13:06:35 -0000
@@ -13,49 +13,3 @@
.endif
WITH_RSA?= YES
-
-HDRS+= asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \
- buffer/buffer.h cast/cast.h comp/comp.h conf/conf.h crypto.h \
- des/des.h dh/dh.h dsa/dsa.h ../e_os.h ../e_os2.h ebcdic.h \
- err/err.h hmac/hmac.h lhash/lhash.h md2/md2.h \
- md5/md5.h mdc2/mdc2.h objects/objects.h opensslv.h pem/pem.h \
- pem/pem2.h pkcs12/pkcs12.h pkcs7/pkcs7.h rand/rand.h rc2/rc2.h \
- rc4/rc4.h rc5/rc5.h ripemd/ripemd.h rsa/rsa.h stack/safestack.h \
- sha/sha.h stack/stack.h tmdiff.h txt_db/txt_db.h x509/x509.h \
- x509/x509_vfy.h x509v3/x509v3.h symhacks.h objects/obj_mac.h \
- md4/md4.h dso/dso.h conf/conf_api.h
-
-.if defined(MAKE_IDEA) && ${MAKE_IDEA} == YES
-HDRS+= idea/idea.h
-.endif
-
-SRCS+= buildinf.h openssl/opensslconf.h openssl/evp.h
-CLEANFILES+= buildinf.h openssl/opensslconf.h openssl/evp.h
-CLEANDIRS+= openssl
-
-buildinf.h:
- ( echo "#ifndef MK1MF_BUILD"; \
- echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
- echo " #define CFLAGS \"$(CC)\""; \
- echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
- echo " #define DATE \"`LC_ALL=C date`\""; \
- echo "#endif" ) > ${.TARGET}
-
-openssl/opensslconf.h: ../libcrypto/opensslconf-${MACHINE_ARCH}.h
- mkdir -p openssl
- cp ${.OODATE} ${.TARGET}
-
-openssl/evp.h: ${LCRYPTO_SRC}/evp/evp.h
- mkdir -p openssl
-.if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
- sed '/^#ifndef NO_IDEA$$/,/^#endif$$/d' ${.OODATE} > ${.TARGET}
-.else
- ${INSTALL} -C -m 444 ${.OODATE} ${.TARGET}
-.endif
-
-SRCS+= ${HDRS:T:S;^;openssl/;}
-.for h in ${HDRS:S/^/${LCRYPTO_SRC}\//}
-openssl/${h:T}: ${h}
- mkdir -p openssl
- ${INSTALL} -C -m 444 ${h} openssl
-.endfor
Index: libssl/Makefile
===================================================================
RCS file: /home/ncvs/src/secure/lib/libssl/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- libssl/Makefile 20 Sep 2002 12:33:19 -0000 1.13
+++ libssl/Makefile 20 Sep 2002 13:06:36 -0000
@@ -14,7 +14,6 @@
INCS= ssl.h ssl2.h ssl23.h ssl3.h tls1.h
INCSDIR=${INCLUDEDIR}/openssl
-HDRS= ${INCS:S;^;../ssl/;}
.include "../libcrypto/Makefile.inc"
%%%
Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE9i0XOUkv4P6juNwoRApM6AJkBO5rgP3t6Xoqc0fFYet/ASv1VqwCfYoNW
70CDWjneFU1R+bV40gIZpB0=
=vaTM
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020920155910.GA69658>
