fork download
  1. #!/bin/bash
  2.  
  3. # ideone boilerplate: run in temp dir
  4. t=$(mktemp -d -t ideone.XXXXXXXX) || exit
  5. trap 'rm -rf "$t"' ERR EXIT
  6. cd "$t"
  7.  
  8. tr _ '\011' <<\: >Makefile
  9. poo := ick
  10. bar := quux
  11. baz := foo
  12. export baz
  13. .PHONY: all
  14. all:
  15. _nl -ba Makefile
  16. _env | grep -e ^poo -e ^bar -e ^baz
  17. export poo
  18. :
  19.  
  20. make
  21.  
Success #stdin #stdout 0.01s 5524KB
stdin
Standard input is empty
stdout
nl -ba Makefile
     1	poo := ick
     2	bar := quux
     3	baz := foo
     4	export baz
     5	.PHONY: all
     6	all:
     7		nl -ba Makefile
     8		env | grep -e ^poo -e ^bar -e ^baz
     9	export poo
env | grep -e ^poo -e ^bar -e ^baz
baz=foo
poo=ick