1CFLAGS = -Wall
2
3TEST_GEN_PROGS := execveat
4TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
5# Makefile is a run-time dependency, since it's accessed by the execveat test
6TEST_FILES := Makefile
7
8EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx*
9
10include ../lib.mk
11
12$(OUTPUT)/subdir:
13	mkdir -p $@
14$(OUTPUT)/script:
15	echo '#!/bin/sh' > $@
16	echo 'exit $$*' >> $@
17	chmod +x $@
18$(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat
19	cd $(OUTPUT) && ln -s -f $(shell basename $<) $(shell basename $@)
20$(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
21	cp $< $@
22	chmod -x $@
23
24