2 ## (Re)builds Python metafile (__init__.py) and documentation
4 # overwritten by the specfile
7 init := geni/__init__.py geni/util/__init__.py geni/methods/__init__.py
8 subdirs := keyconvert #pyOpenSSL-0.9
12 install: $(init) $(subdirs) install-python
15 python setup.py install --root=$(DESTDIR) --record=GENI_INSTALLED_FILES
24 for i in $(subdirs); do make -C $$i clean ; done
31 .phony: all install install-python force clean index $(subdirs)
35 # are the .java files used ?
37 find . -name '*.py' -o -name '*.sh' -o -name '*.ecore' | grep -v '/\.svn/' | xargs etags
41 (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()') > $@
43 geni/methods/__init__.py:
44 (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()') > $@
46 geni/util/__init__.py:
47 (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()') > $@
49 geni_now := $(sort $(shell fgrep -v '"' geni/__init__.py 2>/dev/null))
50 # what should be declared
51 geni_paths := $(filter-out %/__init__.py, $(wildcard geni/*.py))
52 geni_files := $(sort $(notdir $(geni_paths:.py=)))
53 ifneq ($(geni_now), $(geni_files))
54 geni/__init__.py: force
57 methods_now := $(sort $(shell fgrep -v '"' geni/methods/__init__.py 2>/dev/null))
58 # what should be declared
59 method_paths := $(filter-out %/__init__.py, $(wildcard geni/methods/*.py))
60 method_files := $(sort $(notdir $(method_paths:.py=)))
61 ifneq ($(methods_now), $(methods_files))
62 geni/methods/__init__.py: force
65 util_now := $(sort $(shell fgrep -v '"' geni/util/__init__.py 2>/dev/null))
66 # what should be declared
67 util_paths := $(filter-out %/__init__.py, $(wildcard geni/util/*.py))
68 util_files := $(sort $(notdir $(util_paths:.py=)))
69 ifneq ($(util_now), $(util_files))
70 geni/util/__init__.py: force