Makefile 609 字节
Newer Older
1 2
CFLAGS = -Wall

3 4 5 6 7
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

8
EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx*
9 10 11

include ../lib.mk

12
$(OUTPUT)/subdir:
13
	mkdir -p $@
14
$(OUTPUT)/script:
15 16 17
	echo '#!/bin/sh' > $@
	echo 'exit $$*' >> $@
	chmod +x $@
18 19 20
$(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat
	cd $(OUTPUT) && ln -s -f $(shell basename $<) $(shell basename $@)
$(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
21 22
	cp $< $@
	chmod -x $@
23