gstreamer/Makefile.am
Andy Wingo 76ea628334 configure.ac (AC_CONFIG_FILES): The makefile handles pygst.py now.
Original commit message from CVS:
2005-07-12  Andy Wingo  <wingo@pobox.com>

* configure.ac (AC_CONFIG_FILES): The makefile handles pygst.py
now.

* Makefile.am (install-data-local): Actually install pygst.pth to
the pythondir, not pyexecdir. Also install a properly sedded
pygst.py.
(pygst.py): Sed the builddir into pygst.py, and set not writable
(to avoid any confusion about which file to edit).

* pygst.py.in (_pygst_dir): Set _pygst_dir from one variable,
@PYGSTDIR@, which is manually sedded in from the Makefile, so that
it works both installed and uninstalled.
2005-07-12 14:00:03 +00:00

44 lines
1.1 KiB
Makefile

if BUILD_DOCS
SUBDIRS_DOCS = docs
else
SUBDIRS_DOCS =
endif
UNCONDDIRS = examples gst pkgconfig testsuite
SUBDIRS = \
$(UNCONDDIRS) \
$(SUBDIRS_DOCS)
DIST_SUBDIRS = $(UNCONDDIRS) docs
EXTRA_DIST = \
ltihooks.py \
gst-python.spec.in \
gst-python.spec \
README-docs \
RELEASE
include $(top_srcdir)/common/release.mak
pygst.py: pygst.py.in Makefile
if test -f $@; then chmod +w $@; fi
sed -e "s|@PYGSTDIR\@|$(shell pwd)|g" \
-e "s|@GST_MAJORMINOR\@|$(GST_MAJORMINOR)|g" \
$< > $@
chmod -w $@
all-local: pygst.py
# rewrite pygst path in installed pygst.py, install pth file.
install-data-local: Makefile
$(mkinstalldirs) $(DESTDIR)$(pythondir)
sed -e "s|@PYGSTDIR\@|$(PYTHONDIR)/$(GST_MAJORMINOR)|g" \
-e "s|@GST_MAJORMINOR\@|$(GST_MAJORMINOR)|g" \
$(srcdir)/pygst.py.in > $(DESTDIR)$(pythondir)/pygst.py
chmod 644 $(DESTDIR)$(pyexecdir)/pygst.py
echo "gst-$(GST_MAJORMINOR)" > $(DESTDIR)$(pythondir)/pygst.pth
# also install pth file in pyexec.
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
echo "gst-$(GST_MAJORMINOR)" > $(DESTDIR)$(pyexecdir)/pygst.pth