summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-06-06 19:20:58 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-06-06 19:20:58 +0200
commit45438ade0845e149b5686571b3a80d77204c9a26 (patch)
treed3b3b8476d0c6afec0368036e64a5bc4aa4c8b09 /Makefile
parent5a550c33eff1fcb9c3a935fccd58d0a4179bf0a9 (diff)
remove redundancy in makefile
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 1711cbe..aaf98e6 100644
--- a/Makefile
+++ b/Makefile
@@ -9,17 +9,18 @@ all: fb.1 fb fb-helper
fb: fb.in
@[ -n "$(VERSION)" ] || (echo "Error: version detection failed"; exit 1)
- sed 's|@VERSION@|$(VERSION)|; s|@LIBDIR@|$(LIBDIR)|' fb.in > fb
- chmod 755 fb
+ sed 's|@VERSION@|$(VERSION)|; s|@LIBDIR@|$(LIBDIR)|' $< > $@
+ chmod 755 $@
-fb-helper.c: fb-helper.c.in
- sed 's/@VERSION@/$(VERSION)/' fb-helper.c.in > fb-helper.c
+%:: %.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 -lm -o fb-helper fb-helper.c
+ $(CC) $(CFLAGS) -lcurl -lm -o $@ $<
fb.1: fb.pod
- pod2man -c "" fb.pod fb.1
+ pod2man -c "" $< $@
clean:
rm -f fb.1 fb fb-helper.c fb-helper