RE: Patch to makefile-temp

2014-07-04 Thread Vincent Belaïche
FYI I have made a trial with a close to latest version of EMACS and that does 
not change what I get.

  Vincent.


> From: vincent@hotmail.fr
> To: ba...@cs.nuim.ie
> Subject: RE: Patch to makefile-temp
> Date: Wed, 4 Jun 2014 17:07:54 +0200
> CC: bbdb-info@lists.sourceforge.net
>
> Just to say that replacing `pwd` by $(CURDIR) and using mingw32-make does not 
> make it either, I still have that:
>
> LC_ALL=C c:/Programme/GNU/Emacs_build20130408/bin/emacs.exe --batch 
> --directory=./  -l autoload \
> --eval '(setq generated-autoload-file 
> "c:/Programme/GNU/installation/bbdb-git/bbdb/lisp/bbdb-loaddefs.el")' \
> --eval '(setq make-backup-files nil)' \
> -f batch-update-autoloads c:/Programme/GNU/installation/bbdb-git/bbdb/lisp
> Generating autoloads for ../../../../bbdb-git/bbdb/lisp/bbdb-loaddefs.el...
> Generating autoloads for 
> ../../../../bbdb-git/bbdb/lisp/bbdb-loaddefs.el...done
> Saving file 
> c:/Programme/GNU/installation/emacs-install/emacs/trunk/lisp/c;c:msys.0ProgrammeGNUinstallatiobdb-gibdblisbdb-loaddefs.el...
>
> that is to say
>
> c:/Programme/GNU/installation/bbdb-git/bbdb/lisp/bbdb-loaddefs.el
>
> is expanded for some reason by my EMACS version into
>
> c:/Programme/GNU/installation/emacs-install/emacs/trunk/lisp/c;c:msys.0ProgrammeGNUinstallatiobdb-gibdblisbdb-loaddefs.el
>
> I do not know why this happens and whether that would still happen with the 
> latest version of EMACS. Maybe this is due to my using a non releast EMACS 
> --- one that was built from repo one year or so ago.
>
> VBR,
>Vincent.
>
>
> --------
>> From: vincent@hotmail.fr
>> To: ba...@cs.nuim.ie
>> CC: bbdb-info@lists.sourceforge.net
>> Subject: RE: Patch to makefile-temp
>> Date: Wed, 4 Jun 2014 15:24:38 +0200
>>
>> That has not to do with autoload tools, but with not using them. The 
>> makefile-temp is not automatically generated by autoload tools, it is a 
>> plain makefile that does not work in all cases --- at least it does not work 
>> on MSWindows XP as far as I can say.
>>
>> I was proposing a fix which I had done for myself, while trying to keep 
>> backward compatibility, but it seems that this fix is too complex, I do not 
>> argue. The best way would anyway have been to use autoload --- or some other 
>> build system that is platform independent (EDE ?). Or maybe there can be 
>> alternative fixes simpler than what I had put forward (using mingw32-make 
>> instead of msys make and $(CURDIR) instead of `pwd` would probably make it, 
>> but I did not try...)
>>
>> Vincent.
>>
>> 
>>> Date: Wed, 4 Jun 2014 11:29:38 +0100
>>> Subject: Re: Patch to makefile-temp
>>> From: ba...@cs.nuim.ie
>>> To: vincent@hotmail.fr
>>> CC: bbdb-info@lists.sourceforge.net
>>>
>>> If the autotools-based stuff doesn't work on MSWindows, please report
>>> the details.
>>> That would be a bug, and we should be able to fix it, because
>>> autotools-generated
>>> scripts are intended to work in that environment (given an installed
>>> bourne-compatible
>>> shell, and make), and they are doing nothing fancy here.
>>>
>>> If it is an issue of various support programs being necessary (texinfo 
>>> stuff,
>>> for example), we could try to add options like ./configure 
>>> --disable-texinfo or
>>> such, and default them to "off" if the support programs are unavailable.
>>>
>>> If it is a problem with filenames, that could probably be fixed with 
>>> appropriate
>>> machinations. Is it having trouble finding the Emacs executable? That would
>>> be a bug in some m4 macros. Anyway, we should arrange things so autotools
>>> works on MSWindows.
>>>
>>> --Barak.
>>
>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> ___
> bbdb-info@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bbdb-info
> BBDB Home Page: http://bbdb.sourceforge.net/
  
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


