summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-22 06:50:40 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-22 06:50:40 +0000
commitaebe8604605b41803c43c1def87549569b821b27 (patch)
tree2ee3719d6b12af61d5c377a4a47be9e4988dce5b
parent3b95fe65d951745988f072bca328ebe06a596e3b (diff)
downloadskalibs-aebe8604605b41803c43c1def87549569b821b27.tar.xz
Change datadir to sysconfdir, aligning with autoconf
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--Makefile6
-rwxr-xr-xconfigure12
2 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 710899a..a08f06a 100644
--- a/Makefile
+++ b/Makefile
@@ -78,8 +78,8 @@ ifneq ($(strip $(SHARED_LIBS)),)
exec $(STRIP) -R .note -R .comment $(SHARED_LIBS)
endif
-install: install-data install-sysdeps install-dynlib install-lib install-include
-install-data: $(ALL_DATA:src/etc/%=$(DESTDIR)$(datadir)/%)
+install: install-sysconf install-sysdeps install-dynlib install-lib install-include
+install-sysconf: $(ALL_DATA:src/etc/%=$(DESTDIR)$(sysconfdir)/%)
install-sysdeps: $(ALL_SYSDEPS:$(sysdeps)/%=$(DESTDIR)$(sysdepdir)/%)
install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so)
install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a)
@@ -101,7 +101,7 @@ $(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M): $(DESTDIR)$(dynlibdir)/lib%
endif
-$(DESTDIR)$(datadir)/%: src/etc/%
+$(DESTDIR)$(sysconfdir)/%: src/etc/%
exec $(INSTALL) -D -m 644 $< $@
$(DESTDIR)$(sysdepdir)/%: $(sysdeps)/%
diff --git a/configure b/configure
index f77d089..823899a 100755
--- a/configure
+++ b/configure
@@ -22,7 +22,7 @@ Fine tuning of the installation directories:
--dynlibdir=DIR shared library files [PREFIX/lib]
--libdir=DIR static library files [PREFIX/lib/$package]
--includedir=DIR include files for the C compiler [PREFIX/include]
- --datadir=DIR global configuration files [PREFIX/etc]
+ --sysconfdir=DIR global configuration files [PREFIX/etc]
--sysdepdir=DIR sysdeps directory [PREFIX/lib/$package/sysdeps]
If no --prefix option is given, by default libdir will be /usr/lib/$package,
@@ -354,7 +354,7 @@ prefix=
dynlibdir='$prefix/lib'
libdir='$prefix/lib/$package'
includedir='$prefix/include'
-datadir='$prefix/etc'
+sysconfdir='$prefix/etc'
sysdepdir='$prefix/lib/$package/sysdeps'
sysdeplist=
shared=true
@@ -385,7 +385,7 @@ for arg ; do
--dynlibdir=*) dynlibdir=${arg#*=} ;;
--libdir=*) libdir=${arg#*=} ;;
--includedir=*) includedir=${arg#*=} ;;
- --datadir=*) datadir=${arg#*=} ;;
+ --sysconfdir=*) sysconfdir=${arg#*=} ;;
--sysdepdir=*) sysdepdir=${arg#*=} ;;
--with-include=*) var=${arg#*=} ; stripdir var ; addincpath="$addincpath -I$var" ;;
--with-lib=*) var=${arg#*=} ; stripdir var ; addlibspath="$addlibspath -L$var" ; vpaths="$vpaths $var" ;;
@@ -435,7 +435,7 @@ fi
# Expand installation directories
stripdir prefix
-for i in exec_prefix dynlibdir libdir includedir datadir sysdepdir sysdepspre sproot ; do
+for i in exec_prefix dynlibdir libdir includedir sysconfdir sysdepdir sysdepspre sproot ; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
@@ -669,7 +669,7 @@ cat << EOF
target := $target
package := $package
prefix := $prefix
-datadir := $datadir
+sysconfdir := $sysconfdir
sysdepdir := $sysdepdir
dynlibdir := $dynlibdir
libdir := $libdir
@@ -735,7 +735,7 @@ cat <<EOF
#define ${package_macro_name}_VERSION "$version"
#define ${package_macro_name}_DEFAULTPATH "$defaultpath"
-#define ${package_macro_name}_ETC "$datadir"
+#define ${package_macro_name}_ETC "$sysconfdir"
#define ${package_macro_name}_SPROOT "$sproot"
#define ${package_macro_name}_HOME "$home"
EOF