summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2015-01-14 16:19:26 +0100
committerAndreas Politz <politza@hochschule-trier.de>2015-01-14 16:19:26 +0100
commit9cb32950abf61afaf38093871f41e6f7a028234b (patch)
tree131d375a8111b107184d4b73d341ad054178997c /Makefile
parent9b589fe6a1209bd271773a214a73c3d032b5c3ac (diff)
Changed buildsystem.
* Makefile: Let automake handle only the server sources and do the rest by a hand written Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile83
1 files changed, 35 insertions, 48 deletions
diff --git a/Makefile b/Makefile
index abf9d48..c00c49e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,50 +1,37 @@
-SUBDIRS = src tests
-
-LISP_FILES = $(top_srcdir)/lisp/pdf-history.el \
- $(top_srcdir)/lisp/pdf-info.el \
- $(top_srcdir)/lisp/pdf-isearch.el \
- $(top_srcdir)/lisp/pdf-links.el \
- $(top_srcdir)/lisp/pdf-misc.el \
- $(top_srcdir)/lisp/pdf-occur.el \
- $(top_srcdir)/lisp/pdf-outline.el \
- $(top_srcdir)/lisp/pdf-tools.el \
- $(top_srcdir)/lisp/pdf-util.el \
- $(top_srcdir)/lisp/pdf-annot.el \
- $(top_srcdir)/lisp/pdf-sync.el \
- $(top_srcdir)/lisp/pdf-view.el \
- $(top_srcdir)/lisp/pdf-cache.el \
- $(top_srcdir)/lisp/tablist.el \
- $(top_srcdir)/lisp/tablist-filter.el
-
-AUX_FILES = $(top_srcdir)/README.org
-
-# Emacs Lisp Package
-ELP_FILES = $(LISP_FILES) $(AUX_FILES) $(top_builddir)/src/epdfinfo
-ELP_NAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
-ELP_TAR_FILE = $(ELP_NAME).tar
-ELP_TMP_DIR = elp-tmp-dir
-
-EXTRA_DIST = $(LISP_FILES) $(AUX_FILES)
-CLEANFILES = $(ELP_TAR_FILE)
-
-all-local: $(ELP_TAR_FILE)
-
-$(ELP_TAR_FILE): $(LISP_FILES)
- mkdir -p $(ELP_TMP_DIR)/$(ELP_NAME)
- echo "(define-package \"$(PACKAGE_NAME)\" \"$(PACKAGE_VERSION)\" \
- \"Support library for PDF documents.\")" \
- > $(ELP_TMP_DIR)/$(ELP_NAME)/$(PACKAGE_NAME)-pkg.el
- cp -r $(ELP_FILES) -t $(ELP_TMP_DIR)/$(ELP_NAME)/
- cd $(ELP_TMP_DIR) && \
- tar cf ../$(ELP_TAR_FILE) $(ELP_NAME)
- rm -rf -- $(ELP_TMP_DIR)
-
-install-package: all $(ELP_TAR_FILE)
- if ! which -- "$(EMACS)"; then \
- echo "No emacs executable found, you have to set EMACS"; \
- false; \
- fi
- $(EMACS) -Q --batch --eval "(package-install-file \
- \"$$PWD/$(ELP_TAR_FILE)\")"
+# elpa-* targets are supposed to be only invoked from a elpa
+# installation.
+
+.PHONY: all clean elpa-check elpa-all
+
+all: server/epdfinfo
+
+clean:
+ rm -rf dist
+ $(MAKE) -C server clean
+distclean: clean
+ [ -f server/Makefile ] && $(MAKE) -C server distclean
+package: all
+ cask package
+
+server/epdfinfo: server/Makefile
+ $(MAKE) -C server
+server/Makefile: server/configure
+ cd server && ./configure -q
+server/configure: server/configure.ac
+ cd server && ./autogen.sh
+
+elpa-all: all
+ cp -p server/epdfinfo .
+ $(MAKE) elpa-check
+ $(MAKE) distclean
+
+elpa-check:
+ @if [ -x epdfinfo ]; then \
+ echo "Server successfully build."; \
+ else \
+ echo "Server not build, maybe due to missing dependencies (See README)."; \
+ echo "Required: g++ make automake autoconf libpng-dev libz-dev libpoppler-glib-dev libpoppler-private-dev"; \
+ false; \
+ fi