I am 100% in support of that notion. That'd make my Makefile
restructuring experiment much more streamlined. That, and requiring
GNU make instead of supporting both GNU make and bsdmake syntax, from
the point of view of using included sub-Makefiles. (Says me talking
the FreeBSD 9.1 user. ;-)

Mike


On Tue, Jul 1, 2014 at 12:42 PM, Ben Laurie <b...@links.org> wrote:
> On 1 July 2014 17:21, Mike Bland <mbl...@acm.org> wrote:
>> Ah! Sorry for the spam, but I think I got it. According to the
>> makedepend man page:
>>
>> http://www.x.org/archive/current/doc/man/man1/makedepend.1.xhtml
>>
>> Makedepend makes assumptions about the #includes for files appearing
>> later on the command line:
>>
>> "But when the program parses file2.c and discovers that it, too,
>> includes header.h, it does not parse the file, but simply adds
>> header.h, def1.h anddef2.h to the list of dependencies for file2.o."
>>
>> Long story short, I narrowed it down to apps/req.c and apps/gendh.c
>> both #ifdef/undeffing OPENSSL_NO_DEPRECATED. Execute the command with
>> those two files removed, and dh.h disappears from dsa.o's deps.
>>
>> dsaparam.c, genrsa.c, and s_server.c also have this #undef, but coming
>> later on the command line than dsa.c, they don't trigger makedepend to
>> generate the dh.h include for dsa.o. Put them before dsa.c, and they
>> do.
>
> Aha! Well done.
>
> I suspect there's not really any reason to support makedepend anymore
> - should perhaps just switch to always using gcc/clang for
> dependencies?
>
>>
>> Mike
>>
>>
>> On Tue, Jul 1, 2014 at 11:59 AM, Mike Bland <mbl...@acm.org> wrote:
>>> Whoops, of course, I meant it generates the same output for dsa.o, and
>>> only dsa.o.
>>>
>>> Mike
>>>
>>> On Tue, Jul 1, 2014 at 11:58 AM, Mike Bland <mbl...@acm.org> wrote:
>>>> Investigating... It seems to be an issue with the makedepend tool itself.
>>>>
>>>> I hacked util/domd to show the makedepend command line, and got this
>>>> command for apps/:
>>>>
>>>> makedepend -D OPENSSL_DOING_MAKEDEPEND -- -O -I..  -I../include
>>>> -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_EC_NISTP_64_GCC_128
>>>> -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5
>>>> -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE
>>>> -DOPENSSL_NO_STORE -- openssl.c verify.c asn1pars.c req.c dgst.c dh.c
>>>> enc.c passwd.c gendh.c errstr.c ca.c pkcs7.c crl2p7.c crl.c rsa.c
>>>> rsautl.c dsa.c dsaparam.c ec.c ecparam.c x509.c genrsa.c gendsa.c
>>>> genpkey.c s_server.c s_client.c speed.c s_time.c apps.c s_cb.c
>>>> s_socket.c app_rand.c version.c sess_id.c ciphers.c nseq.c pkcs12.c
>>>> pkcs8.c pkey.c pkeyparam.c pkeyutl.c spkac.c smime.c cms.c rand.c
>>>> engine.c ocsp.c prime.c ts.c srp.c
>>>>
>>>> Running that through util/clean-depend.pl produces the existing
>>>> makedepend output. But just running this:
>>>>
>>>> makedepend -D OPENSSL_DOING_MAKEDEPEND -- -O -I..  -I../include
>>>> -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_EC_NISTP_64_GCC_128
>>>> -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5
>>>> -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE
>>>> -DOPENSSL_NO_STORE -- dsa.c
>>>>
>>>> Produces the same output except *without* ../include/openssl/dh.h. (I
>>>> presume you meant dh.h, not dh.o earlier.)
>>>>
>>>> Of course, with your GitConfigure/GitMake scripts, you're using the
>>>> compiler to regenerate dsa.d in isolation from other files.
>>>>
>>>> I'll see if I can dig up a little more info here...but it does seem
>>>> that your normal flags are doing the right thing.
>>>>
>>>> Mike
>>>>
>>>>
>>>>
>>>> On Tue, Jul 1, 2014 at 5:38 AM, Ben Laurie <b...@links.org> wrote:
>>>>> I've been trying to figure out why my "make depend" differs from other
>>>>> developers, and why it appears to be wrong.
>>>>>
>>>>> For example, apps/dsa.o depends, according to makedepend, on dh.o, but
>>>>> with the standard developer flags ($gcc_devteam_warn) it should not.
>>>>>
>>>>> AFAICS, makedepend gets passed the right flags, and normally processes
>>>>> #ifndef lines correctly.
>>>>>
>>>>> Anyone got any clues what's going on? (I'm on FreeBSD 9.1)
>>>>> ______________________________________________________________________
>>>>> OpenSSL Project                                 http://www.openssl.org
>>>>> Development Mailing List                       openssl-dev@openssl.org
>>>>> Automated List Manager                           majord...@openssl.org
>> ______________________________________________________________________
>> OpenSSL Project                                 http://www.openssl.org
>> Development Mailing List                       openssl-dev@openssl.org
>> Automated List Manager                           majord...@openssl.org
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       openssl-dev@openssl.org
> Automated List Manager                           majord...@openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to