blob: 462965dc7dddc8ea1dacb3a1ce443b7796e17c38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
From 34552399a8de874344ae095cd5533232449ccc0a Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@geekplace.eu>
Date: Wed, 28 Feb 2024 20:03:49 +0100
Subject: [PATCH] opbible: improve Makefile, respect user's CXX, C(P|XX)FLAGS,
and LDFLAGS
Make the Makefile respect the user's CXX, C(P|XX)FLAGS, and LDFLAGS by
either using GNU Make's implicit rules or by appending instead of
overriding the CXXFLAGS variable. This also has the nice advantage
that the Makefile becomes more idiomatic and shorter.
The Makefile not respecting user variables was initially report by
Gentoo's CI and the following two downstream bugs:
- https://bugs.gentoo.org/925710
- https://bugs.gentoo.org/925711
--- a/texmf-dist/doc/luatex/opbible/txs-gen/Makefile
+++ b/texmf-dist/doc/luatex/opbible/txs-gen/Makefile
@@ -5,35 +5,19 @@
## definitions
-CXX = g++
-LD = g++
-LIBS = -lsword
-LDFLAGS = $(LIBS)
-CXXFLAGS = -I/usr/include/sword
+LDLIBS = -lsword
-target = mod2tex
-objects = mod2tex.o
+CXXFLAGS += -I/usr/include/sword
## static rules
.PHONY : all
-all : $(target)
-
-$(target) : $(objects)
- $(LD) -o $@ $< $(LDFLAGS)
-
-$(objects) : %.o: %.cpp
- $(CXX) -c $(CXXFLAGS) -o $@ $<
+all : mod2tex
.PHONY : clean
clean :
- -rm -f *~ $(objects) $(target)
-
-## pattern rules
-
-%.o : %.cpp
- $(CXX) -c $(CFLAGS) $(CXXFLAGS) -o $@ $<
+ -rm -f *~ mod2tex
### Makefile ends here
--
2.43.0
|