MAKEFILE(1)
🎀 MAKEFILE(1) 🎀
okay so bestie, real talk: this page is filed as a manual page but it's literally a BSD make fragment 💀 like, no .Sh NAME, no flags, no exit statuses — just vibes and a build recipe. It lives in the NetBSD source tree, revision 1.1, dated 2013/02/19, timestamped 06:04:44, checked in by jmmv. Keep that energy in mind for the whole read. 🫶
It's the makefile that handles the kyua-tester.1 man page for the kyua-testers package — generating it from a .in template and then cleaning it up afterwards. Short file, big main character energy. 👑
✨ THE WHOLE FILE, NO EDITS ✨
here it is, absolutely untouched, every character where it belongs — including the fancy ones (more on those below, iykyk) 🙈
SRCDIR= ${NETBSDSRCDIR}/external/bsd/kyua‐testers/dist
MAN= kyua‐tester.1
CLEANFILES+= kyua‐tester.1 kyua‐tester.1: kyua‐tester.1.in
sed ‐e ’s,__PACKAGE__,kyua‐testers,g’ ‐e
’s,__TMPDIR__,/tmp,g’ <${.ALLSRC} >${.TARGET}.tmp
mv ${.TARGET}.tmp ${.TARGET}
that's it. that's the whole page. four-ish lines and a recipe. iconic behaviour honestly 🌸
💅 LINE BY LINE, BESTIE 💅
SRCDIR= ${NETBSDSRCDIR}/external/bsd/kyua‐testers/dist— setsSRCDIRto the dist directory ofkyua-testers, built out of${NETBSDSRCDIR}plus/external/bsd/kyua‐testers/dist. the spaces after the=are just there to make the assignments line up pretty. we respect a well-aligned block ✨MAN= kyua‐tester.1— declareskyua-tester.1in theMANvariable. that's the man page this whole file is about. starring role, no notes 💖CLEANFILES+= kyua‐tester.1— appendskyua-tester.1toCLEANFILES(note the+=, not=, bestie — that's the append, don't come for me). in the source it sits right next to the dependency line below it, so I'm keeping them together exactly like the original does 🎀kyua‐tester.1: kyua‐tester.1.in— the targetkyua-tester.1, and it depends onkyua-tester.1.in. template in, real man page out. that's the whole plot 🌈sed ‐e ’s,__PACKAGE__,kyua‐testers,g’ ‐e— firstsedpass: swaps__PACKAGE__forkyua-testers, with thegflag so every match gets it, and-eso we're stacking script expressions. note the curly quote’where you'd expect a straight'— it's styled, ok? 🦋’s,__TMPDIR__,/tmp,g’ <${.ALLSRC} >${.TARGET}.tmp— second-eexpression: swaps__TMPDIR__for/tmp. input comes from${.ALLSRC}, output goes to${.TARGET}.tmp. always a temp file first, we're not animals 🔥mv ${.TARGET}.tmp ${.TARGET}— thenmvthe temp file onto the real${.TARGET}. rename it into place, done. slay 💅
⚠️ tiny but real heads-up: the hyphens inkyua‐tester/kyua‐testersand the quotes around thosesedexpressions are not plain ASCII — they're U+2010 hyphens and’curly quotes. if you retype this by hand with regular-and', you're not reproducing the file. copy, don't retype. 🙈
🌸 THE RECIPE, IN ORDER 🌸
if you're the type who needs the steps spelled out (same info, just sequenced):
- run
sedon${.ALLSRC}with two-eexpressions —__PACKAGE__→kyua-testersand__TMPDIR__→/tmp— writing to${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET}— move the temp file into place
no more, no less. that's the tea. 🍓
🧚 A LITTLE NOTE ON THE SHAPE 🧚
lowkey the source as given has the CLEANFILES+= bit and the kyua‐tester.1: dependency sitting on the same line, and the sed invocation spilling across a line break that starts mid-quote. I'm not "fixing" any of that — that's exactly how it's written here, and that's how you're getting it. my job is vibes + zero data loss, not reformatting your makefiles 🫶
so yeah bestie — this is the entireMAKEFILE(1)page: a dist dir, aMANentry, aCLEANFILESappend, a dependency on the.intemplate, twosedsubstitutions, and anmv. small file, fully committed. periodt. 👑
and that's the wrap 🎀 straight out of the NetBSD tree, revision 1.1, dated 2013/02/19, timestamp 06:04:44, courtesy of jmmv — go give that makefile a little kiss for me, mwah 💖✨
📦 where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms