forked from ArneBab/freenetbrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
47 lines (40 loc) · 2.35 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
bin_SCRIPTS = freenetbrowser
CLEANFILES = $(bin_SCRIPTS)
# the name and executables of the project
freenetbrowser =
# the data directory. Users can set this via --prefix: @datarootdir@ = PREFIX/share. See ./configure --help
freenetbrowserdir = @datarootdir@/freenetbrowser
# the data files
nobase_freenetbrowser_DATA =
# include the data in the distribution tarball
EXTRA_DIST = $(nobase_freenetbrowser_DATA)
# additional files to clean which are left over on make distcheck TODO: find out why
DISTCLEANFILES = ./missing ./config.sub ./config.guess ./install-sh
all: $(freenetbrowser) ChangeLog AUTHORS
install: install-am ## install to locations defined by ./configure
uninstall: uninstall-am ## remove the installed files
freenetbrowser: freenetbrowser.in ## build the main program
cat "$<" | sed "s,"'$${DATADIR}'",$(freenetbrowserdir),g" | sed "s,"'$${TEMPLATE_FILES}'",$(notdir $(freenetbrowser_DATA)),g" > "$@"
chmod +x "$@"
.PHONY: help
help: ## Show this help message.
@echo 'Usage:'
@echo ':make [target] ...' | sed "s/\(target\)/\\x1b[36m\1\\x1b[m/" | column -c2 -t -s :
@echo
@echo 'Targets:'
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed 's/^#//' | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/:\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
@echo
@echo '(see ./configure --help for setup options)'
# create basic files for the tarball
.SECONDARY: ChangeLog AUTHORS
ChangeLog: ## create the ChangeLog from the history
@echo Generating $@
@echo "For user-visible changes, see the NEWS file" > @abs_top_builddir@/$@
@echo >> @abs_top_builddir@/$@
@if test -d @abs_top_srcdir@/.git; then cd @abs_top_srcdir@; git log --date-order --date=short | sed -e '/^commit.*$$/d' | awk '/^Author/ {sub(/\\$$/,""); getline t; print $0 t; next}; 1' | sed -e 's/^Author: //g' | sed -e 's/\(.*\)>Date: \([0-9]*-[0-9]*-[0-9]*\)/\2 \1>/g' | sed -e 's/^\(.*\) \(\)\t\(.*\)/\3 \1 \2/g' >> @abs_top_builddir@/$@; cd -; fi
@if test -d @abs_top_srcdir@/.hg; then hg -R @abs_top_srcdir@ log --style changelog >> $@; fi
AUTHORS: AUTHORS.in ## create the AUTHORS file from the history and AUTHORS.in
@echo Generating $@
@cp "$<" "$@"
@if test -d @abs_top_srcdir@/.git; then cd @abs_top_srcdir@; git log --format='%aN' | sort -u > @abs_top_builddir@/$@; cd -; fi
@if test -d @abs_top_srcdir@/.hg; then hg -R @abs_top_srcdir@ --config extensions.churn= churn -t "{author}" > $@; fi