--- Makefile.dynamic.in	2009-03-25 10:22:25.000000000 -0400
+++ Makefile.dynamic.in	2009-03-25 10:27:57.000000000 -0400
@@ -10,6 +10,7 @@
 docdir = $(prefix)/share/doc/fontforge
 localedir = $(prefix)/share/locale
 pythondir = $(sharedir)/python
+applicationsdir = /Applications
 
 srcdir = @srcdir@
 top_builddir = .
@@ -127,8 +128,7 @@
 # You may need to be root to do the install
 #explicit use of sh to make sure we don't invoke csh with different "if" syntax
 	sh -c "if test -d $(srcdir)/htdocs >/dev/null ; then $(MAKE) install_docs ; fi"
-	sh -c "if test -d fontforge/FontForge.app >/dev/null ; then rm -rf /Applications/FontForge.app ; mv fontforge/FontForge.app /Applications ; ln -s /usr/local/bin/fontforge /Applications/FontForge.app/Contents/MacOS/FontForge ; fi"
-	sh < systemspecific
+	sh -c "if test -d fontforge/FontForge.app >/dev/null ; then mkdir -p $(DESTDIR)$(applicationsdir) ; mv fontforge/FontForge.app $(DESTDIR)$(applicationsdir) ; ln -sf $(bindir)/fontforge $(DESTDIR)$(applicationsdir)/FontForge.app/Contents/MacOS/FontForge ; fi"
 #we don't always create a setup.py
 	-(cd pyhook ; if test -r setup.py ; then python setup.py install --prefix=$(prefix) --root=$(DESTDIR); for dir in * ; do if test -d $$dir -a "$$dir" != "CVS" ; then  rm -rf $$dir ; fi; done ; fi )
 
@@ -136,8 +136,7 @@
 # You may need to be root to do the install
 #explicit use of sh to make sure we don't invoke csh with different "if" syntax
 	sh -c "if test -d $(srcdir)/htdocs >/dev/null ; then $(MAKE) install_docs ; for dir in * ; do if test -d $$dir ; then  rm -rf $$dir ; fi; done ; fi"
-	sh -c "if test -d fontforge/FontForge.app >/dev/null ; then rm -rf /Applications/FontForge.app ; mv fontforge/FontForge.app /Applications ; ln -s /usr/local/bin/fontforge /Applications/FontForge.app/Contents/MacOS/FontForge ; fi"
-	sh < systemspecific
+	sh -c "if test -d fontforge/FontForge.app >/dev/null ; then mkdir -p $(DESTDIR)$(applicationsdir) ; mv fontforge/FontForge.app $(DESTDIR)$(applicationsdir) ; ln -s $(bindir)/fontforge $(DESTDIR)$(applicationsdir)/FontForge.app/Contents/MacOS/FontForge ; fi"
 	-(cd pyhook ; python setup.py bdist --formats=gztar ; cp dist/fontforge-*.tar.gz $(DESTDIR)/tmp; for dir in * ; do if test -d $$dir -a "$$dir" != "CVS" ; then  rm -rf $$dir ; fi; done )
 
 install_gtk: fontforgegtk
