Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Mar 2011 12:44:35 +0000
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        freebsd-questions@freebsd.org
Subject:   GNU make doesn't understand .for? suffix rules obsolete?
Message-ID:  <20110302124434.GA39861@mech-cluster241.men.bris.ac.uk>

Next in thread | Raw E-Mail | Index | Archive | Help
I just discovered that my FreeBSD Makefile
fails miserably on a linux system with
GNU Make 3.80.

In particular I was surprised
to find out that GNU make considers
suffix rules obsolete:
http://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html#Suffix-Rules

I didn't think the suffix rules are
obsolete in BSD make, are they?

The GNU replacement for suffix rules
are "pattern rules". Now these don't
seem to be supported by BSD make, are they?

Also, since ".for .endfor"
construct doesn't seem to be supported
by GNU make (please confirm or correct if I'm wrong),
what is an alternative in GNU make?

My aim, of course, is to have
a makefile, which would work
on both GNU and BSD make.
The project is comparatively simple,
just a collection of fortran files,
which need to be compiled and several
executables need to be linked
against a number of libraries.


Many thanks
Anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20110302124434.GA39861>