Page MenuHomeFreeBSD

share/mk/bsd.README: document bsd.links.mk
AbandonedPublic

Authored by ngie on Mar 7 2017, 8:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 28, 2:05 PM
Unknown Object (File)
Dec 20 2023, 1:46 AM
Unknown Object (File)
Nov 28 2023, 4:41 PM
Unknown Object (File)
Nov 6 2023, 5:05 AM
Unknown Object (File)
Nov 1 2023, 11:32 AM
Unknown Object (File)
Oct 31 2023, 9:58 PM
Unknown Object (File)
Oct 31 2023, 1:24 PM
Unknown Object (File)
Oct 30 2023, 9:26 PM

Details

Reviewers
bdrewery
Summary

share/mk/bsd.README: document bsd.links.mk

bsd.links.mk is included indirectly via other bsd.*.mk snippets (bsd.lib.mk
and bsd.prog.mk, so far today). Document its function, user-modifiable behavior,
the SYMLINKS variable, etc, and refer to it from bsd.lib.mk and bsd.prog.mk.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

Diff Detail

Event Timeline

ngie retitled this revision from to share/mk/bsd.README: document bsd.links.mk.
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie added subscribers: bapt, bdrewery, imp, rgrimes.
share/mk/bsd.README
531–533

MLINKS?

ngie marked an inline comment as done.
  • Reference MAN in bsd.lib.mk
  • Reference MLINKS in bsd.lib.mk/bsd.prog.mk.
  • Reference bsd.man.mk in bsd.lib.mk/bsd.prog.mk when discussing MAN/MLINKS.
  • Do some minimal variable name sorting in bsd.prog.mk with MAN vs LINKS and LINKS vs LIBADD, et al (this will be committed separately).
share/mk/bsd.README
577

${DESTDIR} should never appear in LINKS, this is added by the .mk files in the proper places.

584

${DESTDIR} should never appear in SYMLINKS=, this is added by the .mk files in the proper places

ngie marked 2 inline comments as done.Mar 7 2017, 5:40 PM
ngie added inline comments.
share/mk/bsd.README
577

Ugh, you're right. The other example I copy-pasted from was faulty.

584

I disagree. I'll note that either relative or absolute forms or allowed.

ngie marked 2 inline comments as done.

Distill diff down to LINKS/SYMLINKS documentation/changes

I will commit the MLINKS changes separately as they don't functionally fit under the same umbrella as documenting LINKS/SYMLINKS/bsd.links.mk.

ngie marked an inline comment as done.Mar 7 2017, 5:57 PM
bdrewery requested changes to this revision.Mar 7 2017, 7:42 PM
bdrewery added a reviewer: bdrewery.

I really don't like pointing people at .mk files to go figure out this stuff. This is the basic manual for the framework. The actual mk code is very foreign and hard to understand at first glance.

share/mk/bsd.README
316

This file is supposed to be an easy reference for developers. I would prefer not pointing them at many other files, especially ones where there is 0 documentation in them. I don't see why existing documentation is removed and replaced with none.

This revision now requires changes to proceed.Mar 7 2017, 7:42 PM

Why has some of this been commited??? If your going to commit before a review is done why bother with it?

share/mk/bsd.README
584

You can disagree but you will be wrong. You can prove this yourself with a simple find/xargs/grep, please take the time to do so.

589

Same issue. Are you confusing DESTDIR with BINDIR? No as then these strings would be
${DESTDIR}${BINDIR}/test.

The more normalized forms of these would actually be ${BINDIR}/${PROG} /path/to/alias

ngie marked 3 inline comments as done.Mar 8 2017, 4:56 AM

I really don't like pointing people at .mk files to go figure out this stuff. This is the basic manual for the framework. The actual mk code is very foreign and hard to understand at first glance.

Apologies for not being more straightforward. When I said, "See bsd.foo.mk for more details", I didn't mean that someone should open up their editor and look at bsd.foo.mk -- I meant, "See [the section that describes] bsd.foo.mk for more details". I can add that additional information to clarify that point (all the more reason in my mind why this file should probably be in some markup language that supports pointers).

My point in doing this is to do away with the duplication and have one source of truth. For example, instead of mentioning DPADD, LDADD, LIBADD, etc, two times, mention it once in detail where the variables are defined, refine any nuances for the variables if need be (say MAN for bsd.prog.mk defaulting to ${PROG}.1), and refer all consumers to the documentation that describes the variables to the master definition (in this case bsd.dep.mk).

share/mk/bsd.README
316

Please see my other comment along these lines. I meant to point to the section (below) that describes bsd.links.mk , not the file itself.

584

I overlooked the DESTDIR prefixing. You were right, my brain earlier today was wrong. I'll fix this.

589

Bleh, you're right--the target is prefixed with ${DESTDIR} automatically (I accidentally glossed over that fact):

25 .for s t in ${SYMLINKS}
26         @${ECHO} "${t} -> ${s}" ;\
27         ${INSTALL_SYMLINK} ${TAG_ARGS} ${s} ${DESTDIR}/${t}
28 .endfor

Thank you for finding that error.

ngie marked 5 inline comments as done.Mar 8 2017, 4:56 AM
ngie edited edge metadata.

Fix errors with SYMLINKS examples -- ${DESTDIR} is appended to target symlinks automatically.

Stupid brain

ngie marked 2 inline comments as done.Mar 8 2017, 5:01 AM

Why has some of this been commited??? If your going to commit before a review is done why bother with it?

Sorry.

Abandoning revision since I will not be working on the build system proper anymore, apart from test integration or any components that directly correlate with testing.