source: rtems-libbsd/Makefile.todo @ fa3e012

5-freebsd-12
Last change on this file since fa3e012 was fa3e012, checked in by Sebastian Huber <sebastian.huber@…>, on Aug 28, 2018 at 10:00:46 AM

Update yacc and lex generated files

Use the FreeBSD 11.1 yacc and lex tools to generate the files.

Update #3472.

  • Property mode set to 100644
File size: 8.9 KB
Line 
1LOCAL_INC = rtemsbsd/include/rtems/bsd/local
2
3LOCAL_SRC = rtemsbsd/local
4
5FREEBSD_SRC = freebsd-org
6
7TOOLS = freebsd-org/sys/tools
8
9GENERATED =
10GENERATED += $(LOCAL_INC)/usb_if.h
11GENERATED += $(LOCAL_SRC)/usb_if.c
12GENERATED += $(LOCAL_INC)/bus_if.h
13GENERATED += $(LOCAL_SRC)/bus_if.c
14GENERATED += $(LOCAL_INC)/device_if.h
15GENERATED += $(LOCAL_SRC)/device_if.c
16GENERATED += $(LOCAL_INC)/usbdevs_data.h
17GENERATED += $(LOCAL_INC)/usbdevs.h
18GENERATED += $(LOCAL_INC)/ifdi_if.h
19GENERATED += $(LOCAL_SRC)/ifdi_if.c
20GENERATED += $(LOCAL_INC)/miibus_if.h
21GENERATED += $(LOCAL_SRC)/miibus_if.c
22GENERATED += $(LOCAL_INC)/miidevs.h
23GENERATED += $(LOCAL_INC)/ofw_if.h
24GENERATED += $(LOCAL_SRC)/ofw_if.c
25GENERATED += $(LOCAL_INC)/ofw_bus_if.h
26GENERATED += $(LOCAL_SRC)/ofw_bus_if.c
27GENERATED += $(LOCAL_INC)/pci_if.h
28GENERATED += $(LOCAL_SRC)/pci_if.c
29GENERATED += $(LOCAL_INC)/pcib_if.h
30GENERATED += $(LOCAL_SRC)/pcib_if.c
31GENERATED += $(LOCAL_INC)/mmcbr_if.h
32GENERATED += $(LOCAL_SRC)/mmcbr_if.c
33GENERATED += $(LOCAL_INC)/mmcbus_if.h
34GENERATED += $(LOCAL_SRC)/mmcbus_if.c
35GENERATED += $(LOCAL_SRC)/rtwn-rtl8192cfwT.c
36GENERATED += $(LOCAL_SRC)/rtwn-rtl8188eufw.c
37GENERATED += $(LOCAL_SRC)/runfw.c
38GENERATED += $(LOCAL_INC)/sdhci_if.h
39GENERATED += $(LOCAL_SRC)/sdhci_if.c
40GENERATED += $(LOCAL_INC)/gpiobus_if.h
41GENERATED += $(LOCAL_SRC)/gpiobus_if.c
42GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h
43GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c
44GENERATED += freebsd/contrib/libpcap/pcap_version.h
45
46YACC_GENERATED =
47LEX_GENERATED =
48
49YACC_GENERATED += freebsd/lib/libc/net/nsparser.h
50YACC_GENERATED += freebsd/lib/libc/net/nsparser.c
51LEX_GENERATED += freebsd/lib/libc/net/nslexer.c
52
53YACC_GENERATED += freebsd/sbin/pfctl/parse.h
54YACC_GENERATED += freebsd/sbin/pfctl/parse.c
55
56YACC_GENERATED += freebsd/contrib/libpcap/grammar.h
57YACC_GENERATED += freebsd/contrib/libpcap/grammar.c
58LEX_GENERATED += freebsd/contrib/libpcap/scanner.h
59LEX_GENERATED += freebsd/contrib/libpcap/scanner.c
60
61yacc: $(YACC_GENERATED)
62
63lex: $(LEX_GENERATED)
64
65all: yacc lex $(GENERATED)
66
67$(LOCAL_INC)/usbdevs.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
68        awk -f $(TOOLS)/usbdevs2h.awk $< -h
69        mv usbdevs.h $@
70
71$(LOCAL_INC)/usbdevs_data.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
72        awk -f $(TOOLS)/usbdevs2h.awk $< -d
73        mv usbdevs_data.h $@
74
75$(LOCAL_INC)/usb_if.h: $(FREEBSD_SRC)/sys/dev/usb/usb_if.m
76        awk -f $(TOOLS)/makeobjops.awk $< -h
77        mv usb_if.h $@
78
79$(LOCAL_SRC)/usb_if.c: $(FREEBSD_SRC)/sys/dev/usb/usb_if.m
80        awk -f $(TOOLS)/makeobjops.awk $< -c
81        mv usb_if.c $@
82
83$(LOCAL_INC)/bus_if.h: $(FREEBSD_SRC)/sys/kern/bus_if.m
84        awk -f $(TOOLS)/makeobjops.awk $< -h
85        mv bus_if.h $@
86
87$(LOCAL_SRC)/bus_if.c: $(FREEBSD_SRC)/sys/kern/bus_if.m
88        awk -f $(TOOLS)/makeobjops.awk $< -c
89        mv bus_if.c $@
90
91$(LOCAL_INC)/device_if.h: $(FREEBSD_SRC)/sys/kern/device_if.m
92        awk -f $(TOOLS)/makeobjops.awk $< -h
93        mv device_if.h $@
94
95$(LOCAL_SRC)/device_if.c: $(FREEBSD_SRC)/sys/kern/device_if.m
96        awk -f $(TOOLS)/makeobjops.awk $< -c
97        mv device_if.c $@
98
99$(LOCAL_INC)/ifdi_if.h: $(FREEBSD_SRC)/sys/net/ifdi_if.m
100        awk -f $(TOOLS)/makeobjops.awk $< -h
101        mv ifdi_if.h $@
102
103$(LOCAL_SRC)/ifdi_if.c: $(FREEBSD_SRC)/sys/net/ifdi_if.m
104        awk -f $(TOOLS)/makeobjops.awk $< -c
105        mv ifdi_if.c $@
106
107$(LOCAL_INC)/miidevs.h: $(FREEBSD_SRC)/sys/dev/mii/miidevs
108        awk -f $(TOOLS)/miidevs2h.awk $<
109        mv miidevs.h $@
110
111$(LOCAL_INC)/miibus_if.h: $(FREEBSD_SRC)/sys/dev/mii/miibus_if.m
112        awk -f $(TOOLS)/makeobjops.awk $< -h
113        mv miibus_if.h $@
114
115$(LOCAL_SRC)/miibus_if.c: $(FREEBSD_SRC)/sys/dev/mii/miibus_if.m
116        awk -f $(TOOLS)/makeobjops.awk $< -c
117        mv miibus_if.c $@
118
119$(LOCAL_INC)/pci_if.h: $(FREEBSD_SRC)/sys/dev/pci/pci_if.m
120        awk -f $(TOOLS)/makeobjops.awk $< -h
121        mv pci_if.h $@
122
123$(LOCAL_SRC)/pci_if.c: $(FREEBSD_SRC)/sys/dev/pci/pci_if.m
124        awk -f $(TOOLS)/makeobjops.awk $< -c
125        mv pci_if.c $@
126
127$(LOCAL_INC)/pcib_if.h: $(FREEBSD_SRC)/sys/dev/pci/pcib_if.m
128        awk -f $(TOOLS)/makeobjops.awk $< -h
129        mv pcib_if.h $@
130
131$(LOCAL_SRC)/pcib_if.c: $(FREEBSD_SRC)/sys/dev/pci/pcib_if.m
132        awk -f $(TOOLS)/makeobjops.awk $< -c
133        mv pcib_if.c $@
134
135$(LOCAL_INC)/mmcbus_if.h: $(FREEBSD_SRC)/sys/dev/mmc/mmcbus_if.m
136        awk -f $(TOOLS)/makeobjops.awk $< -h
137        mv mmcbus_if.h $@
138
139$(LOCAL_SRC)/mmcbus_if.c: $(FREEBSD_SRC)/sys/dev/mmc/mmcbus_if.m
140        awk -f $(TOOLS)/makeobjops.awk $< -c
141        mv mmcbus_if.c $@
142
143$(LOCAL_INC)/mmcbr_if.h: $(FREEBSD_SRC)/sys/dev/mmc/mmcbr_if.m
144        awk -f $(TOOLS)/makeobjops.awk $< -h
145        mv mmcbr_if.h $@
146
147$(LOCAL_SRC)/mmcbr_if.c: $(FREEBSD_SRC)/sys/dev/mmc/mmcbr_if.m
148        awk -f $(TOOLS)/makeobjops.awk $< -c
149        mv mmcbr_if.c $@
150
151$(LOCAL_INC)/ofw_if.h: $(FREEBSD_SRC)/sys/dev/ofw/ofw_if.m
152        awk -f $(TOOLS)/makeobjops.awk $< -h
153        mv ofw_if.h $@
154
155$(LOCAL_SRC)/ofw_if.c: $(FREEBSD_SRC)/sys/dev/ofw/ofw_if.m
156        awk -f $(TOOLS)/makeobjops.awk $< -c
157        mv ofw_if.c $@
158
159$(LOCAL_INC)/ofw_bus_if.h: $(FREEBSD_SRC)/sys/dev/ofw/ofw_bus_if.m
160        awk -f $(TOOLS)/makeobjops.awk $< -h
161        mv ofw_bus_if.h $@
162
163$(LOCAL_SRC)/ofw_bus_if.c: $(FREEBSD_SRC)/sys/dev/ofw/ofw_bus_if.m
164        awk -f $(TOOLS)/makeobjops.awk $< -c
165        mv ofw_bus_if.c $@
166
167$(LOCAL_INC)/if_dwc_if.h: $(FREEBSD_SRC)/sys/dev/dwc/if_dwc_if.m
168        awk -f $(TOOLS)/makeobjops.awk $< -h
169        mv if_dwc_if.h $@
170
171$(LOCAL_SRC)/if_dwc_if.c: $(FREEBSD_SRC)/sys/dev/dwc/if_dwc_if.m
172        awk -f $(TOOLS)/makeobjops.awk $< -c
173        mv if_dwc_if.c $@
174
175$(LOCAL_INC)/gpio_if.h: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m
176        awk -f $(TOOLS)/makeobjops.awk $< -h
177        mv gpio_if.h $@
178
179$(LOCAL_INC)/gpiobus_if.h: $(FREEBSD_SRC)/sys/dev/gpio/gpiobus_if.m
180        awk -f $(TOOLS)/makeobjops.awk $< -h
181        mv gpiobus_if.h $@
182
183$(LOCAL_SRC)/gpiobus_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpiobus_if.m
184        awk -f $(TOOLS)/makeobjops.awk $< -c
185        sed -i gpiobus_if.c \
186            -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
187            -e 's|#include "gpiobus_if.h"|#include <rtems/bsd/local/gpiobus_if.h>|'
188        mv gpiobus_if.c $@
189
190$(LOCAL_INC)/sdhci_if.h: $(FREEBSD_SRC)/sys/dev/sdhci/sdhci_if.m
191        awk -f $(TOOLS)/makeobjops.awk $< -h
192        mv sdhci_if.h $@
193
194$(LOCAL_SRC)/sdhci_if.c: $(FREEBSD_SRC)/sys/dev/sdhci/sdhci_if.m
195        awk -f $(TOOLS)/makeobjops.awk $< -c
196        sed -i sdhci_if.c \
197            -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
198            -e 's|#include "sdhci_if.h"|#include <rtems/bsd/local/sdhci_if.h>|'
199        mv sdhci_if.c $@
200
201$(LOCAL_SRC)/gpio_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m
202        awk -f $(TOOLS)/makeobjops.awk $< -c
203        mv gpio_if.c $@
204
205$(LOCAL_SRC)/rtwn-rtl8192cfwT.c: $(FREEBSD_SRC)/sys/contrib/dev/rtwn/rtwn-rtl8192cfwT.fw.uu
206        uudecode -o /dev/stdout $< | python firmware-gen.py \
207            -l "$(FREEBSD_SRC)/sys/contrib/dev/rtwn/LICENSE" \
208            rtwn-rtl8192cfwT - $@
209
210$(LOCAL_SRC)/rtwn-rtl8188eufw.c: $(FREEBSD_SRC)/sys/contrib/dev/rtwn/rtwn-rtl8188eufw.fw.uu
211        uudecode -o /dev/stdout $< | python firmware-gen.py \
212            -l "$(FREEBSD_SRC)/sys/contrib/dev/rtwn/LICENSE" \
213            rtwn-rtl8188eufw - $@
214
215$(LOCAL_SRC)/runfw.c: $(FREEBSD_SRC)/sys/contrib/dev/run/rt2870.fw.uu
216        uudecode -o /dev/stdout $< | python firmware-gen.py \
217            -l "$(FREEBSD_SRC)/sys/contrib/dev/run/LICENSE" \
218            runfw - $@
219
220freebsd/usr.bin/netstat/nl_symbols.c: $(FREEBSD_SRC)/usr.bin/netstat/nlist_symbols
221        awk '\
222            BEGIN { \
223                print "#include <sys/param.h>"; \
224                print "#include <nlist.h>"; \
225                print "const struct nlist nl[] = {"; \
226            } \
227            !/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \
228            END { print "\t{ .n_name = NULL },\n};" } \
229            ' < $< > $@ || rm -f $@
230
231freebsd/usr.bin/netstat/nl_defs.h: $(FREEBSD_SRC)/usr.bin/netstat/nlist_symbols
232        awk '\
233            BEGIN { \
234                print "#include <nlist.h>"; \
235                print "extern const struct nlist nl[];"; \
236                i = 0; \
237            } \
238            !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
239            < $< > $@ || rm -f $@
240
241rtemsbsd/include/machine/rtems-bsd-regdomain.h: $(FREEBSD_SRC)/etc/regdomain.xml
242        rtems-bin2c -H $< $@
243
244rtemsbsd/rtems/rtems-bsd-regdomain.c: $(FREEBSD_SRC)/etc/regdomain.xml
245        rtems-bin2c -C $< $@
246
247freebsd/contrib/libpcap/pcap_version.h: freebsd-org/contrib/libpcap/VERSION
248        freebsd-org/contrib/libpcap/gen_version_header.sh $< freebsd-org/contrib/libpcap/pcap_version.h.in $@
249
250freebsd/lib/libc/net/nsparser.h: freebsd/lib/libc/net/nsparser.c
251
252freebsd/lib/libc/net/nsparser.c: freebsd/lib/libc/net/nsparser.y
253        cd freebsd/lib/libc/net && yacc -p _nsyy -o nsparser.c -d nsparser.y
254
255freebsd/lib/libc/net/nslexer.c: freebsd/lib/libc/net/nslexer.l
256        cd freebsd/lib/libc/net && lex -P _nsyy -DYY_BUF_SIZE=1024 -o nslexer.c nslexer.l
257
258freebsd/sbin/pfctl/parse.h: freebsd/sbin/pfctl/parse.c
259
260freebsd/sbin/pfctl/parse.c: freebsd/sbin/pfctl/parse.y
261        cd freebsd/sbin/pfctl && yacc -p pfctly -o parse.c -d parse.y
262
263freebsd/contrib/libpcap/grammar.h: freebsd/contrib/libpcap/grammar.c
264
265freebsd/contrib/libpcap/grammar.c: freebsd/contrib/libpcap/grammar.y
266        cd freebsd/contrib/libpcap && yacc -p pcap_ -o grammar.c -d grammar.y
267
268freebsd/contrib/libpcap/scanner.h: freebsd/contrib/libpcap/scanner.c
269
270freebsd/contrib/libpcap/scanner.c: freebsd/contrib/libpcap/scanner.l
271        cd freebsd/contrib/libpcap && lex -P pcap_ --header-file=scanner.h --nounput -o scanner.c scanner.l
272
273clean-yacc:
274        rm $(YACC_GENERATED)
275
276clean-lex:
277        rm $(LEX_GENERATED)
278
279clean: clean-yacc clean-lex
280        rm $(GENERATED)
Note: See TracBrowser for help on using the repository browser.