From ed403545fc0bcedd5497daf4b20d72ceb7d878b9 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 2 Mar 2003 02:51:40 +0000 Subject: [PATCH] Also allow and document a "build" ordering for variables. Both "product" and "build" ordering are rampant in /usr/src. This document is not indented to be as strict as style(9) as historically BSD hasn't been as consistent about Makefile as C code. Also there are too many variations, exceptions and allowances in out existing Makefile style to be strict. However there is a general level of consensus on what the general BSD style of our Makefiles is. This manpage documents that "smell". --- share/man/man5/style.Makefile.5 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index 428f6f6478d6..60292d0dd887 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -64,7 +64,12 @@ Special variables (i.e., etc.) are listed in order of .Dq product , then building and installing a binary. -The general order is: +It is also allowable to list special variables in +.Dq build +order: i.e., ones for the primary program (or library) first. +The general +.Dq product +order is: .Va PROG Ns / Ns Va LIB Ns / Ns Va SCRIPT .Va FILES .Va LINKS @@ -76,6 +81,20 @@ The general order is: .Va CFLAGS .Va DPADD .Va LDADD . +The general +.Dq build +order is: +.Va PROG Ns / Ns Va LIB Ns / Ns Va SCRIPT +.Va SRCS +.Va WARNS +.Va CFLAGS +.Va DPADD +.Va LDADD +.Va INCS +.Va FILES +.Va LINKS +.Oo Va NO Oc Ns Va MAN +.Va MLINKS. .It Omit .Va SRCS