Makefile: Set PYTHONPATH=. for make_target_table.py build
authorW. Trevor King <wking@tremily.us>
Thu, 6 Jun 2013 22:32:40 +0000 (18:32 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Jun 2013 00:34:44 +0000 (20:34 -0400)
Avoid:

  $ make
  ...
  "./doc/make_target_table.py" > "doc/targets.generated.txt"
  Traceback (most recent call last):
    File "./doc/make_target_table.py", line 34, in <module>
      __import__(module_name)
  ImportError: No module named catalyst.targets.embedded
  make: *** [doc/targets.generated.txt] Error 1

This also ensures that the local catalyst package takes precedence
over any previously installed version.

Makefile

index 6f69e5c47dd9f31af359bb575a80b6433825ef1c..a130fb3a4e34fcbd2e092b215568f44c3e9a60d7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) doc/make_subarch_tab
        ./doc/make_subarch_table_guidexml.py
 
 doc/targets.generated.txt: doc/make_target_table.py $(wildcard catalyst/targets/*.py)
-       "./$<" > "$@"
+       PYTHONPATH=. "./$<" > "$@"
 
 $(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile | files
        a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \