Skip to content

Commit

Permalink
lowercase PREFIX and PKGCONFIGDIR
Browse files Browse the repository at this point in the history
This is a convention among build systems, eg Termux.
  • Loading branch information
stsp committed Dec 15, 2024
1 parent dca5392 commit d7192f0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ INST=$(pwd)/${DIR_INSTALLED_FDPP}

if false ; then
# Old Makefile based build
make clean all PREFIX=${INST}
make clean all prefix=${INST}
else
# Ubuntu 22.04 has too old a Meson, so pip install it
sudo apt install ninja-build pipx
Expand Down
2 changes: 1 addition & 1 deletion ci_setup_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git clone --depth 1 --no-single-branch https://github.com/dosemu2/dosemu2.git ${

# Install fdpp into local directory
if false ; then
make install PREFIX="${DIR_ROOT}/${DIR_INSTALLED_FDPP}"
make install prefix="${DIR_ROOT}/${DIR_INSTALLED_FDPP}"
else
meson install -C ${DIR_ROOT}/build
fi
Expand Down
6 changes: 3 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
dh $@ --parallel --builddirectory=build

override_dh_auto_build:
dh_auto_build $@ -- PREFIX=/usr
dh_auto_build $@ -- prefix=/usr

override_dh_auto_install:
dh_auto_install $@ -- PREFIX=/usr \
PKGCONFIGDIR=/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
dh_auto_install $@ -- prefix=/usr \
pkgconfdir=/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
14 changes: 7 additions & 7 deletions fdpp/defs.mak
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ XCPU=186
# XFAT=16
XFAT=32

PREFIX ?= /usr/local
LIBDIR ?= $(PREFIX)/lib
DATADIR ?= $(PREFIX)/share
INCLUDEDIR ?= $(PREFIX)/include
PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
export PKG_CONFIG_PATH = $(PKGCONFIGDIR):$(DATADIR)/pkgconfig
prefix ?= /usr/local
LIBDIR ?= $(prefix)/lib
DATADIR ?= $(prefix)/share
INCLUDEDIR ?= $(prefix)/include
pkgconfdir ?= $(LIBDIR)/pkgconfig
export PKG_CONFIG_PATH = $(pkgconfdir):$(DATADIR)/pkgconfig
# for nasm-segelf
export PATH := $(PATH):$(PREFIX)/bin
export PATH := $(PATH):$(prefix)/bin

DIRSEP = /
RM = rm -f
Expand Down
14 changes: 7 additions & 7 deletions fdpp/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ install: $(ALL)
$(INSTALL) -d $(DESTDIR)$(DATADIR)/fdpp
$(INSTALL) -m 0644 $(TARGET).elf $(DESTDIR)$(DATADIR)/fdpp
$(INSTALL) -m 0644 $(TARGET).map $(DESTDIR)$(DATADIR)/fdpp
$(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
$(INSTALL) -m 0644 fdpp.pc $(DESTDIR)$(PKGCONFIGDIR)
$(INSTALL) -d $(DESTDIR)$(PREFIX)/include/fdpp
$(INSTALL) -m 0644 $(EXT_H) $(DESTDIR)$(PREFIX)/include/fdpp
$(INSTALL) -d $(DESTDIR)$(pkgconfdir)
$(INSTALL) -m 0644 fdpp.pc $(DESTDIR)$(pkgconfdir)
$(INSTALL) -d $(DESTDIR)$(prefix)/include/fdpp
$(INSTALL) -m 0644 $(EXT_H) $(DESTDIR)$(prefix)/include/fdpp

uninstall:
$(RM) -r $(DESTDIR)$(LIBDIR)/fdpp
$(RM) -r $(DESTDIR)$(DATADIR)/fdpp
$(RM) -r $(DESTDIR)$(PKGCONFIGDIR)/fdpp.pc
$(RM) -r $(DESTDIR)$(PREFIX)/include/fdpp
$(RM) -r $(DESTDIR)$(pkgconfdir)/fdpp.pc
$(RM) -r $(DESTDIR)$(prefix)/include/fdpp

$(TGZ):
cd $(TOP) && git archive -o $(TOP)/$(TAR) --prefix=$(PKG)/ HEAD
Expand All @@ -200,7 +200,7 @@ tar: $(TGZ)

$(GEN_EXT): %: $(srcdir)/%.in makefile
sed \
-e 's!@PREFIX[@]!$(PREFIX)!g' \
-e 's!@PREFIX[@]!$(prefix)!g' \
-e 's!@INCLUDEDIR[@]!$(INCLUDEDIR)!g' \
-e 's!@LIBDIR[@]!$(LIBDIR)!g' \
-e 's!@VERSION[@]!$(VERSION)!g' \
Expand Down

0 comments on commit d7192f0

Please sign in to comment.