From 6de03f396105ba4838774b8a191325cb7f500791 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Tue, 6 Jul 2010 06:56:32 +0000 Subject: DESTDIR problem fixed in Makefile. Thanks gapan. fixed #1579 --- Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index af88282d..9705bce8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ prefix=/usr/local -LIBDIR=$(DESTDIR)$(prefix)/lib -BINDIR=$(DESTDIR)$(prefix)/bin -DATADIR=$(DESTDIR)$(prefix)/share +LIBDIR=$(prefix)/lib +BINDIR=$(prefix)/bin +DATADIR=$(prefix)/share LOCALEDIR=$(DATADIR)/locale MANDIR=$(DATADIR)/man INSTALL=install @@ -12,22 +12,23 @@ all: clean: Makefile install: - $(INSTALL) -d $(LOCALEDIR) $(BINDIR) $(DATADIR)/poezio $(DATADIR)/poezio/data $(DATADIR)/poezio/src $(DATADIR)/poezio/src/ + mkdir -p $(DESTDIR) + $(INSTALL) -d $(DESTDIR)$(LOCALEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)/poezio $(DESTDIR)$(DATADIR)/poezio/data $(DESTDIR)$(DATADIR)/poezio/src $(DESTDIR)$(DATADIR)/poezio/src/ $(DESTDIR)$(DATADIR)/poezio/src/xmpp - $(INSTALL) -m644 data/* $(DATADIR)/poezio/data/ + $(INSTALL) -m644 data/* $(DESTDIR)$(DATADIR)/poezio/data/ - for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py'` ; do \ - $(INSTALL) -m644 $$sourcefile $(DATADIR)/poezio/src; \ + for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py` ; do \ + $(INSTALL) -m644 $$sourcefile $(DESTDIR)$(DATADIR)/poezio/src; \ done - $(INSTALL) -m644 src/xmpp/* $(DATADIR)/poezio/src/xmpp/ + $(INSTALL) -m644 src/xmpp/* $(DESTDIR)$(DATADIR)/poezio/src/xmpp/ - echo "#!/usr/bin/env sh" > $(BINDIR)/poezio - echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(BINDIR)/poezio - chmod 755 $(BINDIR)/poezio + echo "#!/usr/bin/env sh" > $(DESTDIR)$(BINDIR)/poezio + echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(DESTDIR)$(BINDIR)/poezio + chmod 755 $(DESTDIR)$(BINDIR)/poezio uninstall: - rm -f $(BINDIR)/poezio - rm -rf $(DATADIR)/poezio + rm -f $(DESTDIR)$(BINDIR)/poezio + rm -rf $(DESTDIR)$(DATADIR)/poezio pot: xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot -- cgit v1.2.3