On 2011-05-12, Christopher Zimmermann <madro...@zakweb.de> wrote:
> ok, I think now I've finally got it the right and nice way.

great :)

> Just last little question:
>
> how do I make the 'amd64-unknown-openbsd4.9' part architecture
> independent?
..
> Just to test this I build a small Makefile:
>
> MACH!=                uname -m
> OSRELEASE!=     uname -r
> HOSTDESCR=      "$(MACHINE)-unknown-openbsd$(OSRELEASE)"

> now, is this the right way to do this? Does it make any difference
> whether I use uname, MACHINE, MACHINE_ARCH or MACHINE_CPU to obtain the
> 'i386'? Is using uname the right way for getting the 4.9? And last but
> not least, will I get problems with the middle part 'unknown'?

lang/gcc/Makefile.inc has this snippet;
CONFIG=${MACHINE_ARCH}-unknown-openbsd${OSREV}

CONFIG isn't available directly to pdftk because it's in Makefile.inc
rather than the gcc module, but I think it's best to use the exact
same method to build the path.

In general, != should be avoided in ports, because it means a shell gets
executed every time make handles that Makefile (including for "non active"
things like dump-vars). unknown should be fine because the gcc port relies
on this too. the "machine" in this case is the application architecture
(as shown by machine -a or arch -s). on i386/amd64 this makes no
difference but on some arch it does:

$ shmux -Qc "arch -s; uname -m" mala kaffir 
  mala: powerpc
  mala: macppc
kaffir: arm
kaffir: armish

Reply via email to