1 # build targets in Git, and export git's variables. All in *one* go.
2 # run as $(MAKE) -C git/ -f ../scripts/mk/gitmk-proxy.mk <git-targets> __export __export-file=path/to/file.mk
4 # Copyright (C) 2011 Kirill Smelkov <kirr@navytux.spb.ru>
7 # include Git's Makefile
17 # this target exports variables
18 __export-vars
:= CC ALL_CFLAGS ALL_LDFLAGS LIBS X
19 __export-vvars
:= QUIET_CC
21 $(QQ
)printf
'%b' '# variables exported from git/Makefile (autogenerated)\n'\
22 $(foreach v
,$(__export-vars
),'GIT_$v := $(subst ','\'',$($v))\n') \
23 $(foreach v,$(__export-vvars),'GIT_
$v = $(subst ','\'',$(value $v))\n') \