summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/unix/posix/tools/Makefile.in
blob: 0fd219ab055b007c55b84b82c91d0238c8e5d63d (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
27
28
29
30
31
#
# $Id$
#

@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@

include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg

DESTDIR=$(PROJECT_RELEASE)/tests

# We use the generic difftest
PGMS=runtest looptest semdump shmdump

INSTALLED=$(PGMS:%=$(DESTDIR)/%)

all:	$(DESTDIR) $(PGMS) install

install:  $(INSTALLED)

# Install the program, replacing #!KSHELL with $(KSH)
# and first line #!SHELL with $(SHELL)
$(DESTDIR)/%: %
	-$(RM) $@.old
	-$(MV) $@ $@.old >/dev/null 2>&1
	$(SED) -e '1,1s?^#!KSHELL?#!$(KSH)?' -e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
	$(CHMOD) 0555 $@