* Added new targets "trans" and "pycheck" to top-level Makefile

* Python verification (pychecker) removed from check-local target to become
part of the pycheck target heiarchy.  Each subdir now has a
GRAMPS_PY_MODPATH variable that indicates a colon-separated path for
the PYTHONPATH environment to allow module importing to work.


svn: r1559
This commit is contained in:
Donald A. Peterson 2003-05-21 00:30:02 +00:00
parent b2da3d9d63
commit f30c137391
9 changed files with 84 additions and 46 deletions

View File

@ -11,3 +11,10 @@ gramps: gramps.sh
dist-hook: gramps.spec dist-hook: gramps.spec
cp gramps.spec $(distdir) cp gramps.spec $(distdir)
.PHONY: pycheck trans
pycheck:
(cd src; make pycheck)
trans:
(cd src; make trans)

View File

@ -5,7 +5,7 @@ SUBDIRS = docgen filters plugins data po calendars
GVFSINC = @GPREF@ GVFSINC = @GPREF@
CFLAGS = -fPIC -shared -O @GNOMEINC@ @CFLAGS@ @CPPFLAGS@ -I@includedir@ CFLAGS = -fPIC -shared -O @GNOMEINC@ @CFLAGS@ @CPPFLAGS@ -I@includedir@
LDFLAGS = @GNOMELIB@ @LDFLAGS@ -L@libdir@ @LIBS@ LDFLAGS = @GNOMELIB@ @LDFLAGS@ -L@libdir@ @LIBS@
CLEANFILES = ${INTLLIBS} grampslib.so CLEANFILES = $(INTLLIBS) grampslib.so
MOSTLYCLEANFILES = MOSTLYCLEANFILES =
INTLLIBS= intl22.so INTLLIBS= intl22.so
@ -93,8 +93,9 @@ pkgpython_PYTHON = \
Witness.py\ Witness.py\
WriteXML.py WriteXML.py
# Use GNU make's ':=' syntax for nice wildcard use. # Could use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all files individually # If not using GNU make, then list all files individually
# The latter is more portable and POSIX-friendly :)
GLADEFILES = \ GLADEFILES = \
config.glade\ config.glade\
dialog.glade\ dialog.glade\
@ -130,39 +131,42 @@ GRAPHICS = \
splash.jpg splash.jpg
# Other stuff that we need to install # Other stuff that we need to install
pkgdata_DATA = ${INTLLIBS} ${GLADEFILES} ${GRAPHICS} gramps.desktop grampslib.so dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) gramps.desktop
nodist_pkgdata_DATA = grampslib.so $(INTLLIBS)
EXTRA_DIST = grampslib.i EXTRA_DIST = grampslib.i intl.c grampslib_wrap.c
all: ${INTLLIBS} grampslib.so all-local: $(INTLLIBS) grampslib.so
DIST_SOURCES = intl.c grampslib_wrap.c # These can probably be done in a better or more elegant/generic way
dist_pkgdata_DATA = ${pkgdata_DATA}
# These can prbably be done in a better or more elegant/generic way
# eventually (libtool?), but this works. # eventually (libtool?), but this works.
intl22.so: intl.c intl22.so: $(srcdir)/intl.c
$(CC) $(CFLAGS) $(LDFLAGS) @P22_INCLUDES@ -DVER22 -o $@ intl.c $(CC) $(CFLAGS) $(LDFLAGS) @P22_INCLUDES@ -DVER22 -o $@ $(srcdir)/intl.c
grampslib.so: grampslib_wrap.c grampslib.so: $(srcdir)/grampslib_wrap.c
$(CC) $(CFLAGS) @P22_INCLUDES@ -o $@ grampslib_wrap.c $(LDFLAGS) $(CC) $(CFLAGS) @P22_INCLUDES@ -o $@ $(srcdir)/grampslib_wrap.c $(LDFLAGS)
# In principle the following rule slightly violates the automake/autoconf # In principle the following rule slightly violates the automake/autoconf
# spirit of keeping each subdirectory as a separate entity unto itself. # spirit of keeping each subdirectory as a separate entity unto itself.
# But, since the template depends on everything from here, we allow this # But, since the template depends on everything from here, we allow this
# one exception. # one exception.
trans: po/template.po # Build po/template.po.
.PHONY: trans
trans:
./build_po ./build_po
check: pycheck:
for d in $(SUBDIRS) ; do \
(cd $$d; make pycheck); \
done;
pychecker $(pkgpython_PYTHON) pychecker $(pkgpython_PYTHON)
install-data-local: install-data-local:
${INSTALL} -d ${prefix}/share/pixmaps $(INSTALL) -d $(DESTDIR)$(prefix)/share/pixmaps
${INSTALL_DATA} gramps.png ${prefix}/share/pixmaps $(INSTALL_DATA) $(srcdir)/gramps.png $(DESTDIR)$(prefix)/share/pixmaps
${INSTALL} -d ${prefix}/share/gnome/apps/Applications $(INSTALL) -d $(DESTDIR)$(prefix)/share/gnome/apps/Applications
${INSTALL_DATA} gramps.desktop ${prefix}/share/gnome/apps/Applications $(INSTALL_DATA) $(srcdir)/gramps.desktop $(DESTDIR)$(prefix)/share/gnome/apps/Applications
uninstall-local: uninstall-local:
-rm ${prefix}/share/pixmaps/gramps.png -rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png
-rm ${prefix}/share/gnome/apps/Applications/gramps.desktop -rm $(DESTDIR)$(prefix)/share/gnome/apps/Applications/gramps.desktop

