STAR_PLATFORM_SOURCES(target-file-list, platform-list)
Generate the given target-file for each of the files in
the list TARGET-FILE-LIST
, by selecting the
appropriate element of the PLATFORM-LIST
based on the value of AC_CANONICAL_BUILD
.
Both lists are space-separated lists.
For each of the platforms, <p>
, in
platform-list, there should be a file
<target-file><p>
. There should
always be a file <target-file>default
,
and if none of the platform-list strings matches, this is
the file which is used. If the `default' file is listed
in the `platform-list', then it is matched in the normal
run of things; if it is not listed, it still matches, but
a warning is issued.
If you wish no match not to be an error --
perhaps because there is a platform-dependent file which
is redundant on unlisted platforms -- then end the
platform-list with NONE
. In this case, if no
file matches, then no link is made, with no error or
warning.
This macro uses the results of ./config.guess to
determine the current platform. That returns a triple
consisting of cpu-vendor-os, such as
`i686-pc-linux-gnu
' (OS=linux-gnu),
`sparc-sun-solaris2.9
', or
`alphaev6-dec-osf5.1
'.
The extensions <p>
in platform-list
should all have the form `cpu_vendor[_os]
',
where each of the components `cpu', `vendor' and `os' may
be blank. If not blank, they are matched as a prefix of
the corresponding part of the config.guess value. Thus
`_sun_solaris
' would match
`sparc-sun-solaris2.9
' but not
`sparc-sun-sunos
', and `_sun
'
would match both. For a <target-file>
file foo.c, this would result in `ln -s foo.c_sun
foo.c
'.
Calls AC_LIBSOURCE
for each of the implied
platform-specific files.