File: 0005-makefile.patch

package info (click to toggle)
docbook-to-man 1%3A2.0.0-49
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,824 kB
  • sloc: ansic: 5,843; makefile: 155; sh: 28
file content (58 lines) | stat: -rw-r--r-- 1,541 bytes parent folder | download | duplicates (3)
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
From: Philipp Benner <philipp@debian.org>
Date: Fri, 12 May 2017 10:49:00 +0200
Subject: makefile

Fix bad use of CFLAGS in Makefiles

===================================================================
---
 Instant/Makefile           | 5 +++--
 Instant/tptregexp/Makefile | 5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Instant/Makefile b/Instant/Makefile
index 47e230b..02c691c 100644
--- a/Instant/Makefile
+++ b/Instant/Makefile
@@ -76,8 +76,6 @@ DEFINES		= -DDEF_TPT_LIB=\"$(TPTLIB)\" $(XDEFINES)
 CC	= gcc
 
 OPT	= -g
-CFLAGS	= $(OPT) $(REGEX_INC) $(DEFINES)
-LDFLAGS	= $(OPT)
 REGEX	= -L$(REGEX_LIB) -ltptregexp
 
 CFILES	= main.c util.c info.c translate.c traninit.c tranvar.c tables.c \
@@ -89,6 +87,9 @@ PROGS	= instant
 
 all:	dotptregexp $(PROGS)
 
+%.o : %.c
+	$(CC) -c $(CFLAGS) $(OPT) $(REGEX_INC) $(DEFINES) $< -o $@
+
 dotptregexp:
 	cd tptregexp; $(MAKE) all
 
diff --git a/Instant/tptregexp/Makefile b/Instant/tptregexp/Makefile
index 77f9c16..3d1cfa1 100644
--- a/Instant/tptregexp/Makefile
+++ b/Instant/tptregexp/Makefile
@@ -50,7 +50,7 @@ TEST=	-I.
 # -p			profiler
 PROF=
 
-CFLAGS=-O $(ENV) $(TEST) $(PROF)
+CFLAGS=-O $(ENV)
 LINTFLAGS=$(LENV) $(TEST) -ha
 LDFLAGS=
 
@@ -67,6 +67,9 @@ install: libtptregexp.a
 try:	try.o $(OBJ)
 	$(CC) $(LDFLAGS) try.o $(OBJ) -o try
 
+%.o : %.c
+	$(CC) -c $(CFLAGS) $(TEST) $(PROF) $< -o $@
+
 # Making timer will probably require putting stuff in $(PROF) and then
 # recompiling everything; the following is just the final stage.
 timer:	timer.o $(OBJ)