diff options
-rw-r--r-- | Makefile | 50 |
1 files changed, 26 insertions, 24 deletions
@@ -39,7 +39,9 @@ uzbl-core: ${OBJ} uzbl-browser: uzbl-core -PREFIX?=$(DESTDIR)/usr/local +# packagers, set DESTDIR to your "package directory" and PREFIX to the prefix you want to have on the end-user system +PREFIX?=/usr/local +INSTALLDIR?=$(DESTDIR)$(PREFIX) # the 'tests' target can never be up to date .PHONY: tests @@ -67,10 +69,10 @@ test-dev-browser: uzbl-browser XDG_DATA_HOME=./examples/data XDG_CACHE_HOME=./examples/cache XDG_CONFIG_HOME=./examples/config PATH="`pwd`:$$PATH" ./examples/data/uzbl/scripts/event_manager.py stop -v test-share: uzbl-core - XDG_DATA_HOME=${PREFIX}/share/uzbl/examples/data XDG_CONFIG_HOME=${PREFIX}/share/uzbl/examples/config ./uzbl-core --uri http://www.uzbl.org --verbose + XDG_DATA_HOME=${INSTALLDIR}/share/uzbl/examples/data XDG_CONFIG_HOME=${INSTALLDIR}/share/uzbl/examples/config ./uzbl-core --uri http://www.uzbl.org --verbose test-share-browser: uzbl-browser - XDG_DATA_HOME=${PREFIX}/share/uzbl/examples/data XDG_CONFIG_HOME=${PREFIX}/share/uzbl/examples/config PATH="`pwd`:$$PATH" ./uzbl-browser --uri http://www.uzbl.org --verbose + XDG_DATA_HOME=${INSTALLDIR}/share/uzbl/examples/data XDG_CONFIG_HOME=${INSTALLDIR}/share/uzbl/examples/config PATH="`pwd`:$$PATH" ./uzbl-browser --uri http://www.uzbl.org --verbose clean: rm -f uzbl-core @@ -83,30 +85,30 @@ clean: install: install-uzbl-core install-uzbl-browser install-uzbl-tabbed install-uzbl-core: all - install -d $(PREFIX)/bin - install -d $(PREFIX)/share/uzbl/docs - install -d $(PREFIX)/share/uzbl/examples - cp -rp docs $(PREFIX)/share/uzbl/ - cp -rp config.h $(PREFIX)/share/uzbl/docs/ - cp -rp examples $(PREFIX)/share/uzbl/ - install -m755 uzbl-core $(PREFIX)/bin/uzbl-core - install -m644 AUTHORS $(PREFIX)/share/uzbl/docs - install -m644 README $(PREFIX)/share/uzbl/docs + install -d $(INSTALLDIR)/bin + install -d $(INSTALLDIR)/share/uzbl/docs + install -d $(INSTALLDIR)/share/uzbl/examples + cp -rp docs $(INSTALLDIR)/share/uzbl/ + cp -rp config.h $(INSTALLDIR)/share/uzbl/docs/ + cp -rp examples $(INSTALLDIR)/share/uzbl/ + install -m755 uzbl-core $(INSTALLDIR)/bin/uzbl-core + install -m644 AUTHORS $(INSTALLDIR)/share/uzbl/docs + install -m644 README $(INSTALLDIR)/share/uzbl/docs install-uzbl-browser: all - install -d $(PREFIX)/bin - install -m755 uzbl-browser $(PREFIX)/bin/uzbl-browser - install -m755 examples/data/uzbl/scripts/cookie_daemon.py $(PREFIX)/bin/cookie_daemon.py - install -m755 examples/data/uzbl/scripts/event_manager.py $(PREFIX)/bin/event_manager.py - sed -i 's#^PREFIX=.*#PREFIX=$(PREFIX)#' $(PREFIX)/bin/uzbl-browser - sed -i "s#^PREFIX = None#PREFIX = '$(PREFIX)'#" $(PREFIX)/bin/event_manager.py + install -d $(INSTALLDIR)/bin + install -m755 uzbl-browser $(INSTALLDIR)/bin/uzbl-browser + install -m755 examples/data/uzbl/scripts/cookie_daemon.py $(INSTALLDIR)/bin/cookie_daemon.py + install -m755 examples/data/uzbl/scripts/event_manager.py $(INSTALLDIR)/bin/event_manager.py + sed -i 's#^PREFIX=.*#PREFIX=$(PREFIX)#' $(INSTALLDIR)/bin/uzbl-browser + sed -i "s#^PREFIX = None#PREFIX = '$(PREFIX)'#" $(INSTALLDIR)/bin/event_manager.py install-uzbl-tabbed: all - install -d $(PREFIX)/bin - install -m755 examples/data/uzbl/scripts/uzbl_tabbed.py $(PREFIX)/bin/uzbl-tabbed + install -d $(INSTALLDIR)/bin + install -m755 examples/data/uzbl/scripts/uzbl_tabbed.py $(INSTALLDIR)/bin/uzbl-tabbed uninstall: - rm -rf $(PREFIX)/bin/uzbl-* - rm -rf $(PREFIX)/bin/cookie_daemon.py - rm -rf $(PREFIX)/bin/event_manager.py - rm -rf $(PREFIX)/share/uzbl + rm -rf $(INSTALLDIR)/bin/uzbl-* + rm -rf $(INSTALLDIR)/bin/cookie_daemon.py + rm -rf $(INSTALLDIR)/bin/event_manager.py + rm -rf $(INSTALLDIR)/share/uzbl |