RE: Patch to makefile-temp

2014-06-04 Thread Vincent Belaïche
Just to say that replacing `pwd` by $(CURDIR) and using mingw32-make does not 
make it either, I still have that:

LC_ALL=C c:/Programme/GNU/Emacs_build20130408/bin/emacs.exe --batch 
--directory=./  -l autoload \
    --eval '(setq generated-autoload-file 
"c:/Programme/GNU/installation/bbdb-git/bbdb/lisp/bbdb-loaddefs.el")' \
    --eval '(setq make-backup-files nil)' \
    -f batch-update-autoloads c:/Programme/GNU/installation/bbdb-git/bbdb/lisp
Generating autoloads for ../../../../bbdb-git/bbdb/lisp/bbdb-loaddefs.el...
Generating autoloads for ../../../../bbdb-git/bbdb/lisp/bbdb-loaddefs.el...done
Saving file 
c:/Programme/GNU/installation/emacs-install/emacs/trunk/lisp/c;c:msys.0ProgrammeGNUinstallatiobdb-gibdblisbdb-loaddefs.el...

that is to say

c:/Programme/GNU/installation/bbdb-git/bbdb/lisp/bbdb-loaddefs.el

is expanded for some reason by my EMACS version into 

c:/Programme/GNU/installation/emacs-install/emacs/trunk/lisp/c;c:msys.0ProgrammeGNUinstallatiobdb-gibdblisbdb-loaddefs.el

I do not know why this happens and whether that would still happen with the 
latest version of EMACS. Maybe this is due to my using a non releast EMACS --- 
one that was built from repo one year or so ago.

VBR,
   Vincent.



> From: vincent@hotmail.fr
> To: ba...@cs.nuim.ie
> CC: bbdb-info@lists.sourceforge.net
> Subject: RE: Patch to makefile-temp
> Date: Wed, 4 Jun 2014 15:24:38 +0200
>
> That has not to do with autoload tools, but with not using them. The 
> makefile-temp is not automatically generated by autoload tools, it is a plain 
> makefile that does not work in all cases --- at least it does not work on 
> MSWindows XP as far as I can say.
>
> I was proposing a fix which I had done for myself, while trying to keep 
> backward compatibility, but it seems that this fix is too complex, I do not 
> argue. The best way would anyway have been to use autoload --- or some other 
> build system that is platform independent (EDE ?). Or maybe there can be 
> alternative fixes simpler than what I had put forward (using mingw32-make 
> instead of msys make and $(CURDIR) instead of `pwd` would probably make it, 
> but I did not try...)
>
>   Vincent.
>
> --------
>> Date: Wed, 4 Jun 2014 11:29:38 +0100
>> Subject: Re: Patch to makefile-temp
>> From: ba...@cs.nuim.ie
>> To: vincent@hotmail.fr
>> CC: bbdb-info@lists.sourceforge.net
>>
>> If the autotools-based stuff doesn't work on MSWindows, please report
>> the details.
>> That would be a bug, and we should be able to fix it, because
>> autotools-generated
>> scripts are intended to work in that environment (given an installed
>> bourne-compatible
>> shell, and make), and they are doing nothing fancy here.
>>
>> If it is an issue of various support programs being necessary (texinfo stuff,
>> for example), we could try to add options like ./configure --disable-texinfo 
>> or
>> such, and default them to "off" if the support programs are unavailable.
>>
>> If it is a problem with filenames, that could probably be fixed with 
>> appropriate
>> machinations. Is it having trouble finding the Emacs executable? That would
>> be a bug in some m4 macros. Anyway, we should arrange things so autotools
>> works on MSWindows.
>>
>> --Barak.
>
  
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


RE: Patch to makefile-temp

2014-06-04 Thread Vincent Belaïche
That has not to do with autoload tools, but with not using them. The 
makefile-temp is not automatically generated by autoload tools, it is a plain 
makefile that does not work in all cases --- at least it does not work on 
MSWindows XP as far as I can say.

