Fossil SCM

Makefile fails to run uname with GNU Make 3.82

Open

5ad1d9a23ca5a84… · opened 14 years, 9 months ago

Type
Build_Problem
Priority
Severity
Important
Resolution
Open
Subsystem
Created
June 12, 2011 11:01 p.m.

When trying to build Fossil on Haiku (ticket 084eedc010), I run into a problem with the Makefile. The following syntaxes do not seem to be supported by GNU Make 3.82:

HOST_OS :sh = uname -s

and

HOST_OS = $(uname -s:sh)

The following does work (but breaks things for other make variants, I assume):

HOST_OS = $(shell uname -s)


ben added on 2011-06-13 15:28:00 UTC: I believe you've tried to edit the Makefile to add the changes in ticket [084eedc010].

Currently the only platforms which need these additions use BSD make, where this works. So currently it hasn't mattered that this doesn't work on platforms which use GNU make. Changes to work with GNU make break non-Linux platforms -- the current syntax works on as many as possible.

Given the project wants to avoid a configure step, it might be necessary to add a Makefile.haiku.


anonymous claiming to be brecht added on 2011-06-13 21:23:11 UTC: Perhaps the following offers a solution:


HOST_OS_CMD = uname -s
BSD_HOST_OS = $($(HOST_OS_CMD):sh)
GNU_HOST_OS = $(shell $(HOST_OS_CMD) )
HOST_OS = $(BSD_HOST_OS)$(GNU_HOST_OS)

It works for GNU Make, as BSD_HOST_OS will be empty. I'm hoping GNU_HOST_OS would be empty when using BSD Make.


steveb added on 2011-07-22 22:43:01 UTC: As of [c32b23d626] fossil builds on Haiku R1/Alpha 3 with ./configure; make




Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button