Date: Sun, 31 Oct 2010 18:52:32 +0700 From: =?UTF-8?B?IkMuIEJlcmdzdHLDtm0i?= <cbergstrom@pathscale.com> To: David DEMELIER <demelier.david@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Portable Makefile(s) Message-ID: <4CCD5880.3000102@pathscale.com> In-Reply-To: <AANLkTikJ-JAr9UrpooE=_XaXHdX%2ByTup75h9whmF52U5@mail.gmail.com> References: <AANLkTikJ-JAr9UrpooE=_XaXHdX%2ByTup75h9whmF52U5@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
David DEMELIER wrote: > Hello, > > I'm working on many projects, and writing makefile is really painful. > I love the BSD Makefile syntax obviously, but I also love that people > using Linux could run make to build my projects too. And using BSD > makefile syntax disallow this. > > Reducing the makefile to the minimal makes them portable, but then you > canno't use loops, conditionnals, and this is getting my nerves. > > What could I do to write Makefile compatible on every operating > systems ? I'm thinking about Cmake but I hate the syntax, also for > dmake... > We had this same choice at our company and ended up going wiht cmake for everything. In the end you'll save time and get portability across all platforms and build environments. Don't really think of cmake as a makefile replacement, but a replacement for auto* tools and makefiles together. (cmake generates platform native makefiles) If you do go with cmake don't try to support older versions though. Anything 2.8.1+ is really quite solid from my experience.. /* no I don't work for kitware */ good luck ./C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CCD5880.3000102>