Tue Mar 13 08:53:06 2018 UTC ()
Revert the COMPAT_AS sestting back to library, the documented default.

It doesn't really matter, since we no longer build the library in any
format, but best to make the code match the comments.


(pgoyette)
diff -r1.23 -r1.23.2.1 src/sys/compat/common/Makefile.inc

cvs diff -r1.23 -r1.23.2.1 src/sys/compat/common/Attic/Makefile.inc (switch to unified diff)

--- src/sys/compat/common/Attic/Makefile.inc 2017/12/16 08:31:36 1.23
+++ src/sys/compat/common/Attic/Makefile.inc 2018/03/13 08:53:06 1.23.2.1
@@ -1,90 +1,90 @@ @@ -1,90 +1,90 @@
1# $NetBSD: Makefile.inc,v 1.23 2017/12/16 08:31:36 maxv Exp $ 1# $NetBSD: Makefile.inc,v 1.23.2.1 2018/03/13 08:53:06 pgoyette Exp $
2# 2#
3# Configuration variables (default values are below): 3# Configuration variables (default values are below):
4# 4#
5# S must be set to the top of the 'sys' tree. 5# S must be set to the top of the 'sys' tree.
6# COMPATDST 6# COMPATDST
7# may be set to the location of the directory where library 7# may be set to the location of the directory where library
8# objects are to be built. Defaults to ${.OBJDIR}/lib/compat. 8# objects are to be built. Defaults to ${.OBJDIR}/lib/compat.
9# COMPAT_AS 9# COMPAT_AS
10# may be set to 'obj' to build a object from the library's 10# may be set to 'obj' to build a object from the library's
11# object files. (Otherwise, a library will be built.) 11# object files. (Otherwise, a library will be built.)
12# Defaults to 'library'. 12# Defaults to 'library'.
13# COMPATMISCMAKEFLAGS 13# COMPATMISCMAKEFLAGS
14# Miscellaneous flags to be passed to the library's Makefile when 14# Miscellaneous flags to be passed to the library's Makefile when
15# building. See library's Makefile for more details about 15# building. See library's Makefile for more details about
16# supported flags and their default values. 16# supported flags and their default values.
17 17
18# Default values: 18# Default values:
19COMPATDST?= ${.OBJDIR}/lib/compat 19COMPATDST?= ${.OBJDIR}/lib/compat
20COMPAT_AS?= obj 20COMPAT_AS?= obj
21COMPATDOTDIR?= ../../. 21COMPATDOTDIR?= ../../.
22 22
23COMPATDIR= ${S:S@^.@${COMPATDOTDIR}@:Q}/compat/common 23COMPATDIR= ${S:S@^.@${COMPATDOTDIR}@:Q}/compat/common
24.if (${COMPAT_AS} == "obj") 24.if (${COMPAT_AS} == "library")
25COMPATLIB= ${COMPATDST}/libcompat.o 25COMPATLIB= ${COMPATDST}/libcompat.o
26COMPATLIB_PROF= ${COMPATDST}/libcompat.po 26COMPATLIB_PROF= ${COMPATDST}/libcompat.po
27.else 27.else
28COMPATLIB= ${COMPATDST}/libcompat.a 28COMPATLIB= ${COMPATDST}/libcompat.a
29COMPATLIB_PROF= ${COMPATDST}/libcompat_p.a 29COMPATLIB_PROF= ${COMPATDST}/libcompat_p.a
30.endif 30.endif
31 31
32LIBCOMPATLNBN= llib-lcompat.ln 32LIBCOMPATLNBN= llib-lcompat.ln
33COMPATLIBLN= ${COMPATDST}/${LIBCOMPATLNBN} 33COMPATLIBLN= ${COMPATDST}/${LIBCOMPATLNBN}
34 34
35COMPATMAKE= \ 35COMPATMAKE= \
36 cd ${COMPATDST} && ${MAKE} -f ${COMPATDIR:Q}/Makefile \ 36 cd ${COMPATDST} && ${MAKE} -f ${COMPATDIR:Q}/Makefile \
37 COMPATDIR=${COMPATDIR:Q} \ 37 COMPATDIR=${COMPATDIR:Q} \
38 CC=${CC:Q} CFLAGS=${CFLAGS:Q} \ 38 CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
39 AS=${AS:Q} AFLAGS=${AFLAGS:Q} \ 39 AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
40 AR=${AR:Q} NM=${NM:Q} \ 40 AR=${AR:Q} NM=${NM:Q} \
41 LORDER=${LORDER:Q} \ 41 LORDER=${LORDER:Q} \
42 TSORT=${TSORT:Q} \ 42 TSORT=${TSORT:Q} \
43 RANLIB=${RANLIB:Q} \ 43 RANLIB=${RANLIB:Q} \
44 LD=${LD:Q} LDFLAGS=${LDFLAGS:Q} \ 44 LD=${LD:Q} LDFLAGS=${LDFLAGS:Q} \
45 STRIP=${STRIP:Q} \ 45 STRIP=${STRIP:Q} \
46 MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \ 46 MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
47 COMPATCPPFLAGS=${CPPFLAGS:S@^-I.@-I${COMPATDOTDIR}@g:Q} \ 47 COMPATCPPFLAGS=${CPPFLAGS:S@^-I.@-I${COMPATDOTDIR}@g:Q} \
48 LINTFLAGS=${KERNLINTFLAGS:Q} \ 48 LINTFLAGS=${KERNLINTFLAGS:Q} \
49 ${COMPATMISCMAKEFLAGS} 49 ${COMPATMISCMAKEFLAGS}
50 50
51${COMPATLIB}: .NOTMAIN .MAKE __always_make_compatlib 51${COMPATLIB}: .NOTMAIN .MAKE __always_make_compatlib
52 @echo making sure the compat library is up to date... 52 @echo making sure the compat library is up to date...
53.if (${COMPAT_AS} == "library") 53.if (${COMPAT_AS} == "library")
54 @${COMPATMAKE} libcompat.a 54 @${COMPATMAKE} libcompat.a
55.else 55.else
56 @${COMPATMAKE} libcompat.o 56 @${COMPATMAKE} libcompat.o
57.endif 57.endif
58 58
59${COMPATLIB_PROF}: .NOTMAIN .MAKE __always_make_compatlib 59${COMPATLIB_PROF}: .NOTMAIN .MAKE __always_make_compatlib
60 @echo making sure the profiled compat library is up to date... 60 @echo making sure the profiled compat library is up to date...
61.if (${COMPAT_AS} == "library") 61.if (${COMPAT_AS} == "library")
62 @${COMPATMAKE} libcompat_p.a 62 @${COMPATMAKE} libcompat_p.a
63.else 63.else
64 @${COMPATMAKE} libcompat.po 64 @${COMPATMAKE} libcompat.po
65.endif 65.endif
66 66
67${COMPATLIBLN}: .NOTMAIN .MAKE __always_make_compatlib 67${COMPATLIBLN}: .NOTMAIN .MAKE __always_make_compatlib
68 @echo making sure the compat lint library is up to date... 68 @echo making sure the compat lint library is up to date...
69 @${COMPATMAKE} ${LIBCOMPATLNBN} 69 @${COMPATMAKE} ${LIBCOMPATLNBN}
70 70
71clean: .NOTMAIN cleancompatlib 71clean: .NOTMAIN cleancompatlib
72cleancompatlib: .NOTMAIN .MAKE __always_make_compatlib 72cleancompatlib: .NOTMAIN .MAKE __always_make_compatlib
73 @echo cleaning the compat library objects 73 @echo cleaning the compat library objects
74 @${COMPATMAKE} clean 74 @${COMPATMAKE} clean
75 75
76cleandir distclean: .NOTMAIN cleandircompatlib 76cleandir distclean: .NOTMAIN cleandircompatlib
77cleandircompatlib: .NOTMAIN .MAKE __always_make_compatlib 77cleandircompatlib: .NOTMAIN .MAKE __always_make_compatlib
78 @echo cleandiring the compat library objects 78 @echo cleandiring the compat library objects
79 @${COMPATMAKE} cleandir 79 @${COMPATMAKE} cleandir
80 80
81depend: .NOTMAIN dependcompatlib 81depend: .NOTMAIN dependcompatlib
82dependcompatlib: .NOTMAIN .MAKE __always_make_compatlib 82dependcompatlib: .NOTMAIN .MAKE __always_make_compatlib
83 @echo depending the compat library objects 83 @echo depending the compat library objects
84 @${COMPATMAKE} depend 84 @${COMPATMAKE} depend
85 85
86__always_make_compatlib: .NOTMAIN 86__always_make_compatlib: .NOTMAIN
87 @mkdir -p ${COMPATDST} 87 @mkdir -p ${COMPATDST}
88 88
89.PHONY: __always_make_compatlib 89.PHONY: __always_make_compatlib
90.PHONY: cleancompatlib cleandircompatlib dependcompatlib 90.PHONY: cleancompatlib cleandircompatlib dependcompatlib