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: install $(init) $(subdirs)
13 python setup.py install
21 python setup.py uninstall
22 cd keyconvert && make clean
24 # XX remove keyconvert
31 .phony: all install force clean index $(subdirs)
34 (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()') > $@
36 geni/methods/__init__.py:
37 (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()') > $@
39 geni/util/__init__.py:
40 (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()') > $@
42 geni_now := $(sort $(shell fgrep -v '"' geni/__init__.py 2>/dev/null))
43 # what should be declared
44 geni_paths := $(filter-out %/__init__.py, $(wildcard geni/*.py))
45 geni_files := $(sort $(notdir $(geni_paths:.py=)))
46 ifneq ($(geni_now), $(geni_files))
47 geni/__init__.py: force
50 methods_now := $(sort $(shell fgrep -v '"' geni/methods/__init__.py 2>/dev/null))
51 # what should be declared
52 method_paths := $(filter-out %/__init__.py, $(wildcard geni/methods/*.py))
53 method_files := $(sort $(notdir $(method_paths:.py=)))
54 ifneq ($(methods_now), $(methods_files))
55 geni/methods/__init__.py: force
58 util_now := $(sort $(shell fgrep -v '"' geni/util/__init__.py 2>/dev/null))
59 # what should be declared
60 util_paths := $(filter-out %/__init__.py, $(wildcard geni/util/*.py))
61 util_files := $(sort $(notdir $(util_paths:.py=)))
62 ifneq ($(util_now), $(util_files))
63 geni/util/__init__.py: force
68 .PHONY: all install force clean index tags $(subdirs)