[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11161 - in gnuradio/trunk/grc: . data/platforms/base
From: |
jblum |
Subject: |
[Commit-gnuradio] r11161 - in gnuradio/trunk/grc: . data/platforms/base data/platforms/python data/platforms/python/blocks freedesktop src/platforms/base src/platforms/python |
Date: |
Thu, 28 May 2009 15:14:27 -0600 (MDT) |
Author: jblum
Date: 2009-05-28 15:14:27 -0600 (Thu, 28 May 2009)
New Revision: 11161
Modified:
gnuradio/trunk/grc/Makefile.inc
gnuradio/trunk/grc/data/platforms/base/Makefile.am
gnuradio/trunk/grc/data/platforms/python/Makefile.am
gnuradio/trunk/grc/data/platforms/python/blocks/Makefile.am
gnuradio/trunk/grc/freedesktop/Makefile.am
gnuradio/trunk/grc/src/platforms/base/Constants.py.in
gnuradio/trunk/grc/src/platforms/base/Makefile.am
gnuradio/trunk/grc/src/platforms/python/Constants.py.in
gnuradio/trunk/grc/src/platforms/python/Makefile.am
Log:
Make the hardcoded paths in grc optionally configurable from environment
variables: GR_DOCDIR, GR_DATADIR
Allows the grc data files to up-rooted for a package installation (specifically
macosx).
Hardcoded path is the default when environment variables are undefined.
Modified: gnuradio/trunk/grc/Makefile.inc
===================================================================
--- gnuradio/trunk/grc/Makefile.inc 2009-05-28 19:50:11 UTC (rev 11160)
+++ gnuradio/trunk/grc/Makefile.inc 2009-05-28 21:14:27 UTC (rev 11161)
@@ -22,7 +22,6 @@
include $(top_srcdir)/Makefile.common
grc_gnuradio_prefix = $(pythondir)/grc_gnuradio
grc_src_prefix = $(pythondir)/gnuradio/grc
-grc_data_prefix = $(datadir)/$(PACKAGE)/grc
-grc_base_data_dir = $(grc_data_prefix)/platforms/base
-grc_python_data_dir = $(grc_data_prefix)/platforms/python
-grc_python_blocks_dir = $(grc_data_prefix)/platforms/python/blocks
+grc_base_data_reldir = grc/base
+grc_python_data_reldir = grc/python
+grc_blocks_data_reldir = grc/blocks
Modified: gnuradio/trunk/grc/data/platforms/base/Makefile.am
===================================================================
--- gnuradio/trunk/grc/data/platforms/base/Makefile.am 2009-05-28 19:50:11 UTC
(rev 11160)
+++ gnuradio/trunk/grc/data/platforms/base/Makefile.am 2009-05-28 21:14:27 UTC
(rev 11161)
@@ -21,7 +21,7 @@
include $(top_srcdir)/grc/Makefile.inc
-ourdatadir = $(grc_base_data_dir)
+ourdatadir = $(pkgdatadir)/$(grc_base_data_reldir)
dist_ourdata_DATA = \
block_tree.dtd \
Modified: gnuradio/trunk/grc/data/platforms/python/Makefile.am
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/Makefile.am 2009-05-28
19:50:11 UTC (rev 11160)
+++ gnuradio/trunk/grc/data/platforms/python/Makefile.am 2009-05-28
21:14:27 UTC (rev 11161)
@@ -23,7 +23,7 @@
SUBDIRS = blocks
-ourdatadir = $(grc_python_data_dir)
+ourdatadir = $(pkgdatadir)/$(grc_python_data_reldir)
dist_ourdata_DATA = \
block.dtd \
Modified: gnuradio/trunk/grc/data/platforms/python/blocks/Makefile.am
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/Makefile.am 2009-05-28
19:50:11 UTC (rev 11160)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/Makefile.am 2009-05-28
21:14:27 UTC (rev 11161)
@@ -21,7 +21,7 @@
include $(top_srcdir)/grc/Makefile.inc
-ourdatadir = $(grc_python_blocks_dir)
+ourdatadir = $(pkgdatadir)/$(grc_blocks_data_reldir)
dist_ourdata_DATA = \
audio_sink.xml \
Modified: gnuradio/trunk/grc/freedesktop/Makefile.am
===================================================================
--- gnuradio/trunk/grc/freedesktop/Makefile.am 2009-05-28 19:50:11 UTC (rev
11160)
+++ gnuradio/trunk/grc/freedesktop/Makefile.am 2009-05-28 21:14:27 UTC (rev
11161)
@@ -21,7 +21,7 @@
include $(top_srcdir)/grc/Makefile.inc
-ourdatadir = $(grc_data_prefix)/freedesktop
+ourdatadir = $(pkgdatadir)/grc/freedesktop
dist_ourdata_DATA = \
grc-icon-256.png \
@@ -36,8 +36,8 @@
dist_bin_SCRIPTS = grc_setup_freedesktop
-grc_setup_freedesktop: Makefile grc_setup_freedesktop.in
- sed -e 's|@address@hidden|$(ourdatadir)|g' $(srcdir)/address@hidden > $@
+grc_setup_freedesktop: $(srcdir)/grc_setup_freedesktop.in Makefile
+ sed -e 's|@address@hidden|$(ourdatadir)|g' $< > $@
EXTRA_DIST = $(srcdir)/grc_setup_freedesktop.in
BUILT_SOURCES = grc_setup_freedesktop
Modified: gnuradio/trunk/grc/src/platforms/base/Constants.py.in
===================================================================
--- gnuradio/trunk/grc/src/platforms/base/Constants.py.in 2009-05-28
19:50:11 UTC (rev 11160)
+++ gnuradio/trunk/grc/src/platforms/base/Constants.py.in 2009-05-28
21:14:27 UTC (rev 11161)
@@ -24,6 +24,7 @@
VERSION = '@VERSION@'
#setup paths
-DATA_DIR = '@datadir@'
+PKG_DIR = os.environ.get('GR_DATADIR', '@pkgdatadir@')
+DATA_DIR = os.path.join(PKG_DIR, '@reldatadir@')
FLOW_GRAPH_DTD = os.path.join(DATA_DIR, 'flow_graph.dtd')
BLOCK_TREE_DTD = os.path.join(DATA_DIR, 'block_tree.dtd')
Modified: gnuradio/trunk/grc/src/platforms/base/Makefile.am
===================================================================
--- gnuradio/trunk/grc/src/platforms/base/Makefile.am 2009-05-28 19:50:11 UTC
(rev 11160)
+++ gnuradio/trunk/grc/src/platforms/base/Makefile.am 2009-05-28 21:14:27 UTC
(rev 11161)
@@ -34,12 +34,13 @@
Port.py \
__init__.py
-Constants.py: Makefile Constants.py.in
+Constants.py: $(srcdir)/Constants.py.in Makefile
sed \
-e 's|@address@hidden|$(PACKAGE)|g' \
-e 's|@address@hidden|$(VERSION)|g' \
- -e 's|@address@hidden|$(grc_base_data_dir)|g' \
- $(srcdir)/address@hidden > $@
+ -e 's|@address@hidden|$(pkgdatadir)|g' \
+ -e 's|@address@hidden|$(grc_base_data_reldir)|g' \
+ $< > $@
EXTRA_DIST = $(srcdir)/Constants.py.in
BUILT_SOURCES = Constants.py
Modified: gnuradio/trunk/grc/src/platforms/python/Constants.py.in
===================================================================
--- gnuradio/trunk/grc/src/platforms/python/Constants.py.in 2009-05-28
19:50:11 UTC (rev 11160)
+++ gnuradio/trunk/grc/src/platforms/python/Constants.py.in 2009-05-28
21:14:27 UTC (rev 11161)
@@ -20,13 +20,14 @@
import os
import sys
import stat
+from .. base.Constants import PKG_DIR
PYEXEC = '@PYTHONW@'
#setup paths
-DOCS_DIR = os.path.join('@docdir@', 'xml')
-DATA_DIR = '@datadir@'
-BLOCKS_DIR = '@blocksdir@'
+DOCS_DIR = os.path.join(os.environ.get('GR_DOCDIR', '@docdir@'), 'xml')
+DATA_DIR = os.path.join(PKG_DIR, '@reldatadir@')
+BLOCKS_DIR = os.path.join(PKG_DIR, '@relblocksdir@')
HIER_BLOCKS_LIB_DIR = os.path.join(os.path.expanduser('~'), '.grc_gnuradio')
#file creation modes
Modified: gnuradio/trunk/grc/src/platforms/python/Makefile.am
===================================================================
--- gnuradio/trunk/grc/src/platforms/python/Makefile.am 2009-05-28 19:50:11 UTC
(rev 11160)
+++ gnuradio/trunk/grc/src/platforms/python/Makefile.am 2009-05-28 21:14:27 UTC
(rev 11161)
@@ -36,13 +36,13 @@
Port.py \
__init__.py
-Constants.py: Makefile Constants.py.in
+Constants.py: $(srcdir)/Constants.py.in Makefile
sed \
-e 's|@address@hidden|$(PYTHONW)|g' \
- -e 's|@address@hidden|$(grc_python_data_dir)|g' \
- -e 's|@address@hidden|$(grc_python_blocks_dir)|g' \
+ -e 's|@address@hidden|$(grc_python_data_reldir)|g' \
+ -e 's|@address@hidden|$(grc_blocks_data_reldir)|g' \
-e 's|@address@hidden|$(gr_docdir)|g' \
- $(srcdir)/address@hidden > $@
+ $< > $@
EXTRA_DIST = $(srcdir)/Constants.py.in
BUILT_SOURCES = Constants.py
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11161 - in gnuradio/trunk/grc: . data/platforms/base data/platforms/python data/platforms/python/blocks freedesktop src/platforms/base src/platforms/python,
jblum <=