summaryrefslogtreecommitdiff
path: root/mcon/U/official.U
blob: 7fbaa6562f844139f7684a5308e65b80cad4f55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
?RCS: $Id: official.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 2006, Christian Biere
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:official d_official: Myread Setvar Warn
?MAKE:	-pick add $@ %<
?S:official:
?S:	This variable holds 'true' or 'false' depending on whether we're making
?S:	an "official" build.  When not official, generated programs may choose
?S:	to peek within the source directory, for instance via $pkgsrc in the
?S:	shell and PACKAGE_SOURCE_DIR in C programs.
?S:.
?S:d_official:
?S:	This variable conditionally defines OFFICIAL_BUILD.
?S:.
?C:OFFICIAL_BUILD:
?C: When defined, the build is "official".  Programs generated for an
?C:	official build MUST NOT peek into the place where the sources lie, via
?C:	PACKAGE_SOURCE_DIR or any other means.
?C:.
?H:#$d_official OFFICIAL_BUILD	/**/
?H:.
?Y:TOP
?LINT:set d_official
: determine whether this is an official build
case "$official" in
false)
	official=false
	val="$undef"
	echo " "
	./warn 'This build will not be suitable for distribution.' 4>&4

;;
*)
	val="$define"
	official=true
	;;
esac
set d_official
eval $setvar