Portable makefile features.

Charles Noren noren at dinl.uucp
Fri May 4 00:51:24 AEST 1990


We've been cleaning up our application and generalizing
our makefile on a Sun 3 (with SunOS 4.0.3).  I'm wondering
about the use of certain Sun makefile features that may
not be portable to other target architectures, such as
Concurrent Systems, Silicon Graphics, VAX ULTRIX, etc..
Some of the Sun makefile features are found in the GNU
version of make (available from the Free Software Foundation)
and derived from AT&T System-V.3 of make.  I don't have
either version of make around so I don't know what features
come from where and what are Sun only features.

Given all my uncertainties about make, I'm posting a survey
that I will post the results of in 2-3 weeks.  I'm also asking
what nice portable features of make you use that make life
easier for you.  An example of a nice feature would be automatic
dependency generation of all the include files via cpp(1) or
using the Sun .KEEPSTATE target.

BTW, an interesting article on make can be found in
SunExpert Magazine, April 1990.

---------------------------------------------------------------
SURVEY

The Make Feature list is incomplete.  Please add features
as you are aware of them, and the machine and OS you are commenting
about.  Comment only what you are aware of.

Make Feature      GNU Make   AT&T Make  Sun  VAX  Others (Specify)
------------      --------   ---------  ---  ---  ----------------

MAKEFLAGS envir                         yes
variable.

"makefile" priority                     yes
over "Makefile"

"default.mk" read                       yes
automatically by
make

Master default                          yes
make in
usr/include/make/default.mk

Importing                               yes
variables from
environment

Exporting                               yes
variables to
environment

include filename                        yes

% pattern matching                      yes
wildcard

Conditional macro                       yes
assignment

Suffix replacement                      yes
macro references

Pattern replacement                     yes
macro references

Macro append +=                         yes

"Shell macros"                          
MACRO:sh                                yes
$(MACRO:sh)                             yes

Special macros:
MAKE                                    yes
SHELL                                   yes
HOST_ARCH                               yes
TARGET_ARCH                             yes
HOST_MACH                               yes
TARGET_MACH                             yes

Special Function
targets:
.DEFAULT:                               yes
.DONE:                                  yes
.FAILED:                                yes
.IGNORE:                                yes
.INIT:                                  yes
.KEEP_STATE:                            yes
.MAKE_VERSION:                          yes
.PRECIOUS:                              yes
.SCCS_GET:                              yes
.SILENT:                                yes
.SUFFIXES:                              yes

Implicit Suffix                         yes
Rule (eg, .c.o:)

Pattern Matching                        yes
Rule (tp%ts: dp%ds)

Library Maintenance                     yes
lib(member ...)

cpp(1) list of                          yes
dependencies
cpp -M
---------------------------------------------------------------

-- 
Chuck Noren
NET:     ncar!dinl!noren
US-MAIL: Martin Marietta I&CS, MS XL8058, P.O. Box 1260,
         Denver, CO 80201-1260
Phone:   (303) 971-7930



More information about the Comp.unix.questions mailing list