another fix (hopefully last one) to issue #10
[luasnmp.git] / makefile
blob3b0ba567c31c1ed33177f81f45030355ecf8744b
1 include config
3 .PHONY: all clean depend uclean
4 all:
5 cd src && $(MAKE) $@
7 clean depend:
8 cd src && $(MAKE) $@
10 uclean: clean
11 rm -f `find . -name "*~"`
13 .PHONY: install uninstall install-doc uninstall-doc
15 install: all
16 mkdir -p $(INSTALL_SHARE) $(INSTALL_LIB)/snmp
17 $(INSTALL_DATA) snmp.lua $(INSTALL_SHARE)
18 $(INSTALL_DATA) trapd.lua $(INSTALL_SHARE)
19 cd src && $(INSTALL_COPY) snmp.$(EXT).$(VERSION) $(INSTALL_LIB)/snmp/core.$(EXT)
21 uninstall:
22 rm -rf $(INSTALL_SHARE)/snmp.lua
23 rm -rf $(INSTALL_SHARE)/trapd.lua
24 rm -rf $(INSTALL_LIB)/snmp
26 install-doc:
27 mkdir -p $(INSTALL_DOC)/html
28 cd doc && $(INSTALL_COPY) * $(INSTALL_DOC)/html
30 uninstall-doc:
31 rm -rf $(INSTALL_DOC)
33 .PHONY: rock
35 rock::
36 luarocks --lua-version=$(LV) pack $(ROCKSPEC)
38 .PHONY: test testd testtrap testtrapd testtraponly testtraponlyd
39 test:
40 $(LUABIN) test.lua
42 testd:
43 $(LUABIN) test.lua debug
45 testtrap:
46 $(LUABIN) -e "trapyes, informyes = true, true" test_trap.lua
48 testtrapd:
49 $(LUABIN) -e "trapyes, informyes = true, true" test_trap.lua debug
52 .PHONY: tag tag-git tag-cvs tag-svn
53 tag:
54 git tag -F latest
56 .PHONY: dist dist-git dist-cvs dist-svn
57 dist:
58 mkdir -p $(EXPORTDIR)
59 git archive --format=tar --prefix=$(DISTNAME)/ HEAD | gzip >$(EXPORTDIR)/$(DISTARCH)