summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorxhe <xw897002528@gmail.com>2017-08-30 13:13:18 +0800
committerxhe <xw897002528@gmail.com>2017-08-30 21:34:01 +0800
commit00772e8dbb741f464ba04374ede27cf7ef5a06c2 (patch)
tree19252f147eb44ccfe5918e54280a194eeac0fbdf /Makefile
parent092551b242a472ff9618fb21f1b777eccaa3c138 (diff)
downloadgettext-tiny-00772e8dbb741f464ba04374ede27cf7ef5a06c2.tar.gz
[1/3]: more flexible way of installing share files
following https://github.com/sabotage-linux/gettext-tiny/issues/12 this is the first part of the solution the issue, to prepare for introducing Makefile.in.in in the next commit. we modify m4dir to datadir, as we will introduce Makefile.in.in, which should be copied to $datadir$/gettety-tiny. It's a better name. Also moving m4 to a subdir makes a cleaner structure and a good place to place Makefile.in.in.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 283354e..2bcbcba 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ bindir=$(prefix)/bin
includedir=$(prefix)/include
libdir=$(prefix)/lib
sysconfdir=$(prefix)/etc
-m4dir=$(prefix)/share/gettext-tiny
+datadir=$(prefix)/share/gettext-tiny
ifeq ($(LIBINTL), MUSL)
LIBSRC = libintl/libintl-musl.c
@@ -41,7 +41,7 @@ BUILDCFLAGS=$(CFLAGS)
all: $(ALL_LIBS) $(ALL_TOOLS)
-install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(m4dir)/%)
+install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(datadir)/%)
clean:
rm -f $(ALL_LIBS)
@@ -66,7 +66,7 @@ xgettext:
cp src/xgettext.sh ./xgettext
autopoint: src/autopoint.in
- cat $< | sed 's,@m4dir@,$(m4dir),' > $@
+ cat $< | sed 's,@datadir@,$(datadir),' > $@
$(DESTDIR)$(libdir)/%.a: %.a
install -D -m 755 $< $@
@@ -77,7 +77,7 @@ $(DESTDIR)$(includedir)/%.h: include/%.h
$(DESTDIR)$(bindir)/%: %
install -D -m 755 $< $@
-$(DESTDIR)$(m4dir)/%: %
+$(DESTDIR)$(datadir)/%: %
install -D -m 644 $< $@
.PHONY: all clean install