From d9d6a2228c7d71e304521794441e41722f96ebb5 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 26 Dec 2012 14:12:58 +0100 Subject: [PATCH] Fix OOT builds with swig files in source dir Normally, when the Makefile calls swig, the resulting files end up in the build directory. However, when the files are pre-generated (e.g. as in the znc 1.0 tarball) and an out of tree build is used, they are in the source directory and installation fails. Thanks to Kinji for reporting this. Signed-off-by: Uli Schlachter --- modules/modperl/Makefile.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/modperl/Makefile.inc b/modules/modperl/Makefile.inc index 997bb8c4..7265c0c0 100644 --- a/modules/modperl/Makefile.inc +++ b/modules/modperl/Makefile.inc @@ -60,5 +60,9 @@ modperl_install: install_datadir modperl_all done mkdir -p $(DESTDIR)$(MODDIR)/modperl $(INSTALL_PROGRAM) modperl/ZNC.$(PERLCEXT_EXT) $(DESTDIR)$(MODDIR)/modperl - $(INSTALL_DATA) modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl + if test -e modperl/ZNC.pm ; then \ + $(INSTALL_DATA) modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl || exit 1 ; \ + else \ + $(INSTALL_DATA) $(srcdir)/modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl || exit 1 ; \ + fi $(INSTALL_DATA) $(srcdir)/modperl/startup.pl $(DESTDIR)$(MODDIR)/modperl