Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 
0003 ifdef building_out_of_srctree
0004 
0005 symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py))
0006 
0007 quiet_cmd_symlink = SYMLINK $@
0008       cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@
0009 
0010 always-y += $(symlinks)
0011 $(addprefix $(obj)/, $(symlinks)): FORCE
0012         $(call if_changed,symlink)
0013 
0014 endif
0015 
0016 quiet_cmd_gen_constants_py = GEN     $@
0017       cmd_gen_constants_py = \
0018         $(CPP) -E -x c -P $(c_flags) $< > $@ ;\
0019         sed -i '1,/<!-- end-c-headers -->/d;' $@
0020 
0021 always-y += constants.py
0022 $(obj)/constants.py: $(src)/constants.py.in FORCE
0023         $(call if_changed_dep,gen_constants_py)
0024 
0025 clean-files := *.pyc *.pyo