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 EMACS_CYGWIN := emacs
fixpath-emacs = $(subst $(sp),?,$(shell cygpath -ma $(call fixpath-cyg,$(1)))) fixpath-emacs = $(subst $(sp),?,$(shell cygpath -ma $(call fixpath-cyg,$(1))))
endif endif
else
fixpath-emacs = $(subst /,\\\\,$(shell cd $(1)&&pwd -W))
endif endif
fixpath-emacs ?= $(1) ifdef fixpath-emacs
emacspath = $(foreach f,$(1),$(call fixpath-emacs,$(f)))
emacspath = $(foreach f,$(1),$(call fixpath-emacs,$(f))) else
fixpath-emacs = $(1)
emacspath = $(1)
endif
#SHELL := sh.exe -x #SHELL := sh.exe -x
#$(error E:$(EMACS)) #$(error E:$(EMACS))
#$(error '$(value fixpath-emacs)' '$(value emacspath)')
DOT_DIR := $(HOME)/.emacs.d DOT_DIR := $(HOME)/.emacs.d
ELISP_DIR := $(DOT_DIR)/elisp-vcs ELISP_DIR := $(DOT_DIR)/elisp-vcs

View File

@ -5,7 +5,11 @@
"$(MAKE)" -C $* $(@F) "$(MAKE)" -C $* $(@F)
%.elc : %.el %.elc : %.el
"$(EMACS)" -batch -q -no-site-file\ "$(EMACS)"\
$(addprefix -L ,$(LOAD_PATH))\ --eval '(setq vc-handled-backends nil)' -batch -q -no-site-file\
$(EMACSFLAGS)\ $(addprefix -L ,$(LOAD_PATH)) $(EMACSFLAGS)\
-f batch-byte-compile $(call emacspath,$?) -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)))) MK_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
# define the $(\n) macro which has the value '\n' # 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 ifndef \n
define \n define \n
@ -83,11 +83,13 @@ ifneq (,$(or $(ComSpec),$(COMSPEC),$(comspec)))
$(subst $(sp),?,$(shell cygpath $(call fixpath-cyg,$(1))))) $(subst $(sp),?,$(shell cygpath $(call fixpath-cyg,$(1)))))
else else
HOSTENV := w32 HOSTENV := w32
DIRSEP := $(strip \)
NULL := nul NULL := nul
fixpath-make = $(subst \,/,$(subst $(sp),?,$(1))) fixpath-make = $(subst \,/,$(subst $(sp),?,$(1)))
endif endif
endif endif
HOSTENV ?= unix
DIRSEP ?= / DIRSEP ?= /
SHQ ?= $(if T,\) SHQ ?= $(if T,\)
fixpath-make ?= $(1) fixpath-make ?= $(1)
@ -95,6 +97,7 @@ fixpath-shell ?= $(1)
TEST := test TEST := test
RD ?= rm -rf RD ?= rm -rf
RM ?= rm -f
NULL ?= $(or $(wildcard /dev/null),nul) NULL ?= $(or $(wildcard /dev/null),nul)

10
vcs.mk
View File

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