bsd.dep.mk: Remove AINC knob
authorJohn Marino <draco@marino.st>
Sat, 27 Oct 2012 12:44:36 +0000 (14:44 +0200)
committerJohn Marino <draco@marino.st>
Sat, 27 Oct 2012 15:51:00 +0000 (17:51 +0200)
The AINC knob was removed from FreeBSD before DragonFly 1.0 was released.
It's not needed, so remove it to simplify bsd.dep.mk dependency makefile.
While here, convert SRCS and CLEANFILES to the new += method of augmenting
variables.

lib/libc/Makefile
lib/libc_r/Makefile
lib/libc_rtld/Makefile
lib/libcompat/Makefile
share/mk/bsd.dep.mk
share/mk/bsd.lib.mk

index 661869e..1dbb3c0 100644 (file)
@@ -8,8 +8,8 @@
 # stubs, remove just -DSYSLIBC_RCS from CFLAGS.
 LIB=c
 SHLIB_MAJOR= 7
-CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/include ${AINC}
-AINC=  -I${.OBJDIR} -I${.CURDIR}/${MACHINE_ARCH}
+CFLAGS+= -DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/include
+CFLAGS+= -I${.OBJDIR} -I${.CURDIR}/${MACHINE_ARCH}
 CLEANFILES+=tags
 PRECIOUSLIB=   yes
 
index f8a2503..657d174 100644 (file)
@@ -12,6 +12,7 @@ WARNS?=1
 CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/../libc/include
 CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
 CFLAGS+=-I${.CURDIR}/../../include
+CFLAGS+=-I${.CURDIR}/../libc/${MACHINE_ARCH}
 
 # Uncomment this if you want libc_r to contain debug information for
 # thread locking.
@@ -20,7 +21,6 @@ CFLAGS+=-D_LOCK_DEBUG
 # enable extra internal consistancy checks
 CFLAGS+=-D_PTHREADS_INVARIANTS
 
-AINC=  -I${.CURDIR}/../libc/${MACHINE_ARCH} -I${.CURDIR}/uthread
 PRECIOUSLIB=   yes
 
 LIBDIR=        /usr/lib/thread
index 4f78ba5..5071540 100644 (file)
@@ -1,5 +1,3 @@
-# $DragonFly: src/lib/libc_rtld/Makefile,v 1.2 2007/01/16 18:38:08 dillon Exp $
-
 LIB=   c_rtld
 INTERNALLIB=
 INSTALL_PIC_ARCHIVE=
@@ -8,10 +6,11 @@ STATIC_LOCALES=
 CFLAGS+=-I${.CURDIR}/../libc/include
 CFLAGS+=-I${.CURDIR}/../libc/resolv
 CFLAGS+=-I${.CURDIR}/../libc/rpc
-CFLAGS+=-I${.CURDIR}/../../include -D__thread=
-CFLAGS+=${AINC}
+CFLAGS+=-I${.CURDIR}/../../include
+CFLAGS+=-I${.CURDIR}/../libc/${MACHINE_ARCH}
+CFLAGS+=-I${.OBJDIR}
+CFLAGS+=-D__thread=
 
-AINC=  -I${.OBJDIR} -I${.CURDIR}/../libc/${MACHINE_ARCH}
 PRECIOUSLIB=   yes
 
 #
index 92cf89a..601c490 100644 (file)
@@ -3,7 +3,7 @@
 
 LIB=compat
 CFLAGS+=-I${.CURDIR}/../libc/locale
-AINC=  -I${.CURDIR}/../libc/${MACHINE_ARCH}
+CFLAGS+=-I${.CURDIR}/../libc/${MACHINE_ARCH}
 NOPIC=
 WARNS?=        0
 
index 9384cdf..320f54e 100644 (file)
@@ -1,5 +1,4 @@
 # $FreeBSD: src/share/mk/bsd.dep.mk,v 1.27.2.3 2002/12/23 16:33:37 ru Exp $
-# $DragonFly: src/share/mk/bsd.dep.mk,v 1.9 2006/02/13 13:27:20 corecode Exp $
 #
 # The include file <bsd.dep.mk> handles Makefile dependencies.
 #
@@ -19,7 +18,7 @@
 # MKDEP                Options for ${MKDEPCMD} [not set]
 #
 # MKDEPCMD     Makefile dependency list program [mkdep]
-# 
+#
 # SRCS          List of source files (c, c++, assembler)
 #
 #
@@ -68,32 +67,31 @@ tags: ${SRCS}
 CLEANFILES?=
 
 .for _LSRC in ${SRCS:M*.l:N*/*}
-.for _LC in ${_LSRC:S/.l/.c/}
+.for _LC in ${_LSRC:R}.c
 ${_LC}: ${_LSRC}
        ${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET}
 SRCS:= ${SRCS:S/${_LSRC}/${_LC}/}
-CLEANFILES:= ${CLEANFILES} ${_LC}
+CLEANFILES+= ${_LC}
 .endfor
 .endfor
 
 .for _YSRC in ${SRCS:M*.y:N*/*}
