Blob Blame History Raw
--- mathomatic-15.5.0/makefile.orig	2011-03-05 22:06:31.000000000 +0100
+++ mathomatic-15.5.0/makefile	2011-03-05 22:07:40.000000000 +0100
@@ -37,6 +37,7 @@
 mandir		?= $(prefix)/share/man
 docdir		?= $(prefix)/share/doc
 mathdocdir	?= $(docdir)/mathomatic
+datadir		?= $(prefix)/share/mathomatic
 
 # Mathomatic program names (can be changed):
 AOUT		?= mathomatic
@@ -143,7 +144,7 @@
 	echo '#' >>$(M4SCRIPTPATH)
 	echo '# Usage: $(M4SCRIPTNAME) [ input_files ]' >>$(M4SCRIPTPATH)
 	echo >>$(M4SCRIPTPATH)
-	echo 'm4 -eP -- $(mathdocdir)/m4/functions.m4 "$$@" - | mathomatic -ru -s-1' >>$(M4SCRIPTPATH)
+	echo 'm4 -eP -- $(datadir)/m4/functions.m4 "$$@" - | mathomatic -ru -s-1' >>$(M4SCRIPTPATH)
 	chmod 0755 $(M4SCRIPTPATH)
 	$(INSTALL_PROGRAM) m4/rmath $(DESTDIR)$(bindir)
 	$(INSTALL_DATA) rmath.1 $(DESTDIR)$(mandir)/man1
@@ -153,7 +154,7 @@
 
 # Install m4 Mathomatic with trig functions that use degree units, instead of radians.
 m4install-degrees: m4install
-	cat m4/degrees.m4 >>$(DESTDIR)$(mathdocdir)/m4/functions.m4
+	cat m4/degrees.m4 >>$(DESTDIR)$(datadir)/m4/functions.m4
 	@echo Degree mode installed.
 
 # Install the binaries and documentation.
@@ -172,6 +173,7 @@
 
 bininstall:
 	$(INSTALL) -d $(DESTDIR)$(bindir)
+	$(INSTALL) -d $(DESTDIR)$(datadir)/m4
 	$(INSTALL) -d $(DESTDIR)$(prefix)/share/applications
 	$(INSTALL) -d $(DESTDIR)$(prefix)/share/pixmaps
 	$(INSTALL) -d $(DESTDIR)$(mandir)/man1