|
root / base / usr / src / cmd / sgs / m4 / Makefile.com
Makefile.com Makefile 44 lines 855 B
 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
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# Copyright 2025 Hammerhead Project
#

PROG = m4

include $(SRC)/cmd/Makefile.cmd
include $(SRC)/cmd/sgs/Makefile.com

# Hammerhead: Suppress dangling-else warning in legacy m4 code
CERRWARN += -Wno-dangling-else
# Hammerhead: yaccpar generates unused labels
CERRWARN += -Wno-unused-label

# Hammerhead: m4 needs all object files, including yacc-generated parser
OBJS = m4.o m4ext.o m4macs.o m4y.o

SRCS = $(OBJS:%.o=../common/%.c)

.KEEP_STATE:

all: $(PROG)

$(PROG): $(OBJS)
	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
	$(POST_PROCESS)

%.o: ../common/%.c
	$(COMPILE.c) $<

m4y.c: ../common/m4y.y
	$(YACC.y) ../common/m4y.y
	$(MV) y.tab.c m4y.c

clean:
	$(RM) $(OBJS)

clobber: clean
	$(RM) $(PROG)

install: all $(ROOTPROG)