# Obey standard Autotools installation directories
DESTDIR        =
PREFIX         = /usr/local
EPREFIX        = ${PREFIX}
BINDIR         = ${EPREFIX}/bin
SBINDIR        = ${EPREFIX}/sbin
LIBEXECDIR     = ${EPREFIX}/libexec
DATADIR        = ${PREFIX}/share
SYSCONFDIR     = ${PREFIX}/etc
SHAREDSTATEDIR = ${PREFIX}/com
LOCALSTATEDIR  = ${PREFIX}/var
LIBDIR         = ${EPREFIX}/lib
INCLUDEDIR     = ${PREFIX}/include
OLDINCLUDEDIR  = /usr/include
INFODIR        = ${PREFIX}/info
MANDIR         = ${PREFIX}/man
MANSECTION=1

WISH_NAME = Wish Shell
WISH_APP = /System/Library/Frameworks/Tk.framework/Resources/$(WISH_NAME).app/Contents
REDET_APP = Redet.app/Contents
macosx_app: redet.tcl
	install -d "$(REDET_APP)/MacOS"
	install -p "$(WISH_APP)/MacOS/$(WISH_NAME)" $(REDET_APP)/MacOS/Redet
	install -d $(REDET_APP)/Resources
	install -p "$(WISH_APP)/Resources/$(WISH_NAME).rsrc" $(REDET_APP)/Resources
	install -d $(REDET_APP)/Resources/Scripts
	install -p -m0644 redet.tcl $(REDET_APP)/Resources/Scripts/AppMain.tcl
#	install -m0644 -p Info.plist $(REDET_APP)
#if you want an App icon
#	install -m0644 -p *.icns  "$(REDET_APP)/Resources"

macosx_app_clean:
	-rm -f -- $(REDET_APP)/MacOS/Redet
	-rmdir -- $(REDET_APP)/MacOS
	-rm -f -- $(REDET_APP)/Resources/Scripts/AppMain.tcl
	-rmdir -- $(REDET_APP)/Resources/Scripts
	-rm -f -- "$(REDET_APP)/Resources/$(WISH_NAME).rsrc"
	-rmdir -- $(REDET_APP)/Resources/
	-rmdir -- $(REDET_APP)
	-rmdir -- Redet.app

 
install:	redet.tcl
		install -p -D redet.tcl ${DESTDIR}${BINDIR}/redet
		install -p -D -m 0644 redet.${MANSECTION} \
		 ${DESTDIR}${MANDIR}/man${MANSECTION}/redet.${MANSECTION}

install_manual:
		for i in `find Manual/ -type f`; do \
		 install -D $$i ${DESTDIR}${DATADIR}/Redet/$$i; \
		done
 
TAGS:	redet.tcl



