Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!whuxl!whuxlm!akgua!gatech!seismo!brl-adm!brl-smoke!smoke!jon@csvax.caltech.edu From: jon@csvax.caltech.edu Newsgroups: net.unix-wizards Subject: Making makefiles portable Message-ID: <106@brl-smoke.ARPA> Date: Fri, 18-Apr-86 01:10:42 EST Article-I.D.: brl-smok.106 Posted: Fri Apr 18 01:10:42 1986 Date-Received: Mon, 21-Apr-86 02:09:50 EST Sender: news@brl-smoke.ARPA Lines: 22 Does anyone have suggestions on producing makefiles which are portable between BSD and Sys{III,V}? I am stuggling with this due to our recent acquisition of some Sys V machines. The most obvious problems I have found are: use of MFLAGS in BSD as opposed to MAKEFLAGS different options accepted by lint, cc, etc. need to define SHELL= or SHELL=/bin/sh to Sys V make (if the environment variable SHELL is not sh) in order to get sh constructs in make targets to work The obvious approach is to put #ifdefs in makefiles just like in C code and run makefiles through cpp, but this is inelegant (especially to the person who receives a copy of your code and just wants to type 'make'). In addition, there's no guarantee cpp will be available everywhere (say if the functionality is built into the C compiler). Jon Leech (jon@csvax.caltech.edu || ...seismo!cit-vax!jon) Caltech Computer Science Graphics Group __@/