aports/testing/hx/broken-makefile.patch
2023-05-26 01:03:23 +02:00

40 lines
1.2 KiB
Diff

- don't ignore cflags/ldflags
- install to usr/share not share
- don't strip always
- don't pre-compress manpage with minimum compression
- don't rebuild for install
--
diff --git a/Makefile b/Makefile
index 6b37510..35cb380 100644
--- a/Makefile
+++ b/Makefile
@@ -4,14 +4,13 @@ hx_version != git describe --tags 2>/dev/null || echo "1.0.0"
CPPFLAGS = -DNDEBUG -DHX_GIT_HASH=\"$(hx_git_hash)\" -DHX_VERSION=\"$(hx_version)\"
CPPFLAGS += -D_POSIX_SOURCE # sigaction
CPPFLAGS += -D__BSD_VISIBLE # SIGWINCH on FreeBSD.
-CFLAGS = -std=c99 -Wall -Wextra -pedantic -O3 -MMD -MP
-LDFLAGS = -O3
+CFLAGS += -std=c99 -Wall -Wextra -pedantic -MMD -MP
objects := hx.o editor.o charbuf.o util.o undo.o
PREFIX ?= /usr/local
bindir = /bin
-mandir = /man
+mandir = /share/man
%.gz: %
gzip -k $<
@@ -24,9 +23,9 @@ debug: CPPFLAGS += -UNDEBUG # undefine the NDEBUG flag to allow assert().
debug: CFLAGS += -ggdb -Og
debug: LDFLAGS += -ggdb -Og
-install: all
- install -Dm755 -s ./hx -t $(DESTDIR)$(PREFIX)$(bindir)
- install -Dm644 ./hx.1.gz -t $(DESTDIR)$(PREFIX)$(mandir)/man1
+install:
+ install -Dm755 ./hx -t $(DESTDIR)$(PREFIX)$(bindir)
+ install -Dm644 ./hx.1 -t $(DESTDIR)$(PREFIX)$(mandir)/man1
static: all
static: LDFLAGS += -static