2 ## (Re)builds Python metafile (__init__.py) and documentation
7 init := geni/__init__.py geni/util/__init__.py geni/methods/__init__.py
9 subdirs := keyconvert #pyOpenSSL-0.9
11 all: $(init) $(subdirs)
14 python setup.py install --root=$(DESTDIR) --record=GENI_INSTALLED_FILES
23 cd keyconvert && make clean
30 .phony: all install force clean index $(subdirs)
33 (echo '## Please use make index to update this file' ; echo 'all = """' ; cd geni; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; echo '""".split()') > $@
35 geni/methods/__init__.py:
36 (echo '## Please use make index to update this file' ; echo 'all = """' ; cd geni/methods; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; echo '""".split()') > $@
38 geni/util/__init__.py:
39 (echo '## Please use make index to update this file' ; echo 'all = """' ; cd geni/util; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; echo '""".split()') > $@
41 geni_now := $(sort $(shell fgrep -v '"' geni/__init__.py 2>/dev/null))
42 # what should be declared
43 geni_paths := $(filter-out %/__init__.py, $(wildcard geni/*.py))
44 geni_files := $(sort $(notdir $(geni_paths:.py=)))
45 ifneq ($(geni_now), $(geni_files))
46 geni/__init__.py: force
49 methods_now := $(sort $(shell fgrep -v '"' geni/methods/__init__.py 2>/dev/null))
50 # what should be declared
51 method_paths := $(filter-out %/__init__.py, $(wildcard geni/methods/*.py))
52 method_files := $(sort $(notdir $(method_paths:.py=)))
53 ifneq ($(methods_now), $(methods_files))
54 geni/methods/__init__.py: force
57 util_now := $(sort $(shell fgrep -v '"' geni/util/__init__.py 2>/dev/null))
58 # what should be declared
59 util_paths := $(filter-out %/__init__.py, $(wildcard geni/util/*.py))
60 util_files := $(sort $(notdir $(util_paths:.py=)))
61 ifneq ($(util_now), $(util_files))
62 geni/util/__init__.py: force
67 .PHONY: all install force clean index tags $(subdirs)