Home | History | Annotate | Download | only in exec
      1 CFLAGS = -Wall
      2 
      3 TEST_GEN_PROGS := execveat
      4 TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
      5 # Makefile is a run-time dependency, since it's accessed by the execveat test
      6 TEST_FILES := Makefile
      7 
      8 EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx*
      9 
     10 include ../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