Move target creating symlinks in lib/ into Makefile.libcommon
authorMichael Hanselmann <hansmi@google.com>
Wed, 30 Apr 2008 12:55:00 +0000 (12:55 +0000)
committerMichael Hanselmann <hansmi@google.com>
Wed, 30 Apr 2008 12:55:00 +0000 (12:55 +0000)
Reviewed-by: iustinp

lib/Makefile.am
lib/Makefile.libcommon [new file with mode: 0644]

index fe6e7c4..b387c21 100644 (file)
@@ -8,6 +8,7 @@ pkgpython_PYTHON = __init__.py backend.py cli.py cmdlib.py config.py \
 
 nobase_pkgpython_PYTHON = rapi/__init__.py \
        rapi/resources.py rapi/RESTHTTPServer.py
+python_files = $(pkgpython_PYTHON)
 
 all-local: _autoconf.py
 
@@ -25,7 +26,4 @@ _autoconf.py: Makefile
          echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
        } > $@
 
-pre-check: all
-       for i in $(pkgpython_PYTHON); do \
-               if test ! -f $$i; then $(LN_S) $(srcdir)/$$i $$i; fi; \
-       done
+include $(srcdir)/Makefile.libcommon
diff --git a/lib/Makefile.libcommon b/lib/Makefile.libcommon
new file mode 100644 (file)
index 0000000..73b48f3
--- /dev/null
@@ -0,0 +1,8 @@
+# We need to create symlinks because "make distcheck" will not install Python
+# files for building.
+pre-check: all
+       for i in $(python_files); do \
+               if test ! -f $$i; then \
+                       $(LN_S) $(srcdir)/$$i $$i; \
+               fi; \
+       done