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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2012-12-26 14:12:58 +01:00
parent 390957723c
commit d9d6a2228c
+5 -1
View File
@@ -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