I was proposing a fix which I had done for myself, while trying to keep 
backward compatibility, but it seems that this fix is too complex, I do not 
argue. The best way would anyway have been to use autoload --- or some other 
build system that is platform independent (EDE ?). Or maybe there can be 
alternative fixes simpler than what I had put forward (using mingw32-make 
instead of msys make and $(CURDIR) instead of `pwd` would probably make it, but 
I did not try...)

  Vincent.


> Date: Wed, 4 Jun 2014 11:29:38 +0100
> Subject: Re: Patch to makefile-temp
> From: ba...@cs.nuim.ie
> To: vincent@hotmail.fr
> CC: bbdb-info@lists.sourceforge.net
>
> If the autotools-based stuff doesn't work on MSWindows, please report
> the details.
> That would be a bug, and we should be able to fix it, because
> autotools-generated
> scripts are intended to work in that environment (given an installed
> bourne-compatible
> shell, and make), and they are doing nothing fancy here.
>
> If it is an issue of various support programs being necessary (texinfo stuff,
> for example), we could try to add options like ./configure --disable-texinfo 
> or
> such, and default them to "off" if the support programs are unavailable.
>
> If it is a problem with filenames, that could probably be fixed with 
> appropriate
> machinations. Is it having trouble finding the Emacs executable? That would
> be a bug in some m4 macros. Anyway, we should arrange things so autotools
> works on MSWindows.
>
> --Barak.
  
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Patch to makefile-temp

2014-06-04 Thread Barak A. Pearlmutter
If the autotools-based stuff doesn't work on MSWindows, please report
the details.
That would be a bug, and we should be able to fix it, because
autotools-generated
scripts are intended to work in that environment (given an installed
bourne-compatible
shell, and make), and they are doing nothing fancy here.

If it is an issue of various support programs being necessary (texinfo stuff,
for example), we could try to add options like ./configure --disable-texinfo or
such, and default them to "off" if the support programs are unavailable.

If it is a problem with filenames, that could probably be fixed with appropriate
machinations.  Is it having trouble finding the Emacs executable? That would
be a bug in some m4 macros. Anyway, we should arrange things so autotools
works on MSWindows.

--Barak.

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Patch to makefile-temp

2014-06-03 Thread Roland Winkler
On Tue Jun 3 2014 Vincent Belaïche wrote:
> Anyway, you are right in mentioning that my patch has some border
> effect on other systems than MSYS. Please find herein attached an
> updated patch.

I am sorry, I am still not excited about this.

The idea about lisp/makefile-temp has been to keep it "plain and
simple" (as compared with the autotools stuff that has its own
twists).  Yet your code uses syntax specific for GNU Make (ifeq and
CURDIR).  Sure, it's possible to work around it and turn this file
into a fancy Makefile with all bells and whistles that cover all
possibilities.  But that has Not been the goal here and I do not
want to get lost in such an effort.

I am sorry!

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Patch to makefile-temp

2014-06-03 Thread Vincent Belaïche
Hello Roland,

The 1st question should be why I don't simply use only forward slashes
under MSYS. As you know forward slashes are supported by MSWindows. This
is a separate issue from converting from an MSYS path like (call it /p/ ):

/c/Programme/GNU/installation/bbdb-git/bbdb/lisp

to a MSWindows path like (call it p:/ )

c:/Programme/GNU/installation/bbdb-git/bbdb/lisp

but also for purists (call it p:\ ):

c:\Programme\GNU\installation\bbdb-git\bbdb\lisp


EMACS does not understand /p/ paths, so I need to convert to p:\ or
p:/. Using p:/ would have been simpler and was supposed to work all the
same, however, the thing is that when I used the p:/ way instead of the
p:\ way, then I got this message:

Saving file 
c:/Programme/GNU/installation/emacs-install/emacs/trunk/lisp/c;c:msys.0ProgrammeGNUinstallatiobdb-gibdblisbdb-loaddefs.el...
Wrote 
c:/Programme/GNU/installation/emacs-install/emacs/trunk/lisp/c;c:msys.0ProgrammeGNUinstallatiobdb-gibdblisbdb-loaddefs.el

which shows that the generated bbdb-loaddefs.el seems not to go to the
right place. It seems therefore that my EMACS does some path processing
that interpretes the p:/ absolute path of the bbdb-loaddefs.el like a
unix list of pathes...

