| 1 | ## automake - create Makefile.in from Makefile.am
|
|---|
| 2 | ## Copyright 1999, 2001 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., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 17 | ## 02111-1307, USA.
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | ## ------------ ##
|
|---|
| 21 | ## Installing. ##
|
|---|
| 22 | ## ------------ ##
|
|---|
| 23 |
|
|---|
| 24 | if %?INSTALL%
|
|---|
| 25 | am__installdirs += $(DESTDIR)$(%NDIR%dir)
|
|---|
| 26 | ?BASE?%DIR%PYTHON_INSTALL = $(INSTALL_DATA)
|
|---|
| 27 | ?!BASE?%DIR%PYTHON_INSTALL = $(install_sh_DATA)
|
|---|
| 28 | ?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
|
|---|
| 29 | ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
|
|---|
| 30 | install-%DIR%PYTHON: $(%DIR%_PYTHON)
|
|---|
| 31 | @$(NORMAL_INSTALL)
|
|---|
| 32 | $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
|
|---|
| 33 | @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? d=`echo "$$p" | sed -e 's,^.*/,,'`; \
|
|---|
| 41 | ?!BASE? d="$$p"; \
|
|---|
| 42 | dlist="$$dlist $$d"; \
|
|---|
| 43 | ## Don't perform translation, since script name is important.
|
|---|
| 44 | echo " $(%DIR%PYTHON_INSTALL) $$b$$p $(DESTDIR)$(%NDIR%dir)/$$d"; \
|
|---|
| 45 | $(%DIR%PYTHON_INSTALL) $$b$$p $(DESTDIR)$(%NDIR%dir)/$$d; \
|
|---|
| 46 | else :; fi; \
|
|---|
| 47 | done; \
|
|---|
| 48 | ## Byte-compile must be done at install time, since file times are
|
|---|
| 49 | ## encoded in the actual files.
|
|---|
| 50 | PYTHON=$(PYTHON) $(py_compile) --basedir $(DESTDIR)$(%NDIR%dir) $$dlist
|
|---|
| 51 | endif %?INSTALL%
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 | ## -------------- ##
|
|---|
| 55 | ## Uninstalling. ##
|
|---|
| 56 | ## -------------- ##
|
|---|
| 57 |
|
|---|
| 58 | if %?INSTALL%
|
|---|
| 59 | .PHONY uninstall-am: uninstall-%DIR%PYTHON
|
|---|
| 60 | uninstall-%DIR%PYTHON:
|
|---|
| 61 | @$(NORMAL_UNINSTALL)
|
|---|
| 62 | list='$(%DIR%_PYTHON)'; for p in $$list; do \
|
|---|
| 63 | ?BASE? d=`echo "$$p" | sed -e 's,^.*/,,'`; \
|
|---|
| 64 | ?!BASE? d="$$p"; \
|
|---|
| 65 | rm -f $(DESTDIR)$(%NDIR%dir)/$$d; \
|
|---|
| 66 | ## This is to remove the .pyc and .pyo byte compiled versions (a bit
|
|---|
| 67 | ## of a hack).
|
|---|
| 68 | rm -f $(DESTDIR)$(%NDIR%dir)/$${d}c; \
|
|---|
| 69 | rm -f $(DESTDIR)$(%NDIR%dir)/$${d}o; \
|
|---|
| 70 | done
|
|---|
| 71 | endif %?INSTALL%
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 | ## ---------- ##
|
|---|
| 75 | ## Cleaning. ##
|
|---|
| 76 | ## ---------- ##
|
|---|
| 77 |
|
|---|
| 78 | ## There is nothing to clean here since files are
|
|---|
| 79 | ## byte-compiled when (and where) they are installed.
|
|---|
| 80 |
|
|---|
| 81 | ## -------------- ##
|
|---|
| 82 | ## Distributing. ##
|
|---|
| 83 | ## -------------- ##
|
|---|
| 84 |
|
|---|
| 85 | if %?DIST%
|
|---|
| 86 | DIST_COMMON += $(%DIR%_PYTHON)
|
|---|
| 87 | endif %?DIST%
|
|---|