diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-09-15 21:56:28 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-09-15 21:56:28 +0200 |
commit | b87e747713d6fcf2e67e9e187527fb2b040a5979 (patch) | |
tree | 3303cc07d1d980df6d59aca5598f0d2341c843fa /Makefile | |
parent | 0172c067dfd3c349611f3de453a8dcb389ce8688 (diff) |
use define instead of sed for VERSION expansion in helper
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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) |