source: trunk/essentials/sys-devel/automake-1.10/lib/am/python.am

Last change on this file was 3147, checked in by bird, 18 years ago

automake 1.10

File size: 3.3 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright (C) 1999, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
3
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2, or (at your option)
7## any later version.
8
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12## GNU General Public License for more details.
13
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17## 02110-1301, USA.
18
19if %?INSTALL%
20include inst-vars.am
21endif %?INSTALL%
22
23## ------------ ##
24## Installing. ##
25## ------------ ##
26
27if %?INSTALL%
28am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
29?BASE?%DIR%PYTHON_INSTALL = $(INSTALL_DATA)
30?!BASE?%DIR%PYTHON_INSTALL = $(install_sh_DATA)
31?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
32?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
33install-%DIR%PYTHON: $(%DIR%_PYTHON)
34 @$(NORMAL_INSTALL)
35 test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
36?!BASE? @$(am__vpath_adj_setup) \
37?!BASE? list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
38?BASE? @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
39## A file can be in the source directory or the build directory.
40 if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
41 if test -f $$b$$p; then \
42## Compute basename of source file. Unless this is a nobase_ target, we
43## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.py',
44## not '$(DESTDIR)$(%NDIR%dir)/python/foo.py'.
45?BASE? f=$(am__strip_dir) \
46?!BASE? $(am__vpath_adj) \
47 dlist="$$dlist $$f"; \
48## Don't perform translation, since script name is important.
49 echo " $(%DIR%PYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
50 $(%DIR%PYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
51 else :; fi; \
52 done; \
53## Byte-compile must be done at install time, since file times are
54## encoded in the actual files.
55 if test -n "$$dlist"; then \
56 if test -z "$(DESTDIR)"; then \
57 PYTHON=$(PYTHON) $(py_compile) --basedir "$(%NDIR%dir)" $$dlist; \
58 else \
59 PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(%NDIR%dir)" $$dlist; \
60 fi; \
61 else :; fi
62endif %?INSTALL%
63
64
65## -------------- ##
66## Uninstalling. ##
67## -------------- ##
68
69if %?INSTALL%
70.PHONY uninstall-am: uninstall-%DIR%PYTHON
71uninstall-%DIR%PYTHON:
72 @$(NORMAL_UNINSTALL)
73?!BASE? @$(am__vpath_adj_setup) \
74?!BASE? list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
75?BASE? @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
76?BASE? f=$(am__strip_dir) \
77?!BASE? $(am__vpath_adj) \
78 rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
79## This is to remove the .pyc and .pyo byte compiled versions (a bit
80## of a hack).
81 rm -f "$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
82 rm -f "$(DESTDIR)$(%NDIR%dir)/$${f}o"; \
83 done
84endif %?INSTALL%
85
86
87## ---------- ##
88## Cleaning. ##
89## ---------- ##
90
91## There is nothing to clean here since files are
92## byte-compiled when (and where) they are installed.
93
94## -------------- ##
95## Distributing. ##
96## -------------- ##
97
98if %?DIST%
99DIST_COMMON += %DISTVAR%
100endif %?DIST%
Note: See TracBrowser for help on using the repository browser.