some mk fixes for unix/home

This commit is contained in:
Kai Tetzlaff 2012-08-02 09:01:47 +02:00
parent 33d35ac937
commit 84bfa93de9
4 changed files with 24 additions and 15 deletions

View File

@ -17,16 +17,18 @@ ifeq (cygwin,$(HOSTENV))
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)
ifdef fixpath-emacs
emacspath = $(foreach f,$(1),$(call fixpath-emacs,$(f)))
else
fixpath-emacs = $(1)
emacspath = $(1)
endif
#SHELL := sh.exe -x
#$(error E:$(EMACS))
#$(error '$(value fixpath-emacs)' '$(value emacspath)')
DOT_DIR := $(HOME)/.emacs.d
ELISP_DIR := $(DOT_DIR)/elisp-vcs

View File

@ -5,7 +5,11 @@
"$(MAKE)" -C $* $(@F)
%.elc : %.el
"$(EMACS)" -batch -q -no-site-file\
$(addprefix -L ,$(LOAD_PATH))\
$(EMACSFLAGS)\
"$(EMACS)"\
--eval '(setq vc-handled-backends nil)' -batch -q -no-site-file\
$(addprefix -L ,$(LOAD_PATH)) $(EMACSFLAGS)\
-f batch-byte-compile $(call emacspath,$?)
# Local Variables:
# tab-width: 2
# End:

View File

@ -4,7 +4,7 @@ HAS_UTIL_MK := T
MK_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
# define the $(\n) macro which has the value '\n'
# Note: This really requires two empty lines!
# Nonoerrte: This really requires two empty lines!
ifndef \n
define \n
@ -83,11 +83,13 @@ ifneq (,$(or $(ComSpec),$(COMSPEC),$(comspec)))
$(subst $(sp),?,$(shell cygpath $(call fixpath-cyg,$(1)))))
else
HOSTENV := w32
DIRSEP := $(strip \)
NULL := nul
fixpath-make = $(subst \,/,$(subst $(sp),?,$(1)))
endif
endif
HOSTENV ?= unix
DIRSEP ?= /
SHQ ?= $(if T,\)
fixpath-make ?= $(1)
@ -95,6 +97,7 @@ fixpath-shell ?= $(1)
TEST := test
RD ?= rm -rf
RM ?= rm -f
NULL ?= $(or $(wildcard /dev/null),nul)

10
vcs.mk
View File

@ -49,7 +49,7 @@ eval-vcs-template =\
define HG_TMPL
DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(URL_FILTERS),$2))
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: pull-$1
updaterepos: pull-$1
subrepos: $1/.hg
@ -75,7 +75,7 @@ endef
define SVN_TMPL
DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(URL_FILTERS),$2))
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: up-$1
updaterepos: up-$1
ifneq (,$(filter http:% https:%,$2))
@ -107,7 +107,7 @@ endef
define CVS_TMPL
DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(URL_FILTERS),$2))
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: up-$1
updaterepos: up-$1
.PHONY: $1/CVS
@ -132,7 +132,7 @@ endef
define GIT_TMPL
DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(URL_FILTERS),$2))
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: pull-$1
updaterepos: pull-$1
ifneq (,$(filter http:% https:%,$2))
@ -164,7 +164,7 @@ endef
define BZR_TMPL
DIR-$(notdir $1) := $1
ifeq (,$(filter-out $(URL_FILTERS),$2))
ifeq (,$(filter-out $(or $(URL_FILTERS),%),$2))
.PHONY: pull-$1
updaterepos: pull-$1
ifneq (,$(filter http:% https:%,$2))