Re-order Makefile install and uninstall a bit. Specifically
[mirror/scst/.git] / scstadmin / Makefile
1 MODULE_VERSION = 0.7.4
2 TOOL = scstadmin
3
4 all: perl-module
5
6 install:
7         $(MAKE) -C scst-$(MODULE_VERSION) install
8         install -m 755 $(TOOL) /usr/local/sbin
9         install -m 755 init.d/scst /etc/init.d
10         install -m 755 init.d/qla2x00t /etc/init.d
11         /usr/lib/lsb/install_initd scst
12         /usr/lib/lsb/install_initd qla2x00t
13
14 uninstall:
15         -/usr/lib/lsb/remove_initd qla2x00t
16         -/usr/lib/lsb/remove_initd scst
17         -rm -f /etc/init.d/qla2x00t
18         -rm -f /etc/init.d/scst
19         -rm -f /usr/local/sbin/$(TOOL)
20         $(MAKE) -C scst-$(MODULE_VERSION) uninstall
21
22 perl-module:
23         @cd ./scst-$(MODULE_VERSION); \
24         perl Makefile.PL;
25         $(MAKE) -C scst-$(MODULE_VERSION)
26
27 clean:
28         -$(MAKE) -C scst-$(MODULE_VERSION) clean
29
30 distclean: clean
31         -rm -f scst-$(MODULE_VERSION)/Makefile.old
32
33 extraclean: distclean
34
35 .PHONY: all install uninstall perl-module clean distclean extraclean