-.for _YC in ${_YSRC:S/.y/.c/}
+.for _YC in ${_YSRC:R}.c
 SRCS:= ${SRCS:S/${_YSRC}/${_YC}/}
-CLEANFILES:= ${CLEANFILES} ${_YC}
+CLEANFILES+= ${_YC}
 .if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h)
 .ORDER: ${_YC} y.tab.h
 ${_YC} y.tab.h: ${_YSRC}
        ${YACC} ${YFLAGS} ${.ALLSRC}
        cp y.tab.c ${_YC}
-SRCS:= ${SRCS} y.tab.h
-CLEANFILES:= ${CLEANFILES} y.tab.c y.tab.h
+CLEANFILES+= y.tab.c y.tab.h
 .elif !empty(YFLAGS:M-d)
 .for _YH in ${_YC:S/.c/.h/}
 .ORDER: ${_YC} ${_YH}
 ${_YC} ${_YH}: ${_YSRC}
        ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
-SRCS:= ${SRCS} ${_YH}
-CLEANFILES:= ${CLEANFILES} ${_YH}
+SRCS+= ${_YH}
+CLEANFILES+= ${_YH}
 .endfor
 .else
 ${_YC}: ${_YSRC}
@@ -142,19 +140,12 @@ _ALL_DEPENDS=${__FLAGS_FILES:N*.[sS]:N*.c:N*.cc:N*.C:N*.cpp:N*.cpp:N*.cxx:N*.m}
 .depend${_FG:S/^/_/:N__}: ${${_FG}_FLAGS_FILES} ${_ALL_DEPENDS}
        -rm -f ${.TARGET}
        -> ${.TARGET}
-.if ${${_FG}_FLAGS_FILES:M*.[sS]} != ""
-       ${MKDEPCMD} -f ${.TARGET} -a ${MKDEP} \
-           ${${_FG}_FLAGS} \
-           ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*} \
-           ${AINC} \
-           ${.ALLSRC:M*.[sS]}
-.endif
-.if ${${_FG}_FLAGS_FILES:M*.c} != ""
+.if ${${_FG}_FLAGS_FILES:M*.[csS]} != ""
        ${MKDEPCMD} -f ${.TARGET} -a ${MKDEP} \
            ${${_FG}_FLAGS} \
            ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*} \
            ${CFLAGS:M-std=*} \
-           ${.ALLSRC:M*.c}
+           ${.ALLSRC:M*.[csS]}
 .endif
 .if ${${_FG}_FLAGS_FILES:M*.cc} != "" || \
     ${${_FG}_FLAGS_FILES:M*.C} != "" || \
index d3d9b30..336a470 100644 (file)
@@ -1,6 +1,5 @@
 #      from: @(#)bsd.lib.mk    5.26 (Berkeley) 5/2/91
 # $FreeBSD: src/share/mk/bsd.lib.mk,v 1.91.2.15 2002/08/07 16:31:50 ru Exp $
-# $DragonFly: src/share/mk/bsd.lib.mk,v 1.17 2008/05/19 10:26:02 corecode Exp $
 #
 
 .include <bsd.init.mk>
@@ -87,25 +86,25 @@ PO_CXXFLAGS=${CXXFLAGS:N-ffunction-sections}
        ${OBJC} ${_${.IMPSRC:T}_FLAGS} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
 .s.o:
-       ${CC} ${_${.IMPSRC:T}_FLAGS} -x assembler-with-cpp ${CFLAGS} ${AINC} -c \
+       ${CC} ${_${.IMPSRC:T}_FLAGS} -x assembler-with-cpp ${CFLAGS} -c \
            ${.IMPSRC} -o ${.TARGET}
 
 .s.po:
-       ${CC} ${_${.IMPSRC:T}_FLAGS} -x assembler-with-cpp -DPROF ${CFLAGS} ${AINC} -c \
+       ${CC} ${_${.IMPSRC:T}_FLAGS} -x assembler-with-cpp -DPROF ${CFLAGS} -c \
            ${.IMPSRC} -o ${.TARGET}
 
 .s.So:
        ${CC} ${_${.IMPSRC:T}_FLAGS} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \
-           ${AINC} -c ${.IMPSRC} -o ${.TARGET}
+           -c ${.IMPSRC} -o ${.TARGET}
 
 .S.o:
-       ${CC} ${_${.IMPSRC:T}_FLAGS} ${CFLAGS} ${AINC} -c ${.IMPSRC} -o ${.TARGET}
+       ${CC} ${_${.IMPSRC:T}_FLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
 .S.po:
-       ${CC} ${_${.IMPSRC:T}_FLAGS} -DPROF ${CFLAGS} ${AINC} -c ${.IMPSRC} -o ${.TARGET}
+       ${CC} ${_${.IMPSRC:T}_FLAGS} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
 .S.So:
-       ${CC} ${_${.IMPSRC:T}_FLAGS} ${PICFLAG} -DPIC ${CFLAGS} ${AINC} -c ${.IMPSRC} \
+       ${CC} ${_${.IMPSRC:T}_FLAGS} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} \
            -o ${.TARGET}
 
 all: objwarn