Deleted Added
full compact
bsd.progs.mk (260005) bsd.progs.mk (273501)
1# $FreeBSD: stable/10/share/mk/bsd.progs.mk 260005 2013-12-28 16:08:10Z jmmv $
1# $FreeBSD: stable/10/share/mk/bsd.progs.mk 273501 2014-10-23 00:54:52Z ngie $
2# $Id: progs.mk,v 1.11 2012/11/06 17:18:54 sjg Exp $
3#
4# @(#) Copyright (c) 2006, Simon J. Gerraty
5#
6# This file is provided in the hope that it will
7# be of use. There is absolutely NO WARRANTY.
8# Permission to copy, redistribute or otherwise
9# use this file is hereby granted provided that

--- 27 unchanged lines hidden (view full) ---

37.if make($t)
38PROG ?= $t
39.endif
40.endfor
41.endif
42
43.if defined(PROG)
44# just one of many
2# $Id: progs.mk,v 1.11 2012/11/06 17:18:54 sjg Exp $
3#
4# @(#) Copyright (c) 2006, Simon J. Gerraty
5#
6# This file is provided in the hope that it will
7# be of use. There is absolutely NO WARRANTY.
8# Permission to copy, redistribute or otherwise
9# use this file is hereby granted provided that

--- 27 unchanged lines hidden (view full) ---

37.if make($t)
38PROG ?= $t
39.endif
40.endfor
41.endif
42
43.if defined(PROG)
44# just one of many
45PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS
45PROG_OVERRIDE_VARS += BINDIR MAN SRCS
46PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD ${PROG_OVERRIDE_VARS}
46.for v in ${PROG_VARS:O:u}
47.for v in ${PROG_VARS:O:u}
47.if defined(${v}.${PROG}) || defined(${v}_${PROG})
48$v += ${${v}_${PROG}:U${${v}.${PROG}}}
48.if empty(${PROG_OVERRIDE_VARS:M$v})
49.if defined(${v}.${PROG})
50$v += ${${v}.${PROG}}
51.elif defined(${v}_${PROG})
52$v += ${${v}_${PROG}}
53.endif
49.else
50$v ?=
51.endif
52.endfor
53
54# for meta mode, there can be only one!
55.if ${PROG} == ${UPDATE_DEPENDFILE_PROG}
56UPDATE_DEPENDFILE ?= yes
57.endif
58UPDATE_DEPENDFILE ?= NO
59
60# ensure that we don't clobber each other's dependencies
61DEPENDFILE?= .depend.${PROG}
62# prog.mk will do the rest
63.else
54.else
55$v ?=
56.endif
57.endfor
58
59# for meta mode, there can be only one!
60.if ${PROG} == ${UPDATE_DEPENDFILE_PROG}
61UPDATE_DEPENDFILE ?= yes
62.endif
63UPDATE_DEPENDFILE ?= NO
64
65# ensure that we don't clobber each other's dependencies
66DEPENDFILE?= .depend.${PROG}
67# prog.mk will do the rest
68.else
64all: ${PROGS}
69all: ${FILES} ${PROGS} ${SCRIPTS}
65
66# We cannot capture dependencies for meta mode here
67UPDATE_DEPENDFILE = NO
68# nor can we safely run in parallel.
69.NOTPARALLEL:
70.endif
71.endif
72
73# handle being called [bsd.]progs.mk
74.include <bsd.prog.mk>
75
76.ifndef _RECURSING_PROGS
77# tell progs.mk we might want to install things
70
71# We cannot capture dependencies for meta mode here
72UPDATE_DEPENDFILE = NO
73# nor can we safely run in parallel.
74.NOTPARALLEL:
75.endif
76.endif
77
78# handle being called [bsd.]progs.mk
79.include <bsd.prog.mk>
80
81.ifndef _RECURSING_PROGS
82# tell progs.mk we might want to install things
78PROGS_TARGETS+= cleandepend cleandir cleanobj depend install
83PROGS_TARGETS+= checkdpadd clean cleandepend cleandir cleanobj depend install
79
80.for p in ${PROGS}
81.if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p)
82# bsd.prog.mk may need to know this
83x.$p= PROG_CXX=$p
84.endif
85
86$p ${p}_p: .PHONY .MAKE

--- 6 unchanged lines hidden (view full) ---

93 SUBDIR= PROG=$p ${x.$p} ${@:E})
94.endfor
95.endfor
96
97.for t in ${PROGS_TARGETS:O:u}
98$t: ${PROGS:%=%.$t}
99.endfor
100
84
85.for p in ${PROGS}
86.if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p)
87# bsd.prog.mk may need to know this
88x.$p= PROG_CXX=$p
89.endif
90
91$p ${p}_p: .PHONY .MAKE

--- 6 unchanged lines hidden (view full) ---

98 SUBDIR= PROG=$p ${x.$p} ${@:E})
99.endfor
100.endfor
101
102.for t in ${PROGS_TARGETS:O:u}
103$t: ${PROGS:%=%.$t}
104.endfor
105
101SCRIPTS_TARGETS+= cleandepend cleandir cleanobj depend install
106.if empty(PROGS) && !empty(SCRIPTS)
102
107
103.for p in ${SCRIPTS}
104.for t in ${SCRIPTS_TARGETS:O:u}
105$p.$t: .PHONY .MAKE
106 (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
107 SUBDIR= SCRIPT=$p ${x.$p} ${@:E})
108.for t in ${PROGS_TARGETS:O:u}
109scripts.$t: .PHONY .MAKE
110 (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} SUBDIR= _RECURSING_PROGS= \
111 $t)
112$t: scripts.$t
108.endfor
113.endfor
109.endfor
110
114
111.for t in ${SCRIPTS_TARGETS:O:u}
112$t: ${SCRIPTS:%=%.$t}
113.endfor
115.endif
114
115.endif
116
117.endif