summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 3 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b976361..2ffeeb5 100644
--- a/Makefile
+++ b/Makefile
@@ -12,18 +12,14 @@ fb: fb.in
sed 's|@VERSION@|$(VERSION)|; s|@LIBDIR@|$(LIBDIR)|' $< > $@
chmod 755 $@
-%:: %.in
- @[ -n "$(VERSION)" ] || (echo "Error: version detection failed"; exit 1)
- sed 's|@VERSION@|$(VERSION)|; s|@LIBDIR@|$(LIBDIR)|' $< > $@
-
fb-helper: fb-helper.c
- $(CC) $(CFLAGS) -lcurl -o $@ $<
+ $(CC) $(CFLAGS) -lcurl -DVERSION=\"$(VERSION)\" -o $@ $<
fb.1: fb.pod
pod2man -c "" $< $@
clean:
- rm -f fb.1 fb fb-helper.c fb-helper
+ rm -f fb.1 fb fb-helper
rm -rf dist
install: all
@@ -39,7 +35,7 @@ uninstall:
dist: all
@[ -n "$(VERSION)" ] || (echo "Error: version detection failed"; exit 1)
mkdir -p dist/fb-$(VERSION)
- cp -a fb-helper.c{,.in} fb{,.in} fb.pod fb.1 COPYING Makefile dist/fb-$(VERSION)
+ cp -a fb-helper.c fb{,.in} fb.pod fb.1 COPYING Makefile dist/fb-$(VERSION)
sed -i 's/^VERSION:=.*$$/VERSION:='$(VERSION)'/' dist/fb-$(VERSION)/Makefile
cd dist; tar -czf fb-$(VERSION).tar.gz fb-$(VERSION)