License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / tools / testing / selftests / exec / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
c9b26b81 2CFLAGS = -Wall
c9b26b81 3
80d443e8 4TEST_GEN_PROGS := execveat
5TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
6# Makefile is a run-time dependency, since it's accessed by the execveat test
7TEST_FILES := Makefile
8
a8ba798b 9EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx*
80d443e8 10
11include ../lib.mk
12
a8ba798b 13$(OUTPUT)/subdir:
c9b26b81 14 mkdir -p $@
a8ba798b 15$(OUTPUT)/script:
c9b26b81
DD
16 echo '#!/bin/sh' > $@
17 echo 'exit $$*' >> $@
18 chmod +x $@
a8ba798b 19$(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat
20 cd $(OUTPUT) && ln -s -f $(shell basename $<) $(shell basename $@)
21$(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
c9b26b81
DD
22 cp $< $@
23 chmod -x $@
a8ba798b 24