Maybe there is something wrong with my EMACS version, this is a build
from source that is approximately one year old. I know that there has
been changes in EMACS so that the build under MSWindows is made with
MSYS --- before there was some DOS batch to do that. Maybe this problem
that calls for p:\ instead of simply using p:/ would not happen with a
more recent or older version of EMACS.

Anyway, you are right in mentioning that my patch has some border effect
on other systems than MSYS. Please find herein attached an updated
patch.

  Vincent

Roland Winkler a écrit :
> On Mon Jun 2 2014 Vincent Belaïche wrote:
>> ---eval '(setq generated-autoload-file "'`pwd`/$@'")' \
>> +--eval '(setq generated-autoload-file "$(cur_dir)\\$@")' \
>
> How is the backslash supposed to work on unix-like systems?
> Am I missing something?
>

diff --git a/lisp/makefile-temp b/lisp/makefile-temp
index 48daf1d..c2ad518 100644
--- a/lisp/makefile-temp
+++ b/lisp/makefile-temp
@@ -23,6 +23,17 @@
 # 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)
+# file separator must be escaped for lisp strings
+  cur_dir=$(shell pwd -W | sed 's!/!!g')
+  fs=\\
+else
+  cur_dir=$(CURDIR)
+  fs=/
+endif
+
 srcdir = .
 prefix = /usr/local
 lispdir = $(DESTDIR)/usr/local/share/emacs/site-lisp/bbdb
@@ -87,9 +98,9 @@ bbdb-loaddefs.el: $(SRCS)
 #	Generated autoload-file must have an absolute path,
 #	$(srcdir) can be relative.
 	$(emacs) -l autoload \
-		--eval '(setq generated-autoload-file "'`pwd`/$@'")' \
+		--eval '(setq generated-autoload-file "$(cur_dir)$(fs)$@")' \
 		--eval '(setq make-backup-files nil)' \
-		-f batch-update-autoloads `pwd`
+		-f batch-update-autoloads "$(cur_dir)"
 
 .PHONY: no-bbdb-loaddefs
 no-bbdb-loaddefs:
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Patch to makefile-temp

2014-06-02 Thread Roland Winkler
On Mon Jun 2 2014 Vincent Belaïche wrote:
> - --eval '(setq generated-autoload-file "'`pwd`/$@'")' \
> + --eval '(setq generated-autoload-file "$(cur_dir)\\$@")' \

How is the backslash supposed to work on unix-like systems?
Am I missing something?

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Patch to makefile-temp

2014-06-02 Thread Vincent Belaïche
Sorry for the mistake, my intention was to send the diff file, not the
modified makefile-temp.

> Hello,
> 
> Not sure whether I have ever submitted this. This patch is supposed to
> smooth installation from repo with Windows + MSYS, without any border
> effect when MSYS is not there. Backward compatility is ensured by
> testing environment variable OSTYPE to be msys --- which is supposed to
> be the case under MSYS.
> 
> VBR,
>Vincent.

diff --git a/lisp/makefile-temp b/lisp/makefile-temp
index 48daf1d..ecfa0c7 100644
--- a/lisp/makefile-temp
+++ b/lisp/makefile-temp
@@ -23,6 +23,14 @@
 # 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
@@ -87,9 +95,9 @@ bbdb-loaddefs.el: $(SRCS)
 #  Generated autoload-file must have an absolute path,
 #  $(srcdir) can be relative.
$(emacs) -l autoload \
-   --eval '(setq generated-autoload-file "'`pwd`/$@'")' \
+   --eval '(setq generated-autoload-file "$(cur_dir)\\$@")' \
--eval '(setq make-backup-files nil)' \
-   -f batch-update-autoloads `pwd`
+   -f batch-update-autoloads "$(cur_dir)"
 
 .PHONY: no-bbdb-loaddefs
 no-bbdb-loaddefs:
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Patch to makefile-temp

2014-06-01 Thread Vincent Belaïche
Hello,

Not sure whether I have ever submitted this. This patch is supposed to
smooth installation from repo with Windows + MSYS, without any border
effect when MSYS is not there. Backward compatility is ensured by
testing environment variable OSTYPE to be msys --- which is supposed to
be the case under MSYS.

VBR,
   Vincent.

# Cheap BBDB makefile  -*- Makefile -*-
# Copyright (C) 2010-2014 Roland Winkler 
# 
# 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 .

### 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.
@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.
$(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