mausezahn: use getopt_long instead of getopt
[netsniff-ng.git] / Misc
blobda73f87a1169235525f487db5701017157dbe3c3
1 nacl:
2         $(Q)echo "$(bold)$(WHAT) $@:$(normal)"
3         $(Q)cd curvetun/ && source ./nacl_build.sh ~/nacl
4         $(Q)source ~/.bashrc
6 tarball.gz:  ; $(call GIT_ARCHIVE,gzip,gz)
7 tarball.bz2: ; $(call GIT_ARCHIVE,bzip2,bz2)
8 tarball.xz:  ; $(call GIT_ARCHIVE,xz,xz)
9 tarball: tarball.gz tarball.bz2 tarball.xz
11 tag:
12         $(GIT_TAG)
14 people:
15         $(GIT_PEOPLE)
17 log:
18         $(GIT_LOG)
20 authors:
21         $(Q)echo "The following people, in alphabetical order, have authored" > AUTHORS
22         $(Q)echo "commits in the netsniff-ng repository:" >> AUTHORS
23         $(Q)echo "" >> AUTHORS
24         $(Q)contrib/extract-authors.sh >> AUTHORS
25         $(Q)echo >> AUTHORS
26         $(Q)cat .authors.aux >> AUTHORS
28 announcement:
29         $(Q)echo -e "   *** BLURB HERE (general bits, optional) ***\n\n---\n" > .MAIL_MSG
30         $(Q)echo -e "netsniff-ng $(VERSION_SHORT) ($(NAME)) has been released to the public.\n" >> .MAIL_MSG
31         $(Q)echo -e "It can be fetched via Git:\n" >> .MAIL_MSG
32         $(Q)echo -e "   git clone git://github.com/netsniff-ng/netsniff-ng.git" >> .MAIL_MSG
33         $(Q)echo -e "   git checkout v$(VERSION_SHORT)\n" >> .MAIL_MSG
34         $(Q)echo -e "Or via HTTP from one of our mirrors:\n" >> .MAIL_MSG
35         $(Q)echo -e "   http://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-$(VERSION_SHORT).tar.gz" >> .MAIL_MSG
36         $(Q)echo -e "   http://mirror.distanz.ch/netsniff-ng/netsniff-ng-$(VERSION_SHORT).tar.gz" >> .MAIL_MSG
37         $(Q)echo -e "   http://github.com/netsniff-ng/netsniff-ng/archive/v$(VERSION_SHORT).tar.gz\n" >> .MAIL_MSG
38         $(Q)echo -e "The release can be verified via Git (see README):\n" >> .MAIL_MSG
39         $(Q)echo -e "   git tag -v v$(VERSION_SHORT)\n" >> .MAIL_MSG
40         $(Q)echo -e "Major high-level changes since the last release ($(shell $(GIT_LAST_TAG))) are:\n" >> .MAIL_MSG
41         $(Q)echo -e "   *** BLURB HERE (specific bits) ***\n" >> .MAIL_MSG
42         $(Q)echo -e "Contributions since last release:\n" >> .MAIL_MSG
43         $(GIT_PEOPLE) >> .MAIL_MSG
44         $(Q)echo -e "\nGit changelog since last release:\n" >> .MAIL_MSG
45         $(GIT_LOG) >> .MAIL_MSG
47 sign:
48         $(call GPG_SIGN,gz)
49         $(call GPG_SIGN,bz2)
50         $(call GPG_SIGN,xz)
52 release: tag announcement tarball sign
53         $(Q)echo "Released $(bold)$(VERSION_SHORT)$(normal)"
55 FIND_SOURCE_FILES = ( git ls-files '*.[hcS]' 2>/dev/null || \
56                         find . \( -name .git -type d -prune \) \
57                                 -o \( -name '*.[hcS]' -type f -print \) )
59 tags ctags:
60         $(Q)$(call RM,tags)
61         $(FIND_SOURCE_FILES) | xargs ctags -a
63 cscope:
64         $(Q)$(call RM,cscope*)
65         $(FIND_SOURCE_FILES) | xargs cscope -b
67 COV_URL = "https://scan.coverity.com/builds?project=netsniff-ng"
68 # these need to be specified on the command line
69 COV_EMAIL =
70 COV_PASSWD =
72 coverity:
73         $(Q)test -n "$(COV_EMAIL)" || (echo "COV_EMAIL not set" && false)
74         $(Q)test -n "$(COV_PASSWD)" || (echo "COV_PASSWD not set" && false)
75         $(Q)$(MAKE) distclean
76         $(Q)$(call RM,cov-int)
77         $(Q)$(call MKDIR,cov-int)
78         $(Q)./configure
79         $(Q)cov-build --dir cov-int $(MAKE)
80         $(Q)tar czvf netsniff-ng-coverity.tgz cov-int
81         $(Q)echo "Uploading snapshot to Coverity scanner at $(COV_URL)"
82         $(Q)curl --form project=netsniff-ng \
83                 --form file=@netsniff-ng-coverity.tgz \
84                 --form token=$(COV_PASSWD) \
85                 --form email=$(COV_EMAIL) \
86                 --form version=`$(GIT_VERSION)` \
87                 --form description="netsniff-ng snapshot" $(COV_URL)
89 help:
90         $(Q)echo "$(bold)Available tools from the toolkit:$(normal)"
91         $(Q)echo " <tool>:={$(TOOLS)}"
92         $(Q)echo "$(bold)Targets for building the toolkit:$(normal)"
93         $(Q)echo " all|toolkit                  - Build the whole toolkit"
94         $(Q)echo " allbutcurvetun               - Build all except curvetun"
95         $(Q)echo " allbutmausezahn              - Build all except mausezahn"
96         $(Q)echo " <tool>                       - Build only one of the tools"
97         $(Q)echo "$(bold)Targets for cleaning the toolkit's build files:$(normal)"
98         $(Q)echo " clean                        - Remove all build files"
99         $(Q)echo " <tool>_clean                 - Remove only one of the tool's files"
100         $(Q)echo " distclean                    - Remove all build and build config files"
101         $(Q)echo " mrproper                     - Remove all files not in source distribution"
102         $(Q)echo "$(bold)Targets for installing the toolkit:$(normal)"
103         $(Q)echo " install                      - Install the whole toolkit"
104         $(Q)echo " <tool>_install               - Install only one of the tools"
105         $(Q)echo "$(bold)Targets for removing the toolkit:$(normal)"
106         $(Q)echo " uninstall                    - Remove the whole toolkit from the system"
107         $(Q)echo " <toolname>_uninstall         - Remove only one of the tools"
108         $(Q)echo "$(bold)Hacking/development targets:$(normal)"
109         $(Q)echo " tag                          - Generate Git tag of current version"
110         $(Q)echo " tarball                      - Generate tarball of latest version"
111         $(Q)echo " release                      - Generate a new release"
112         $(Q)echo " tags                         - Generate sparse ctags"
113         $(Q)echo " cscope                       - Generate cscope files"
114         $(Q)echo "$(bold)Misc targets:$(normal)"
115         $(Q)echo " nacl                         - Execute the build_nacl script"
116         $(Q)echo " help                         - Show this help"
117         $(Q)echo "$(bold)Available parameters:$(normal)"
118         $(Q)echo " DEBUG=1                      - Enable debugging"
119         $(Q)echo " HARDENING=1                  - Enable GCC hardening of executables"
120         $(Q)echo " PREFIX=/path                 - Install path prefix"
121         $(Q)echo " DESTDIR=/path                - Alternative install destination path"
122         $(Q)echo " CC=cgcc                      - Use sparse compiler wrapper"
123         $(Q)echo " CFLAGS=\"-O2 -Wall ...\"       - Overwrite CFLAGS for compilation"
124         $(Q)echo " CPPFLAGS=\"-I <path> ...\"     - Additional CFLAGS for compilation"
125         $(Q)echo " LDFLAGS=\"-L <path> ...\"      - Additional LDFLAGS for compilation"
126         $(Q)echo " CCACHE=ccache                - Use ccache for compilation"
127         $(Q)echo " C=1                          - Check all C source files with sparse"
128         $(Q)echo " Q=                           - Show verbose garbage"