mk/emacsd-defs.mk
Kai Tetzlaff (R&S) 33d35ac937 update mk
2012-08-01 20:13:59 +02:00

52 lines
1.3 KiB
Makefile

ifndef HAS_UTIL_MK
include $(HOME)/Documents/mk/util.mk
endif
EMACS_OSX := $(wildcard $(HOME)/Work/oss/build/osx/clang/64/dbg/emacs-new/nextstep/Emacs.app/Contents/MacOS/Emacs)
EMACS_W32 :=\
$(subst ?,$(sp),$(firstword\
$(subst $(sp),?,$(wildcard $(call fixpath-make,$(ProgramW6432)/emacs/bin/emacs.exe)))\
$(subst $(sp),?,$(wildcard $(call fixpath-make,$(ProgramFiles$(oparen)x86$(cparen))/emacs/bin/emacs.exe)))\
$(subst $(sp),?,$(wildcard $(call fixpath-make,$(ProgramFiles)/emacs/bin/emacs.exe)))))
EMACS := $(or $(EMACS_OSX),$(EMACS_W32),emacs)
ifeq (cygwin,$(HOSTENV))
ifneq (,$(findstring emacs/bin/emacs.exe,$(EMACS)))
EMACS_CYGWIN := emacs
fixpath-emacs = $(subst $(sp),?,$(shell cygpath -ma $(call fixpath-cyg,$(1))))
endif
else
fixpath-emacs = $(subst /,\\\\,$(shell cd $(1)&&pwd -W))
endif
fixpath-emacs ?= $(1)
emacspath = $(foreach f,$(1),$(call fixpath-emacs,$(f)))
#SHELL := sh.exe -x
#$(error E:$(EMACS))
DOT_DIR := $(HOME)/.emacs.d
ELISP_DIR := $(DOT_DIR)/elisp-vcs
LISP_DIR := $(DOT_DIR)/lisp
INFO_DIR := $(DOT_DIR)/info
BIN_DIR := $(firstword $(wildcard $(HOME)/bin $(HOME)/Tools))
MAKEINFO := makeinfo
TEXI2DVI := texi2dvi
PS2PDF := ps2pdf
DVIPDFM := dvipdfm
CEDET_HOME := $(LISP_DIR)/cedet
#$(error '$(call emacspath,.)')
#$(error fixpath: '$(call fixpath,$(HOME))')
# Local Variables:
# tab-width: 2
# End: