2014-12-13 07:57:36 +07:00
|
|
|
CFLAGS = -Wall
|
|
|
|
|
2016-11-29 18:55:51 +07:00
|
|
|
TEST_GEN_PROGS := execveat
|
|
|
|
TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
|
|
|
|
# Makefile is a run-time dependency, since it's accessed by the execveat test
|
|
|
|
TEST_FILES := Makefile
|
|
|
|
|
2016-11-29 18:55:52 +07:00
|
|
|
EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx*
|
2016-11-29 18:55:51 +07:00
|
|
|
|
|
|
|
include ../lib.mk
|
|
|
|
|
2016-11-29 18:55:52 +07:00
|
|
|
$(OUTPUT)/subdir:
|
2014-12-13 07:57:36 +07:00
|
|
|
mkdir -p $@
|
2016-11-29 18:55:52 +07:00
|
|
|
$(OUTPUT)/script:
|
2014-12-13 07:57:36 +07:00
|
|
|
echo '#!/bin/sh' > $@
|
|
|
|
echo 'exit $$*' >> $@
|
|
|
|
chmod +x $@
|
2016-11-29 18:55:52 +07:00
|
|
|
$(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat
|
|
|
|
cd $(OUTPUT) && ln -s -f $(shell basename $<) $(shell basename $@)
|
|
|
|
$(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
|
2014-12-13 07:57:36 +07:00
|
|
|
cp $< $@
|
|
|
|
chmod -x $@
|
2016-11-29 18:55:52 +07:00
|
|
|
|