Hi Vadim,

Vadim Zhukov wrote on Mon, Oct 05, 2015 at 09:07:41PM +0300:
> 2015-09-26 21:49 GMT+03:00 Michael Reed <[email protected]>:

>> The `clean' target takes optional arguments, so denote that in
>> the item header.  Additionally, the subtargets are fixed strings,
>> not variables, so change the use of Va to Cm to reflect that.

> Well, technically "clean=" is not a target, but a hack that looks
> like a parametrized target.

I don't think it would be a good idea to explain that technicality.
Probably, the reader is best served by hiding it as well as we can.
The patch below does that by spelling out all the pseudotargets in
full in order to discuss the idiosyncratic syntax as little as
possible.

The possibility to combine becomes clear by example, as seen in
the explanations of "all" and "packages".

> As a result, the ordering in the following
> cases will differ, and that matters:
> 
> make package clean
> make package clean=work

Explaining that would seem even more confusing.  I feel that it was
a mistake to introduce this hack in the first place.  It probably
would have been better to manually define individual targets
clean-all, clean-bulk, clean-build, and so on, but that's a different
matter; now we have to document the existing stuff.

> Even worse, the wording is confusing, because the term "subtarget" is
> used in other parts of this manual page with a different semantics.

Sure, the word "subtarget" should be avoided.  The patch below gets
away with not introducing any term at all.

> Can't comment on mdoc macro choosing, sorry.

Michael is right that .Va is the wrong macro here and .Cm is the
best one available.

OK?
  Ingo


Index: bsd.port.mk.5
===================================================================
RCS file: /cvs/src/share/man/man5/bsd.port.mk.5,v
retrieving revision 1.426
diff -u -p -r1.426 bsd.port.mk.5
--- bsd.port.mk.5       23 Sep 2015 01:38:36 -0000      1.426
+++ bsd.port.mk.5       12 Oct 2015 02:24:48 -0000
@@ -179,52 +179,44 @@ main archive site in the case of a check
 .Ev NO_CHECKSUM
 can be used to avoid all checksumming steps.
 .It Cm clean
-Clean ports contents.
-By default, it will clean the work directory.
-It can be invoked as
-make clean='[depends build bulk work fake flavors dist install sub package
-packages plist]'.
-.Bl -tag -width packages
-.It Va work
-Clean work directory.
-.It Va bulk
+Shorthand for
+.Cm clean Ns = Ns Cm work .
+.It Cm clean Ns = Ns Cm all
+Shorthand for
+.Cm clean Ns = Ap Cm work flavors packages plist Ap .
+.It Cm clean Ns = Ns Cm bulk
 Clean bulk cookie.
-.It Va build
+.It Cm clean Ns = Ns Cm build
 Clean the
 .Va WRKBUILD
 directory (only useful if
 .Va SEPARATE_BUILD
 is set).
-.It Va depends
+.It Cm clean Ns = Ns Cm depends No or Cm clean-depends
 Recurse into dependencies.
-.It Va dist
+.It Cm clean Ns = Ns Cm dist
 Clean distribution files.
-.It Va fake
+.It Cm clean Ns = Ns Cm fake
 Clean fake installation directory.
-.It Va flavors
+.It Cm clean Ns = Ns Cm flavors
 Clean all work directories.
-.It Va install
+.It Cm clean Ns = Ns Cm install
 Uninstall package.
-.It Va package
-Remove all copies of package file.
-.It Va plist
+.It Cm clean Ns = Ns Cm package
+Remove all copies of package files.
+.It Cm clean Ns = Ns Cm packages
+Shorthand for
+.Cm clean Ns = Ap Cm sub package Ap .
+.It Cm clean Ns = Ns Cm plist
 Remove registered packing lists of all subpackages.
-.It Va sub
+.It Cm clean Ns = Ns Cm sub
 With
-.Va install
+.Cm install
 or
-.Va package ,
+.Cm package ,
 clean subpackages as well.
-.It Va packages
-Shorthand for
-.Sq sub package .
-.It Va all
-Shorthand for
-.Sq work flavors packages plist .
-.El
-.It Cm clean-depends
-Shorthand for
-.Ql make clean=depends .
+.It Cm clean Ns = Ns Cm work
+Clean work directory.
 .It Cm configure
 Configure the port.
 Might be a void operation.

Reply via email to