2 ## (Re)builds Python metafile (__init__.py) and documentation
6 init := geni/__init__.py geni/util/__init__.py geni/methods/__init__.py
8 subdirs := keyconvert #pyOpenSSL-0.9
10 all: $(init) $(subdirs)
13 python setup.py install --root=$(DESTDIR) --record=GENI_INSTALLED_FILES
22 cd keyconvert && make clean
29 .phony: all install force clean index $(subdirs)
32 (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()') > $@
34 geni/methods/__init__.py:
35 (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()') > $@
37 geni/util/__init__.py:
38 (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()') > $@
40 geni_now := $(sort $(shell fgrep -v '"' geni/__init__.py 2>/dev/null))
41 # what should be declared
42 geni_paths := $(filter-out %/__init__.py, $(wildcard geni/*.py))
43 geni_files := $(sort $(notdir $(geni_paths:.py=)))
44 ifneq ($(geni_now), $(geni_files))
45 geni/__init__.py: force
48 methods_now := $(sort $(shell fgrep -v '"' geni/methods/__init__.py 2>/dev/null))
49 # what should be declared
50 method_paths := $(filter-out %/__init__.py, $(wildcard geni/methods/*.py))
51 method_files := $(sort $(notdir $(method_paths:.py=)))
52 ifneq ($(methods_now), $(methods_files))
53 geni/methods/__init__.py: force
56 util_now := $(sort $(shell fgrep -v '"' geni/util/__init__.py 2>/dev/null))
57 # what should be declared
58 util_paths := $(filter-out %/__init__.py, $(wildcard geni/util/*.py))
59 util_files := $(sort $(notdir $(util_paths:.py=)))
60 ifneq ($(util_now), $(util_files))
61 geni/util/__init__.py: force
66 .PHONY: all install force clean index tags $(subdirs)