I'm working on a port which will have to download/use different files depending on which architecture is in use. For example, if the host system is 32-bit x86 I need to access file blob-32.tar.gz, but on 64-bit x86_64 I need to access blob-54.tar.gz.
I've been looking through the Porter's Handbook and performing separate tasks based on architecture doesn't appear to be covered. I suppose I could run
I've been looking through the Porter's Handbook and performing separate tasks based on architecture doesn't appear to be covered. I suppose I could run
uname
and grep
for the architecture, but that feels clumsy. Has anyone tackled this? In the Makefile I think I'm going to need something like:
Code:
if i386
work with file a
else if amd64
work with file b
else
echo arch not supported