include openvas.tmpl

all:

install-dirs:
	test -d $(DESTDIR)${libdir}/openvas || $(INSTALL_DIR) -m 755 \
		$(DESTDIR)${libdir}/openvas
	test -d $(DESTDIR)${libdir}/openvas/plugins || $(INSTALL_DIR) -m 755 \
		$(DESTDIR)${libdir}/openvas/plugins
	
install-nasl: install-dirs
	for scripts in scripts/*.nasl; do \
	$(INSTALL) -m 444 $$scripts \
		$(DESTDIR)${libdir}/openvas/plugins; \
	done

install-inc: install-dirs
	for scripts in scripts/*.inc; do \
	$(INSTALL) -m 444 $$scripts \
		$(DESTDIR)${libdir}/openvas/plugins; \
	done

install-man:
	test -d $(DESTDIR)${mandir}/man1 || $(INSTALL_DIR) -m 755 \
		$(DESTDIR)${mandir}/man1

install-minimal: all install-dirs install-man

install: all install-dirs install-nasl install-inc install-man

clean:

distclean: clean
	rm -f config.cache config.status config.log openvas.tmpl

dist:
	version="`cat VERSION`"; \
	rm -rf openvas-plugins-$${version}* ; \
	mkdir openvas-plugins-$${version} ; \
	tar cf openvas-plugins-$${version}/x.tar `cat MANIFEST`; \
	( cd openvas-plugins-$${version} ; tar xf x.tar ; rm -f x.tar ) ; \
	tar cf openvas-plugins-$${version}.tar openvas-plugins-$${version} ; \
	gzip -9 openvas-plugins-$${version}.tar