View File

@ -1,4 +1,4 @@
# This is the src/plugins level Makefile for Gramps # This is the src/calendars level Makefile for Gramps
# Use GNU make's ':=' syntax for nice wildcard use. # Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually # If not using GNU make, then list all .py files individually
@ -9,4 +9,10 @@ pkgpython_PYTHON = \
pkgpyexecdir = @pkgpyexecdir@/plugins pkgpyexecdir = @pkgpyexecdir@/plugins
pkgpythondir = @pkgpythondir@/plugins pkgpythondir = @pkgpythondir@/plugins
pkgdatadir = ${datadir}/@PACKAGE@/calendars pkgdatadir = $(datadir)/@PACKAGE@/calendars
GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));

View File

@ -1,7 +1,8 @@
# This is the src/data level Makefile # This is the src/data level Makefile
SUBDIRS = templates SUBDIRS = templates
pkgdatadir = ${datadir}/@PACKAGE@/data pkgdatadir = $(datadir)/@PACKAGE@/data
pkgdata_DATA = gedcom.xml pkgdata_DATA = gedcom.xml
EXTRA_DIST = ${pkgdata_DATA} EXTRA_DIST = $(pkgdata_DATA)

View File

@ -1,5 +1,9 @@
# This is the src/data/templates level Makefile # This is the src/data/templates level Makefile
pkgdata_DATA := ${wildcard *.tpkg} templates.xml pkgdata_DATA = marble.tpkg \
pink_marble.tpkg \
pkgdatadir = ${datadir}/@PACKAGE@/data/templates sepia.tpkg \
EXTRA_DIST = ${pkgdata_DATA} sky_border.tpkg \
templates.xml
pkgdatadir = $(datadir)/@PACKAGE@/data/templates
EXTRA_DIST = $(pkgdata_DATA)

View File

@ -18,3 +18,9 @@ pkgpython_PYTHON = \
pkgpyexecdir = @pkgpyexecdir@/docgen pkgpyexecdir = @pkgpyexecdir@/docgen
pkgpythondir = @pkgpythondir@/docgen pkgpythondir = @pkgpythondir@/docgen
GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));

View File

@ -23,3 +23,9 @@ pkgpython_PYTHON = \
pkgpyexecdir = @pkgpyexecdir@/filters pkgpyexecdir = @pkgpyexecdir@/filters
pkgpythondir = @pkgpythondir@/filters pkgpythondir = @pkgpythondir@/filters
GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));

View File

@ -1,7 +1,7 @@
# This is the src/plugins level Makefile for Gramps # This is the src/plugins level Makefile for Gramps
# Use GNU make's ':=' syntax for nice wildcard use. # We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually # If not using GNU make, then list all .py files individually
pkgpython_PYTHON = \ pkgpython_PYTHON = \
AncestorChart.py\ AncestorChart.py\
AncestorReport.py\ AncestorReport.py\
@ -51,8 +51,12 @@ GLADEFILES = \
summary.glade\ summary.glade\
verify.glade verify.glade
pkgdatadir = ${datadir}/@PACKAGE@/plugins pkgdatadir = $(datadir)/@PACKAGE@/plugins
pkgdata_DATA = ${GLADEFILES} dist_pkgdata_DATA = $(GLADEFILES)
dist_pkgdata_DATA = ${pkgdata_DATA}
GRAMPS_PY_MODPATH = "../:../docgen"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));

View File

@ -1,23 +1,23 @@
# This is the src/po level Makefile configuration # This is the src/po level Makefile configuration
EXTRA_DIST = ${POFILES} EXTRA_DIST = $(POFILES) template.po
CLEANFILES = ${MOFILES} CLEANFILES = $(MOFILES)
all: ${MOFILES} all-local: $(MOFILES)
install-data-local: install-data-local:
for lang in ${LANGUAGES}; do \ for lang in $(LANGUAGES); do \
${INSTALL} -d ${prefix}/share/locale/$$lang; \ $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$lang; \
${INSTALL} -d ${prefix}/share/locale/$$lang/LC_MESSAGES; \ $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
${INSTALL_DATA} $$lang.mo ${prefix}/share/locale/$$lang/LC_MESSAGES/${PACKAGE}.mo; \ $(INSTALL_DATA) $$lang.mo $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done done
uninstall-local: uninstall-local:
for lang in ${LANGUAGES}; do \ for lang in $(LANGUAGES); do \
rm -f ${prefix}/share/locale/$$lang/LC_MESSAGES/gramps.mo; \ rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/gramps.mo; \
done done
SUFFIXES = .po .mo SUFFIXES = .po .mo
.po.mo: .po.mo:
${MSGFMT} -v $< -o $@ $(MSGFMT) -v $< -o $@