| 1 |
# Require automake-1.6 |
|---|
| 2 |
AUTOMAKE_OPTIONS = 1.6 |
|---|
| 3 |
|
|---|
| 4 |
# The definition of 'DIRS' and 'FILES' is defined by 'configure'... |
|---|
| 5 |
# DIRS: The subdirectories that should be added to the distribution. |
|---|
| 6 |
# FILES: The files named 'Files' that contain (Python) files that should be |
|---|
| 7 |
# added to the distribution. |
|---|
| 8 |
|
|---|
| 9 |
SUBDIRS = utils po doc tests |
|---|
| 10 |
|
|---|
| 11 |
bin_SCRIPTS = bin/gaphor |
|---|
| 12 |
|
|---|
| 13 |
EXTRA_DIST = $(FILES) $(FILES_FILES) gaphor.sh bin/gaphor.in gaphor/config.py.in |
|---|
| 14 |
|
|---|
| 15 |
INSTALL_DIRS = $(DIRS) |
|---|
| 16 |
INSTALL_FILES = $(FILES) gaphor/config.py gaphor/UML/modelelements.py |
|---|
| 17 |
|
|---|
| 18 |
GEN_UML = $(top_srcdir)/utils/genUML.py |
|---|
| 19 |
METAMODEL_XMI = $(top_srcdir)/doc/UmlMetaModel.xmi |
|---|
| 20 |
|
|---|
| 21 |
# Makefile depends on the 'Files' files, so we should add them as a dependency |
|---|
| 22 |
# to reconfigure... |
|---|
| 23 |
CONFIG_STATUS_DEPENDENCIES = $(FILES_FILES) |
|---|
| 24 |
|
|---|
| 25 |
all-local: gaphor/UML/modelelements.py |
|---|
| 26 |
|
|---|
| 27 |
gaphor/UML/modelelements.py: $(GEN_UML) $(METAMODEL_XMI) |
|---|
| 28 |
$(GEN_UML) $(METAMODEL_XMI) 2>&1 > genmodelelements.py |
|---|
| 29 |
-echo "We have our own presentation element class (gaphor.UML.Diagram)" |
|---|
| 30 |
grep -v "PresentationElement" genmodelelements.py > gaphor/UML/modelelements.py |
|---|
| 31 |
rm -f genmodelelements.py |
|---|
| 32 |
|
|---|
| 33 |
clean-local: |
|---|
| 34 |
find . -name *.py[co] -exec rm -f {} ';' |
|---|
| 35 |
|
|---|
| 36 |
INSTALLDIR=$(DESTDIR)$(pythondir)/ |
|---|
| 37 |
|
|---|
| 38 |
install-exec-local: |
|---|
| 39 |
for D in $(INSTALL_DIRS); do \ |
|---|
| 40 |
$(mkinstalldirs) $(INSTALLDIR)$$D; \ |
|---|
| 41 |
done; \ |
|---|
| 42 |
for F in $(INSTALL_FILES); do \ |
|---|
| 43 |
echo " $(INSTALL_DATA) $(srcdir)/$$F $(INSTALLDIR)$$F"; \ |
|---|
| 44 |
$(INSTALL_DATA) $(srcdir)/$$F $(INSTALLDIR)$$F; \ |
|---|
| 45 |
done; \ |
|---|
| 46 |
PYTHON=$(PYTHON) $(top_srcdir)/py-compile --basedir $(INSTALLDIR) $(INSTALL_FILES) |
|---|
| 47 |
|
|---|
| 48 |
uninstall-local: |
|---|
| 49 |
for D in $(INSTALL_DIRS); do \ |
|---|
| 50 |
test -d "$(INSTALLDIR)$$D" && rm -rf "$(INSTALLDIR)$$D"; \ |
|---|
| 51 |
done; true |
|---|
| 52 |
|
|---|
| 53 |
.PHONY: release snapshot files-check potfiles.in |
|---|
| 54 |
|
|---|
| 55 |
release: |
|---|
| 56 |
$(MAKE) dist |
|---|
| 57 |
tar zxf $(PACKAGE)-$(VERSION).tar.gz && cd $(PACKAGE)-$(VERSION) && \ |
|---|
| 58 |
./configure --prefix=$(prefix) && make && cd .. && rm -rf $(PACKAGE)-$(VERSION) |
|---|
| 59 |
|
|---|
| 60 |
snapshot: |
|---|
| 61 |
$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"` |
|---|
| 62 |
|
|---|
| 63 |
files-check: |
|---|
| 64 |
@for F in `find gaphor -name '*.py' -o -name '*.png'`; do \ |
|---|
| 65 |
{ echo "$(FILES)" | grep -q "\<$$F\>"; } || echo "Missing file: $$F"; \ |
|---|
| 66 |
done |
|---|
| 67 |
|
|---|
| 68 |
potfiles.in: |
|---|
| 69 |
for L in $(FILES); do \ |
|---|
| 70 |
echo "$$L"; \ |
|---|
| 71 |
done | grep '\.py$$' > $(srcdir)/po/POTFILES.in |
|---|
| 72 |
|
|---|