* Makefile: Simply have GCC #include the needed file -- the current unionfs build system doesn't do any dependency tracking for header files anyway. --- Hello!
On Sun, Jun 07, 2009 at 02:00:49PM +0200, Samuel Thibault wrote: > Samuel Thibault, le Sun 07 Jun 2009 13:53:37 +0200, a écrit : > > Sergiu Ivanov, le Sun 07 Jun 2009 13:30:12 +0300, a écrit : > > > * Makefile: Define $prefix to be /usr if the user does not > > > provide and override. > > > > Errr, no, the GNU system uses an empty prefix by default. > > (yes, the Debian GNU/Hurd system uses /usr as prefix by default, but > that's not GNU). ... and the GNU Coding Standards mandate /usr/local as default, see <http://www.gnu.org/prep/standards/html_node/Directory-Variables.html>. So let's do that: then both Debian GNU/Hurd and GNU system users have their share on specifying prefix when building ;-). Oh wait. This $(prefix) variable isn't even used for installing, but for locating a build-time header file. Hmpf. On Sun, Jun 07, 2009 at 01:30:12PM +0300, Sergiu Ivanov wrote: > +# Provide a default prefix if the user hasn't defined one. > +ifeq ($(strip $(prefix)),) > +prefix=/usr > +endif This ifeq is non-functional: you can always invoke make like ``make prefix=/usr'' to override $(prefix) even when the Makefile unconditionally defines ``prefix = whatever''. To finally bring this to an end, I propose the following. Can you please confirm that it works for you? Regards, Thomas --- Makefile | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b180072..e6d907d 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ # Hurd unionfs -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# # Written by Jeroen Dekkers <jer...@dekkers.cx>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or * +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -58,11 +60,11 @@ $(mig-sheader-prefix)%_S.h %Server.c: %.sdefsi -sheader $(mig-sheader-prefix)$*_S.h -server $*Server.c \ -user /dev/null -header /dev/null < $< -%.sdefsi: %.defs - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*-MIGSFLAGS) -DSERVERPREFIX=S_ $< -o $@ - -vpath %.defs $(prefix)/include/hurd - +%.sdefsi: + echo '#include <hurd/$*.defs>' | \ + $(CPP) \ + $(CPPFLAGS) $(MIGSFLAGS) $($*-MIGSFLAGS) -DSERVERPREFIX=S_ \ + -x c - -o $@ all: unionfs -- 1.6.0.4