From bb0763846f740448316a8a278ebd33ec36e98881 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 17 Jun 2008 16:11:29 +0000 Subject: [PATCH] rebuild index --- Makefile | 23 ++++++++++++++++++++--- PLC/Legacy/__init__.py | 8 +------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index e7bc72d9..ab65c0ff 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # # Metafiles -init := PLC/__init__.py PLC/Methods/__init__.py +init := PLC/__init__.py PLC/Methods/__init__.py PLC/Legacy/__init__.py # python-pycurl and python-psycopg2 avail. from fedora 5 # we used to ship our own version of psycopg2 and pycurl, for fedora4 @@ -51,8 +51,8 @@ index-clean: rm $(init) #################### regenerate indexes - not used by the build, as both files are svn added - please update as appropriate -# All .py files in PLC/ +########## PLC/ # the current content of __init__.py PLC_now := $(sort $(shell fgrep -v '"' PLC/__init__.py 2>/dev/null)) # what should be declared @@ -65,7 +65,7 @@ endif PLC/__init__.py: (echo 'all = """' ; cd PLC; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; echo '""".split()') > $@ - +########## Methods/ # the current content of __init__.py METHODS_now := $(sort $(shell fgrep -v '"' PLC/Methods/__init__.py 2>/dev/null)) # what should be declared @@ -78,6 +78,23 @@ endif PLC/Methods/__init__.py: (echo 'methods = """' ; cd PLC/Methods; ls -1 *.py system/*.py | grep -v __init__ | sed -e 's,.py$$,,' -e 's,system/,system.,' ; echo '""".split()') > $@ +########## Legacy/ +# the current content of __init__.py +LEGACY_now := $(sort $(shell fgrep -v '"' PLC/Legacy/__init__.py 2>/dev/null)) +# what should be declared +LEGACY_paths := $(filter-out %/__init__.py, $(wildcard PLC/Legacy/*.py)) +LEGACY_files := $(sort $(notdir $(LEGACY_paths:.py=))) + +ifneq ($(LEGACY_now),$(LEGACY_files)) +PLC/Legacy/__init__.py: force +endif +PLC/Legacy/__init__.py: + (echo '# each module to define in "methods" the set of methods that it defines' ;\ + echo '__all__ = """' ; \ + cd PLC/Legacy; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; \ + echo '""".split()') > $@ + +########## force: .PHONY: all install force clean index tags $(subdirs) diff --git a/PLC/Legacy/__init__.py b/PLC/Legacy/__init__.py index 64896ac0..25f8dedc 100644 --- a/PLC/Legacy/__init__.py +++ b/PLC/Legacy/__init__.py @@ -1,11 +1,5 @@ -# supposed to be managed manually -# syntax is modulename.methodname - -# xxx could we use __all__ and have each module define its -# own set of methods ? - +# each module to define in "methods" the set of methods that it defines __all__ = """ NodeNetworks Types """.split() - -- 2.45.2