File: Makefile

package info (click to toggle)
libapache2-mod-intercept-form-submit 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: ansic: 417; sh: 86; makefile: 26
file content (21 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

NAME=mod_intercept_form_submit

SOURCE0 := $(shell spectool $(NAME).spec)
SOURCE := $(shell echo $(SOURCE0) | sed 's%^.*/%%')
NAME_VER := $(shell echo $(SOURCE) | sed 's%\.tar\.gz$$%%')

all:
	@echo 'Usage: make dist             to build the .tar.gz'
	@echo '       make timestamps       set file timestamps to match commit times'

timestamps:
	git ls-files | while read -r f ; do touch -ch -d "$$(git log -1 --format=%ci "$$f")" "$$f" ; done

dist:
	@if test -f ../$(SOURCE) ; then ( echo "The source [../$(SOURCE)] already exists." >&2 ; exit 1 ) ; fi
	@mkdir .dist
	@mkdir .dist/$(NAME_VER) && cp -rp * .dist/$(NAME_VER)
	tar cvzf ../$(SOURCE) -C .dist $(NAME_VER)
	@rm -rf .dist