diff options
author | Christian Hesse <mail@eworm.de> | 2013-10-30 15:38:01 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-10-30 15:38:01 +0100 |
commit | eb49f6926581f9f9d7e6d9853ad41533fd779c07 (patch) | |
tree | 9a1ce45b04477a2c19e366c3cea9b14ff6129da4 /Makefile | |
parent | f38d0c991bcae3a894f3fc0b562f954e8e4ca2b6 (diff) | |
download | paccache-eb49f6926581f9f9d7e6d9853ad41533fd779c07.tar.gz paccache-eb49f6926581f9f9d7e6d9853ad41533fd779c07.tar.zst |
use a little helper to determine architecture
Architecture reported by `uname -a` and used by pacman are not
neccessarily the same, so use a little helper.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -11,7 +11,6 @@ CFLAGS += $(shell pkg-config --libs --cflags libcurl) CFLAGS += $(shell pkg-config --libs --cflags avahi-client) CFLAGS += $(shell pkg-config --libs --cflags libmicrohttpd) VERSION := $(shell git describe --tags --long 2>/dev/null) -ARCH := $(shell uname -m) # this is just a fallback in case you do not use git but downloaded # a release tarball... ifeq ($(VERSION),) @@ -20,6 +19,9 @@ endif all: pacredir avahi/pacdbserve.service README.html +arch: arch.c config.h + $(CC) -o arch arch.c + pacredir: pacredir.c config.h $(CC) $(CFLAGS) -o pacredir pacredir.c \ -DVERSION="\"$(VERSION)\"" @@ -27,8 +29,8 @@ pacredir: pacredir.c config.h config.h: $(CP) config.def.h config.h -avahi/pacdbserve.service: avahi/pacdbserve.service.in - $(SED) 's/%ARCH%/$(ARCH)/' avahi/pacdbserve.service.in > avahi/pacdbserve.service +avahi/pacdbserve.service: arch avahi/pacdbserve.service.in + $(SED) 's/%ARCH%/$(shell ./arch)/' avahi/pacdbserve.service.in > avahi/pacdbserve.service README.html: README.md $(MD) README.md > README.html @@ -49,4 +51,4 @@ install-doc: README.html $(INSTALL) -D -m0644 README.html $(DESTDIR)/usr/share/doc/paccache/README.html clean: - $(RM) -f *.o *~ pacredir avahi/pacdbserve.service README.html + $(RM) -f *.o *~ arch pacredir avahi/pacdbserve.service README.html |