build: Added module check
authorHeiko Schlittermann <hs@schlittermann.de>
Thu, 26 Mar 2009 09:22:30 +0100
changeset 18 9032fd09c274
parent 17 ada2cfc3bb86
child 19 3a86e78a18b1
build: Added module check
Makefile
modules
--- a/Makefile	Thu Mar 26 08:46:25 2009 +0100
+++ b/Makefile	Thu Mar 26 09:22:30 2009 +0100
@@ -4,8 +4,10 @@
 
 bin_SCRIPTS = log
 
+.PHONY:	all check install clean
 
-all:	$(bin_SCRIPTS)
+
+all:	check $(bin_SCRIPTS)
 
 install:	all
 	install -d -m 0755 $(DESTDIR)/$(sysconfdir)
@@ -23,6 +25,16 @@
 clean:
 	-rm -f $(bin_SCRIPTS)
 
+check:
+	@-rm -f .e
+	@cat modules | while read; do \
+		perl -M$$REPLY -e 'print " $$'"$$REPLY"'::VERSION\n"' &>/dev/null \
+		&& continue; \
+		echo "MISSING perl library: \"$$REPLY\""; \
+		touch .e; \
+	done
+	@rm .e 2>/dev/null && false || true
+
 %:	%.pl
 	perl -c $<
 	cp -f $< $@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules	Thu Mar 26 09:22:30 2009 +0100
@@ -0,0 +1,9 @@
+DBI
+File::Basename
+File::Copy
+File::stat
+File::Temp
+File::Which
+Getopt::Long
+Mail::Mailer
+MIME::QuotedPrint