summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..67c41e2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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
+