Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2000 23:05:03 +0200
From:      Samuel Tardieu <sam@inf.enst.fr>
To:        freebsd-hackers@freebsd.org
Subject:   make question
Message-ID:  <2000-05-12-23-05-04%2Btrackit%2Bsam@inf.enst.fr>

next in thread | raw e-mail | index | archive | help
I am having difficulties to implement the following rule in BSD make: to
produce file foobar.o, then start from foobar.adb if it exists, foobar.ads
otherwise. I want this to be compatible with both BSD and GNU make.

I tried:

.SUFFIXES: .adb .ads .lo

.adb.lo:
	<command>

.ads.lo:
	<command>

but make prefers the .ads.lo rule instead of the .adb.lo, despites the
order in the .SUFFIXES. Using "make -d s" to trace dependencies and rules,
I get:

SuffFindDeps (broca-exceptions.lo)
        trying broca-exceptions.S...not there
        trying broca-exceptions.adb...got it
        using existing source broca-exceptions.ads
        applying .ads -> .lo to "broca-exceptions.lo"

broca-exceptions.adb has been found and should have been used, but
this "using existing source" message (coming after!) bugs me. The wrong
rule is then being selected.

Any hint of where it can come from?



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2000-05-12-23-05-04%2Btrackit%2Bsam>