Merge branch 'maint'
[platform/upstream/automake.git] / lib / am / python.am
index 427c95d..f9b7790 100644 (file)
@@ -1,6 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008, 2009, 2011
-## Free Software Foundation, Inc.
+## Copyright (C) 1999-2012 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -19,19 +18,24 @@ if %?INSTALL%
 include inst-vars.am
 endif %?INSTALL%
 
+?FIRST?am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
+
 ## ------------ ##
 ## Installing.  ##
 ## ------------ ##
 
 if %?INSTALL%
-?FIRST?am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
+?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
+?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
-       test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
        @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
@@ -58,6 +62,10 @@ if %?BASE%
        else :; fi
 else !%?BASE%
        @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
+       fi; \
        $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
 ## A file can be in the source directory or the build directory.