summaryrefslogtreecommitdiffstats
path: root/m4/rtems-trim-builddir.m4
blob: ffd94d63708b89b77c3128c657818d2425280cc8 (plain) (blame)
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
# Takes one argument
#
# TILLAC_RTEMS_TRIM_CONFIG_DIR(dirvar)
#
# If 'srcdir' is a absolute path (a string
# starting with '/' then set 'dirvar' to the
# empty string; otherwise (srcdir is a relative path)
# set 'dirvar' to '../'.
#
# This macro can be used to find 'srcdir' should 
# configure decide to step into a subdirectory inside
# a build tree.
#
AC_DEFUN([TILLAC_RTEMS_TRIM_CONFIG_DIR],
	[AC_MSG_NOTICE([Trimming source directory])
	# leave absolute path alone, relative path needs
	# to step one level up
	case $srcdir in
		/* )
			$1=
		;;
		*)
			$1=../
		;;
	esac]dnl
)