--- shtool.pod 2003/02/11 13:00:50 1.63
+++ shtool.pod 2003/12/13 21:23:55 1.64
@@ -259,10 +259,9 @@
Apply sed(1) substitution operations.
-=item B<guessos>
+=item B<platform>
-Simple operating system and platform architecture guesser which
-determines a GNU I<platform-triple> style identification string.
+Determines platform identification information.
=item B<arx>
@@ -674,17 +673,130 @@
`find . -name Makefile -print`
make install
-=item B<guessos>
+=item B<platform> [B<-F>|B<--format> I<FORMAT>] [B<-S>|B<--sep> I<STRING>] [B<-C>|B<--conc> I<STRING>] [B<-L>|B<--lower>] [B<-U>|B<--upper>] [B<-v>|B<--verbose>] [B<-c>|B<--concise>] [B<-n>|B<--newline>] [B<-t>|B<--type> I<TYPE>] [B<-V>|B<--version>] [B<-h>|B<--help>]
-This command is a simple operating system and platform architecture guesser
-which determines a so-called ``GNU I<platform-triple>'' style identification
-string ``I<arch>-I<hardware>-I<os>I<osversion>''. For instance a FreeBSD 3.1
-running on a Pentium II is identified as ``C<i686-pc-freebsd3.1>''. When you
-need a more sophisticated platform guesser, use the GNU
-C<config.guess>/C<config.sub> scripts, please.
+This command privides Unix platform identifications. It distinguishes
+a platform according to its I<hardware architecture> and I<operating
+system>. For both there is a I<class>, I<product> and I<technology>
+identification. For each of those six identifications, there is a
+I<verbose>, I<regular> and I<concise> version.
+
+This leads to eighteen (2x3x3) available identification strings for each
+platform, from which usually 2 are chosen in a particular situation.
+This is done by assembling the platform identification string using a
+I<FORMAT> string containing one or more identification constructs of the
+forms "C<%[xx]>" (verbose), "C<%{xx}>" (regular) and "C<%E<lt>xxE<gt>>"
+(concise).
+
+Option B<-F> controls the output formatting of this command. It is a
+plain-text string with the "C<%>I<xx>" constructs which expand to the
+various platform information strings. "C<%{>I<xx>C<}>" is the canonical
+regular version of the information. "C<%[>I<xx>C<]>" is the verbose
+version of the information. "C<%E<lt>>I<xx>C<E<gt>>" is the concise
+version of the information. In total, the following constructs
+are available for expansion:
+
+ %[ac] verbose hardware architecture class
+ %{ac} regular hardware architecture class
+ %<ac> concise hardware architecture class
+ %[ap] verbose hardware architecture product
+ %{ap} regular hardware architecture product
+ %<ap> concise hardware architecture product
+ %[at] verbose hardware architecture technology
+ %{at} regular hardware architecture technology
+ %<at> concise hardware architecture technology
+ %[sc] verbose operating system class
+ %{sc} regular operating system class
+ %<sc> concise operating system class
+ %[sp] verbose operating system product
+ %{sp} regular operating system product
+ %<sp> concise operating system product
+ %[st] verbose operating system technology
+ %{st} regular operating system technology
+ %<st> concise operating system technology
+
+The default I<FORMAT> string is "C<%{sp} (%{ap})>", providing the
+regular operating system and hardware architecture product information.
+
+Option B<-S> sets the word I<separation> string for the platform
+information strings. By default it is "C< >" (whitespace). It is
+especially used for separating the operating system name and the
+operating system version. Option B<-C> sets the word I<concatenation>
+string for the platform information strings. By default it is "C</>".
+It is especially used to concatenate multiple parts in operating
+system name and version parts. Option B<-L> enforces conversion of the
+output to all I<lower> case. Option B<-U> enforces conversion of the
+output to all I<upper> case.
+
+Option B<-v> enforces verbose versions of all expansion constructs
+in I<FORMAT> string of option B<-F>. It is equal to specifying all
+expansion constructs as "C<%[>I<xx>C<]>". Option B<-c> enforces
+concise versions of all expansion constructs in I<FORMAT> string of
+option B<-F>. It is equal to specifying all expansion constructs as
+"C<%E<lt>>I<xx>C<E<gt>>". Option B<-n> omits the usual trailing newline
+character in the output.
+
+Option B<-t> is a meta option which internally sets options B<-F>,
+B<-S>, B<-C>, B<-L>, B<-U>, B<-v> or B<-c> according to I<TYPE>. It can
+be used to easily specify various commonly known outputs. The following
+I<TYPE>s are available:
+
+=over 4
+
+=item B<binary>
+
+Binary Package Id (OpenPKG RPM).
+This is equal to "C<-F '%<ap>-%<sp>' -L -S '' -C '+'>"
+and results in outputs like "C<ix86-freebsd4.9>" and "C<ix86-debian3.0>".
+
+=item B<build>
+
+Build-Time Checking (OpenPKG RPM).
+This is equal to "C<-F '%<at>-%<st>' -L -S '' -C '+'>"
+and results in outputs like "C<i686-freebsd4.9>" and "C<i586-linux2.4>".
+
+=item B<gnu>
+
+GNU F<config.guess> Style Id.
+This is similar to B<build> and is equal to "C<-F '"%<at>-unknown-%<st>' -L -S '' -C '+'>"
+and results in outputs like "C<i686-unknown-freebsd4.9>" and "C<i586-unknown-linux2.4>".
+
+=item B<web>
+
+HTTP Server Header Id.
+This is equal to "C<-F '"%<sp>-%<ac>' -S '/' -C '+'>"
+and results in outputs like "C<FreeBSD/4.9-iX86>" and "C<Debian/3.0-iX86>".
+
+=item B<summary>
+
+Human Readable Verbose Summary Information. This is equal to "C<-F
+'Class: %[sc] (%[ac])\nProduct: %[sp] (%[ap])\nTechnology: %[st]
+(%[at])' -S ' ' -C '/'>" and results in outputs like:
+
+ Class: 4.4BSD (iX86)
+ Product: FreeBSD 4.9-RC (iX86)
+ Technology: FreeBSD 4.9-RC (i686)
+
+and
+
+ Class: LSB (iX86)
+ Product: Debian GNU/Linux 3.0 (iX86)
+ Technology: GNU/Linux 2.2/2.4 (i686)
+
+=item B<all-in-one>
+
+All-In-One Full-Table Information. This just outputs really
+all 2x2x3 identification strings as a table.
+
+=back
+
+Option B<-V> outputs the version information of B<OSSP platform> only.
+Option B<-h> outputs the usage information of B<OSSP platform> only.
+
+Example:
# configure.in
- OS=`shtool guessos`
+ PLATFORM=`shtool platform --type=binary`
=item B<arx> [B<-t>|B<--trace>] [B<-C>|B<--command> I<cmd>] I<op> I<archive> I<file> [I<file> ...]
|