Hello,
With the following construct, then you can have a specific behaviour for
MSYS only.
ifeq ($(OSTYPE),msys)
cur_dir=$(shell pwd -W | sed 's!/!\\\\!g')
else
cur_dir=$(CURDIR)
endif
Indeed, I need to check whether the issue still happens with latest
version of EMACS --- maybe it behaves as MSYS application when OSTYPE is
set, which would remove any need to tamper with the makefile.
Vincent.
# Cheap BBDB makefile -*- Makefile -*-
# Copyright (C) 2010-2014 Roland Winkler <wink...@gnu.org>
#
# This file is part of the Insidious Big Brother Database (aka BBDB),
#
# BBDB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BBDB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BBDB. If not, see <http://www.gnu.org/licenses/>.
### Commentary:
# This file provides a cheap workaround for (most of) those users
# who like to use the latest BBDB, but do not have autotools installed.
# This file can compile BBDB's lisp code on most systems. Yet it is not
# intended to be foolproof!
# For building under MSYS export OSTYPE to msys
ifeq ($(OSTYPE),msys)
cur_dir=$(shell pwd -W | sed 's!/!\\\\!g')
else
cur_dir=$(CURDIR)
endif
srcdir = .
prefix = /usr/local
lispdir = $(DESTDIR)/usr/local/share/emacs/site-lisp/bbdb
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
RM = /bin/rm -f
LN_S = /bin/ln -s
CP = /bin/cp
EMACS = emacs
# Command line flags for Emacs.
EMACSOPT =
# The actual Emacs command run in the targets below.
emacs = LC_ALL=C $(EMACS) --batch --directory=./ $(EMACSOPT)
# If you want to use BBDB with VM this should point to your vm/lisp directory.
# See also the target all below.
VMDIR =
VM = -eval '(unless (string-match "$(VMDIR)" "") (push "$(VMDIR)" load-path))'
.SUFFIXES: .elc .el .tar .Z .gz .uu
SRCS = bbdb.el bbdb-site.el bbdb-com.el bbdb-print.el bbdb-anniv.el \
bbdb-migrate.el bbdb-snarf.el \
bbdb-mua.el bbdb-message.el bbdb-rmail.el \
bbdb-gnus.el bbdb-mhe.el bbdb-vm.el bbdb-pgp.el bbdb-sc.el \
bbdb-ispell.el
# ELC = $(patsubst %.el,%.elc,$(SRCS)) # GNU Make
ELC = bbdb.elc bbdb-site.elc bbdb-com.elc bbdb-print.elc bbdb-anniv.elc \
bbdb-migrate.elc bbdb-snarf.elc \
bbdb-mua.elc bbdb-message.elc bbdb-rmail.elc \
bbdb-gnus.elc bbdb-mhe.elc bbdb-pgp.elc bbdb-sc.elc \
bbdb-ispell.elc
all: bbdb-loaddefs.el bbdb
bbdb: bbdb-loaddefs.el $(ELC)
vm: bbdb-vm.elc
bbdb-loaddefs.el: $(SRCS)
# 2011-12-11: We switched from bbdb-autoloads.el to bbdb-loaddefs.el.
# If the user still has an old bbdb-autoloads.el in the BBDB
# lisp directory (and keeps loading it from the emacs init file),
# we might get strange error messages that things fail.
# So we throw an error if these old files are found.
$(info curdir=$(cur_dir))
@if test -f bbdb-autoloads.el -o -f bbdb-autoloads.elc; then \
(echo "*** ERROR: Old file(s) \`bbdb-autoloads.el(c)' found ***" ; \
echo "*** Delete these files; do not load them from your init file
***") && \
false ; \
fi
-$(RM) $@;
@echo "(provide 'bbdb-loaddefs)" > $@;
@echo "(if (and load-file-name (file-name-directory load-file-name))"
>> $@;
@echo " (add-to-list 'load-path (file-name-directory
load-file-name)))" >> $@;
@echo "" >> $@;
# Generated autoload-file must have an absolute path,
# $(srcdir) can be relative.
$(info xxx=$(cur_dir))
$(emacs) -l autoload \
--eval '(setq generated-autoload-file "$(cur_dir)\\$@")' \
--eval '(setq make-backup-files nil)' \
-f batch-update-autoloads "$(cur_dir)"
.PHONY: no-bbdb-loaddefs
no-bbdb-loaddefs:
.el.elc:
$(emacs) -f batch-byte-compile $<
# Not perfect, but better than nothing: If we do not have / do not use
# autotools, we simply copy bbdb-site.el.in to bbdb-site.el.
bbdb-site.el: bbdb-site.el.in
$(CP) $< $@
bbdb-site.elc: bbdb-site.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb.elc: bbdb.el bbdb-site.elc
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-com.elc: bbdb.elc bbdb-com.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-mua.elc: bbdb.elc bbdb-com.elc bbdb-mua.el
$(emacs) -eval '(unless (string= "$(VMDIR)" "") (push "$(VMDIR)"
load-path) (load "vm" t t))' \
-f batch-byte-compile $(@:.elc=.el)
bbdb-rmail.elc: bbdb.elc bbdb-com.elc bbdb-mua.elc bbdb-rmail.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-gnus.elc: bbdb.elc bbdb-com.elc bbdb-mua.elc bbdb-gnus.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-mhe.elc: bbdb.elc bbdb-com.elc bbdb-mua.elc bbdb-mhe.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
# VM is not part of GNU Emacs
bbdb-vm.elc: bbdb.elc bbdb-com.elc bbdb-mua.elc bbdb-vm.el
$(emacs) $(VM) -f batch-byte-compile $(@:.elc=.el)
bbdb-sc.elc: bbdb.elc bbdb-com.elc bbdb-mua.elc bbdb-sc.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-print.elc: bbdb.elc bbdb-com.elc bbdb-print.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-migrate.elc: bbdb.elc bbdb-migrate.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-anniv.elc: bbdb.elc bbdb-com.elc bbdb-anniv.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-ispell.elc: bbdb.elc bbdb-ispell.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
bbdb-snarf.elc: bbdb.elc bbdb-com.elc bbdb-snarf.el
$(emacs) -f batch-byte-compile $(@:.elc=.el)
install-el: all
$(INSTALL) -d -m 0755 "$(lispdir)/"
for elc in *.elc; do \
el=`basename $$elc c`; \
if test -f "$(srcdir)/$$el"; then \
echo "Install $$el in $(lispdir)/"; \
$(INSTALL_DATA) "${srcdir}/$$el" "$(lispdir)/"; \
fi; \
done;
for el in bbdb-loaddefs.el; do \
echo "Install $$el in $(lispdir)/"; \
$(INSTALL_DATA) $$el "$(lispdir)/"; \
done;
install-elc: all
$(INSTALL) -d -m 0755 "$(lispdir)/"
for elc in bbdb-loaddefs.el *.elc; do \
echo "Install $$elc in $(lispdir)/"; \
$(INSTALL_DATA) $$elc "$(lispdir)/"; \
done;
uninstall:
for elc in *.elc; do \
$(RM) "$(lispdir)/$$elc"; \
done
for el in *.el; do \
$(RM) "$(lispdir)/$$el"; \
done
# Assorted clean-up targets
clean:
-$(RM) bbdb*.elc TAGS
distclean: clean
maintainer-clean: distclean
-$(RM) bbdb-loaddefs.el # Generated file
-$(RM) Makefile
extraclean: maintainer-clean
-$(RM) *~ \#*
TAGS: $(SRCS)
etags $(SRCS)
----------------------------------------
> Date: Sat, 4 Jan 2014 10:57:06 -0600
> From: wink...@gnu.org
> To: vincent....@hotmail.fr
> CC: bbdb-info@lists.sourceforge.net
> Subject: RE: [BBDB] ChangeLog 2014-01-03
>
> On Sat Jan 4 2014 Vincent Belaïche wrote:
> > Since this is some temporary makefile, a work-around is attached
> > hereinafter:
>
> How reliably does this patch work on other systems? I am hesitant
> to use such patches for this file if they might break things for
> other systems.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/