Reword the copyright notices to match what's suggested in GPLv3.
[automake/plouj.git] / lib / am / python.am
blob2140dd2206c2cfff2ae94c846e14f8fde6101481
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
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 3, or (at your option)
7 ## any later version.
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.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 if %?INSTALL%
18 include inst-vars.am
19 endif %?INSTALL%
21 ## ------------ ##
22 ## Installing.  ##
23 ## ------------ ##
25 if %?INSTALL%
26 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
27 %DIR%PYTHON_INSTALL = %BASE?$(INSTALL_DATA):$(install_sh_DATA)%
28 .PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
29 install-%DIR%PYTHON: $(%DIR%_PYTHON)
30         @$(NORMAL_INSTALL)
31         test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
32 ?!BASE? @$(am__vpath_adj_setup) \
33         %BASE?@%list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
34 ## A file can be in the source directory or the build directory.
35           if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
36           if test -f $$b$$p; then \
37 ## Compute basename of source file.  Unless this is a nobase_ target, we
38 ## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.py',
39 ## not '$(DESTDIR)$(%NDIR%dir)/python/foo.py'.
40             %BASE?$(am__strip_dir):$(am__vpath_adj)% \
41             dlist="$$dlist $$f"; \
42 ## Don't perform translation, since script name is important.
43             echo " $(%DIR%PYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
44             $(%DIR%PYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
45           else :; fi; \
46         done; \
47 ## Byte-compile must be done at install time, since file times are
48 ## encoded in the actual files.
49         if test -n "$$dlist"; then \
50           if test -z "$(DESTDIR)"; then \
51             PYTHON=$(PYTHON) $(py_compile) --basedir "$(%NDIR%dir)" $$dlist; \
52           else \
53             PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(%NDIR%dir)" $$dlist; \
54           fi; \
55         else :; fi
56 endif %?INSTALL%
59 ## -------------- ##
60 ## Uninstalling.  ##
61 ## -------------- ##
63 if %?INSTALL%
64 .PHONY uninstall-am: uninstall-%DIR%PYTHON
65 uninstall-%DIR%PYTHON:
66         @$(NORMAL_UNINSTALL)
67 ?!BASE? @$(am__vpath_adj_setup) \
68         %BASE?@%list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
69           %BASE?$(am__strip_dir):$(am__vpath_adj)% \
70           rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
71 ## This is to remove the .pyc and .pyo byte compiled versions (a bit
72 ## of a hack).
73           rm -f "$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
74           rm -f "$(DESTDIR)$(%NDIR%dir)/$${f}o"; \
75         done
76 endif %?INSTALL%
79 ## ---------- ##
80 ## Cleaning.  ##
81 ## ---------- ##
83 ## There is nothing to clean here since files are
84 ## byte-compiled when (and where) they are installed.
86 ## -------------- ##
87 ## Distributing.  ##
88 ## -------------- ##
90 if %?DIST%
91 DIST_COMMON += %DISTVAR%
92 endif %?DIST%