Why do we have @ in modules builds?

Warner Losh imp at bsdimp.com
Mon Nov 3 20:14:29 UTC 2014


On Nov 3, 2014, at 12:29 PM, Alfred Perlstein <alfred at freebsd.org> wrote:

> 
> On 11/3/14, 11:22 AM, Warner Losh wrote:
>> On Nov 3, 2014, at 12:09 PM, Alfred Perlstein <alfred at freebsd.org> wrote:
>> 
>>> On 11/3/14, 8:48 AM, Warner Losh wrote:
>>>> Does anybody recall why we have @ symlink in our module builds?
>>>> I’m constantly working around issues that this creates. Maybe it is time
>>>> to eliminate it?
>>>> 
>>>> So I’ve posted the following review: https://reviews.freebsd.org/D1100
>>>> 
>>>> Warner
>>>> 
>>> Thank you!!!!  I hate the '@' thing as well, I figured it was just due to someone not wanting 'grep -r' to work. :)
>>> 
>>> Just to check, after your changes... will you still be able to do something like:
>>> 
>>> cd $HOME
>>> svn co https://.../base/head/sys/modules/foo_module
>>> cd foo_module
>>> make depend all install
>> It should behave the same it does today. I’m replacing a ln -s ${SYSDIR} @ with an in-line replacement of @ with ${SYSDIR}.
> Excellent!
> 
> I did a history check to see why these came to be and it looks like it was just an oversight to use "@ links" instead of just SYSDIR as far as I can tell...

Back in the deep, dark past of FreeBSD’s build system:

>Revision 32813 - Mon Jan 26 20:36:38 1998 UTC (16 years, 9 months ago) by bde 
>
>Generate symlinks to the "sys" and <machine> directories and put
>them in the include path.  This fixes recent breakage of the syscons
>LKMs and general brokenness of the include paths (headers under
>/usr/include were used in many cases).

it was introduced. This is still in the lkm era. This pre-dates SYSDIR being
meaningful. That had to wait until:

>Revision 59097 - Sat Apr 8 17:20:00 2000 UTC (14 years, 6 months ago) by imp 
>Add support for compiling kernel modules outside of the tree.  If you
>do not have the kernel you wish to compile against in either
>/usr/src/sys or /sys, then you will need to set SYSDIR to point to the
>sys directory of the source tree that contians the source.
>
>Also, minor tweaks to the load/unload targets from Bruce.
>
>I've had this through several make worlds, as well as using it on a
>daily basis for the past couple of weeks to build modules needed for
>testing at Timing Solutions.
>
>Reviewed and revised by: bde
>Work sponsored by: Timing Solutions

so I’m only 14 years tardy in “finishing” this change set :)

Warner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20141103/48448bce/attachment.sig>


More information about the freebsd-arch mailing list