]> sourceware.org Git - glibc.git/blame - posix/Makefile
Remove unused -DRESOLVER getaddrinfo build flag
[glibc.git] / posix / Makefile
CommitLineData
6d7e8eda 1# Copyright (C) 1991-2023 Free Software Foundation, Inc.
28f540f4
RM
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
28f540f4
RM
8
9# The GNU C Library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12# Lesser General Public License for more details.
28f540f4 13
41bdb6e2 14# You should have received a copy of the GNU Lesser General Public
59ba27a6 15# License along with the GNU C Library; if not, see
5a82c748 16# <https://www.gnu.org/licenses/>.
28f540f4
RM
17
18#
19# Sub-makefile for POSIX portion of the library.
20#
21subdir := posix
22
a5f891ac
JM
23include ../Makeconfig
24
12a4cfca
AZ
25headers := \
26 bits/confname.h \
27 bits/cpu-set.h \
28 bits/environments.h \
29 bits/getopt_core.h \
30 bits/getopt_ext.h \
31 bits/getopt_posix.h \
32 bits/local_lim.h \
33 bits/mman_ext.h \
34 bits/posix1_lim.h \
35 bits/posix2_lim.h \
36 bits/posix_opt.h \
37 bits/pthreadtypes-arch.h \
38 bits/pthreadtypes.h \
39 bits/sched.h \
ce2bfb85 40 bits/spawn_ext.h \
12a4cfca
AZ
41 bits/thread-shared-types.h \
42 bits/types.h \
43 bits/types/idtype_t.h \
44 bits/types/struct_sched_param.h \
45 bits/typesizes.h \
391f5e96 46 bits/unistd-decl.h \
12a4cfca
AZ
47 bits/unistd.h \
48 bits/unistd_ext.h \
49 bits/utsname.h \
50 bits/waitflags.h \
51 bits/waitstatus.h \
52 cpio.h \
53 fnmatch.h \
54 getopt.h \
55 glob.h \
56 re_comp.h \
57 regex.h \
58 sched.h \
59 spawn.h \
60 sys/times.h \
61 sys/types.h \
62 sys/unistd.h \
63 sys/utsname.h \
64 sys/wait.h \
65 tar.h \
66 unistd.h \
67 wait.h \
68 wordexp.h \
69 # headers
70
71routines := \
72 _Fork \
73 _exit \
74 alarm \
75 bsd-getpgrp \
76 confstr \
77 execl \
78 execle \
79 execlp \
80 execv \
81 execve \
82 execveat \
83 execvp \
84 execvpe \
85 fexecve \
86 fnmatch \
87 fork \
88 fpathconf \
89 gai_strerror \
90 get_child_max \
91 getaddrinfo \
92 getegid \
93 geteuid \
94 getgid \
95 getgroups \
96 getopt \
97 getopt1 \
98 getpgid \
99 getpgrp \
100 getpid \
101 getppid \
102 getresgid \
103 getresuid \
104 getsid \
105 getuid \
106 glob \
107 glob-lstat-compat \
108 glob64 \
109 glob64-lstat-compat \
110 glob64-time64 \
111 glob_pattern_p \
112 globfree \
113 globfree64 \
114 globfree64-time64 \
115 group_member \
116 nanosleep \
117 pathconf \
118 pause \
119 posix_madvise \
120 pread \
121 pread64 \
122 pwrite \
123 pwrite64 \
124 regex \
125 register-atfork \
126 sched_cpualloc \
127 sched_cpucount \
128 sched_cpufree \
129 sched_getaffinity \
130 sched_getp \
131 sched_gets \
132 sched_primax \
133 sched_primin \
134 sched_rr_gi \
135 sched_setaffinity \
136 sched_setp \
137 sched_sets \
138 sched_yield \
139 setgid \
140 setpgid \
141 setpgrp \
142 setresgid \
143 setresuid \
144 setsid \
145 setuid \
146 shm-directory \
147 sleep \
148 spawn \
149 spawn_faction_addchdir \
150 spawn_faction_addclose \
151 spawn_faction_addclosefrom \
152 spawn_faction_adddup2 \
153 spawn_faction_addfchdir \
154 spawn_faction_addopen \
155 spawn_faction_addtcsetpgrp_np \
156 spawn_faction_destroy \
157 spawn_faction_init \
158 spawn_valid_fd \
159 spawnattr_destroy \
160 spawnattr_getdefault \
161 spawnattr_getflags \
162 spawnattr_getpgroup \
163 spawnattr_getschedparam \
164 spawnattr_getschedpolicy \
165 spawnattr_getsigmask \
166 spawnattr_init \
167 spawnattr_setdefault \
168 spawnattr_setflags \
169 spawnattr_setpgroup \
170 spawnattr_setschedparam \
171 spawnattr_setschedpolicy \
172 spawnattr_setsigmask \
173 spawni \
174 spawnp \
175 streams-compat \
176 sysconf \
177 times \
178 uname \
179 vfork \
180 wait \
181 wait3 \
182 wait4 \
183 waitid \
184 waitpid \
185 wordexp \
186 # routines
187
20c894d2
FB
188# Exclude fortified routines from being built with _FORTIFY_SOURCE
189routines_no_fortify += \
190 confstr \
191 getgroups \
192 pread \
193 pread64 \
194 # routines_no_fortify
195
12a4cfca
AZ
196aux := \
197 environ \
198 init-posix \
199 # aux
200
201tests := \
202 bug-ga1 \
203 bug-getopt1 \
204 bug-getopt2 \
205 bug-getopt3 \
206 bug-getopt4 \
207 bug-getopt5 \
208 bug-glob2 \
209 bug-glob3 \
210 bug-regex1 \
7b31c02d
CD
211 bug-regex2 \
212 bug-regex3 \
213 bug-regex4 \
214 bug-regex6 \
215 bug-regex7 \
216 bug-regex8 \
217 bug-regex9 \
12a4cfca
AZ
218 bug-regex10 \
219 bug-regex11 \
220 bug-regex12 \
221 bug-regex13 \
222 bug-regex14 \
223 bug-regex15 \
224 bug-regex16 \
225 bug-regex17 \
226 bug-regex18 \
227 bug-regex19 \
12a4cfca
AZ
228 bug-regex21 \
229 bug-regex22 \
230 bug-regex23 \
231 bug-regex24 \
232 bug-regex25 \
233 bug-regex26 \
234 bug-regex27 \
235 bug-regex28 \
236 bug-regex29 \
12a4cfca
AZ
237 bug-regex30 \
238 bug-regex31 \
239 bug-regex32 \
240 bug-regex34 \
241 bug-regex35 \
242 bug-regex36 \
243 bug-regex37 \
244 bug-regex38 \
12a4cfca
AZ
245 regexbug1 \
246 runptests \
247 runtests \
248 test-errno \
249 test-ssize-max \
250 test-vfork \
251 testfnm \
252 transbug \
253 tst-boost \
254 tst-chmod \
255 tst-cpucount \
256 tst-cpuset \
257 tst-dir \
258 tst-execl1 \
259 tst-execl2 \
260 tst-execle1 \
261 tst-execle2 \
262 tst-execlp1 \
263 tst-execlp2 \
264 tst-execv1 \
265 tst-execv2 \
266 tst-execve1 \
267 tst-execve2 \
268 tst-execveat \
269 tst-execvp1 \
270 tst-execvp2 \
271 tst-execvp3 \
272 tst-execvp4 \
273 tst-execvpe1 \
274 tst-execvpe2 \
275 tst-execvpe3 \
276 tst-execvpe4 \
277 tst-execvpe5 \
278 tst-execvpe6 \
279 tst-fexecve \
280 tst-fnmatch \
281 tst-fnmatch2 \
282 tst-fnmatch3 \
283 tst-fnmatch4 \
284 tst-fnmatch5 \
285 tst-fnmatch6 \
286 tst-fnmatch7 \
287 tst-fork \
127c21c0 288 tst-gai_strerror \
12a4cfca
AZ
289 tst-getaddrinfo \
290 tst-getaddrinfo2 \
291 tst-getaddrinfo3 \
292 tst-getopt_long1 \
293 tst-glob-tilde \
294 tst-glob_symlinks \
295 tst-gnuglob \
296 tst-gnuglob64 \
297 tst-mmap \
298 tst-mmap-offset \
299 tst-nanosleep \
300 tst-nice \
301 tst-pathconf \
302 tst-pcre \
303 tst-posix_fadvise \
304 tst-posix_fadvise64 \
305 tst-posix_spawn-fd \
306 tst-posix_spawn-setsid \
307 tst-preadwrite \
308 tst-preadwrite64 \
309 tst-regcomp-truncated \
310 tst-regex \
311 tst-regex2 \
312 tst-regexloc \
313 tst-rxspencer \
314 tst-rxspencer-no-utf8 \
315 tst-sched_getaffinity \
316 tst-spawn-chdir \
317 tst-spawn4 \
318 tst-spawn5 \
319 tst-spawn6 \
320 tst-spawn7 \
321 tst-sysconf \
322 tst-sysconf-empty-chroot \
323 tst-truncate \
324 tst-truncate64 \
325 tst-vfork1 \
326 tst-vfork2 \
327 tst-wait3 \
328 tst-wait4 \
329 tst-waitid \
330 tst-wordexp-nocmd \
331 tstgetopt \
332 # tests
8209c5f1
FW
333
334# Test for the glob symbol version that was replaced in glibc 2.27.
335ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
12a4cfca
AZ
336tests += \
337 tst-glob_lstat_compat
338 # tests
8209c5f1
FW
339endif
340
63c317fe
FW
341# Test for the posix_spawn, posix_spawnp symbol versions replaced in
342# glibc 2.15.
343ifeq ($(have-GLIBC_2.14)$(build-shared),yesyes)
12a4cfca
AZ
344tests += \
345 tst-spawn4-compat \
346 # tests
63c317fe
FW
347endif
348
12a4cfca 349tests-internal := \
7b31c02d 350 bug-regex5 \
12a4cfca
AZ
351 bug-regex20 \
352 bug-regex33 \
12a4cfca
AZ
353 tst-rfc3484 \
354 tst-rfc3484-2 \
355 tst-rfc3484-3 \
356 # tests-internal
357
358tests-container := \
359 bug-ga2 \
360 tst-vfork3 \
361 # tests-container
362
363tests-time64 := \
364 tst-gnuglob64-time64 \
365 tst-wait3-time64 \
366 tst-wait4-time64 \
367 # tests-time64
368
369xtests := \
370 tst-getaddrinfo4 \
371 tst-getaddrinfo5 \
372 tst-sched_rr_get_interval \
373 # xtests
374
375xtests-time64 := \
376 tst-sched_rr_get_interval-time64 \
377 # xtests-time64
378
df455ccb 379ifeq (yes,$(build-shared))
12a4cfca
AZ
380test-srcs := \
381 globtest
382 # tests-src
383tests += \
384 tst-exec \
385 tst-spawn \
386 tst-spawn2 \
387 tst-spawn3 \
388 wordexp-test \
389 # tests
df455ccb 390endif
12a4cfca 391
544ce845 392ifeq (yesyes,$(build-shared)$(have-thread-library))
12a4cfca
AZ
393tests += \
394 tst-_Fork \
395 tst-getopt-cancel \
396 # tests
544ce845 397endif
28f540f4 398
12a4cfca
AZ
399tests-static = \
400 tst-exec-static \
401 tst-spawn-static \
402 # tests-static
403
404tests += \
405 $(tests-static)
406 # tests
407
408others := \
409 getconf \
410 # others
411
412install-bin := \
413 getconf \
414 # getconf
415
416install-others-programs := \
417 $(inst_libexecdir)/getconf \
418 # install-others-programs
419
420before-compile += \
421 $(objpfx)posix-conf-vars-def.h \
422 # before-compile
4cca6b86 423
414fd335 424# So they get cleaned up.
12a4cfca
AZ
425generated += \
426 $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
427 annexc \
428 annexc.out \
429 bug-ga2-mem.out \
430 bug-ga2.mtrace \
431 bug-glob2-mem.out \
432 bug-glob2.mtrace \
433 bug-regex14-mem.out \
434 bug-regex14.mtrace \
435 bug-regex2-mem.out \
436 bug-regex2.mtrace \
437 bug-regex21-mem.out \
438 bug-regex21.mtrace \
439 bug-regex31-mem.out \
440 bug-regex31.mtrace \
441 bug-regex36.mtrace \
442 getconf.speclist \
443 ptestcases.h \
444 testcases.h \
445 tst-boost-mem.out \
446 tst-boost.mtrace \
447 tst-fnmatch-mem.out \
448 tst-fnmatch.mtrace \
449 tst-getconf.out \
450 tst-pcre-mem.out \
451 tst-pcre.mtrace \
452 tst-rxspencer-no-utf8-mem.out \
453 tst-rxspencer-no-utf8.mtrace \
454 tst-vfork3-mem.out \
455 tst-vfork3.mtrace \
456 wordexp-tst.out \
457 # generated
414fd335 458
f214606a
JM
459ifeq ($(run-built-tests),yes)
460ifeq (yes,$(build-shared))
12a4cfca
AZ
461tests-special += \
462 $(objpfx)globtest.out \
463 $(objpfx)wordexp-tst.out \
464 # tests-special
f214606a
JM
465endif
466endif
467
468# Run a test on the header files we use.
469# XXX Please note that for now we ignore the result of this test.
470tests-special += $(objpfx)annexc.out
471ifeq ($(run-built-tests),yes)
12a4cfca
AZ
472tests-special += \
473 $(objpfx)bug-ga2-mem.out \
474 $(objpfx)bug-glob2-mem.out \
475 $(objpfx)bug-regex14-mem.out \
476 $(objpfx)bug-regex2-mem.out \
477 $(objpfx)bug-regex21-mem.out \
478 $(objpfx)bug-regex31-mem.out \
479 $(objpfx)bug-regex36-mem.out \
480 $(objpfx)tst-boost-mem.out \
481 $(objpfx)tst-fnmatch-mem.out \
482 $(objpfx)tst-getconf.out \
483 $(objpfx)tst-glob-tilde-mem.out \
484 $(objpfx)tst-pcre-mem.out \
485 $(objpfx)tst-rxspencer-no-utf8-mem.out \
486 $(objpfx)tst-vfork3-mem.out \
487 # tests-special
f214606a
JM
488endif
489
28f540f4
RM
490include ../Rules
491
03ac099f 492ifeq ($(run-built-tests),yes)
df455ccb
AS
493# globtest and wordexp-test currently only works with shared libraries
494ifeq (yes,$(build-shared))
3f36c563 495$(objpfx)globtest.out: globtest.sh $(objpfx)globtest
740b3dbe 496 $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
8f8052c2 497 '$(test-program-prefix)' '$(test-wrapper-env)'; \
f0881698 498 $(evaluate-test)
3f36c563 499$(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
8540f6d2 500 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
8f8052c2 501 '$(run-program-env)' '$(test-program-prefix-after-env)'; \
f0881698 502 $(evaluate-test)
61eb22d3 503endif
f881f6ff 504
466f2be6 505LOCALES := \
7b31c02d
CD
506 C.UTF-8 \
507 cs_CZ.ISO-8859-2 \
508 cs_CZ.UTF-8 \
509 da_DK.ISO-8859-1 \
510 de_DE.ISO-8859-1 \
511 de_DE.UTF-8 \
512 en_US.UTF-8 \
513 es_US.ISO-8859-1 \
514 es_US.UTF-8 \
515 ja_JP.EUC-JP \
516 tr_TR.UTF-8 \
517 # LOCALES
f881f6ff
AS
518include ../gen-locales.mk
519
520$(objpfx)bug-regex1.out: $(gen-locales)
521$(objpfx)bug-regex4.out: $(gen-locales)
522$(objpfx)bug-regex5.out: $(gen-locales)
523$(objpfx)bug-regex6.out: $(gen-locales)
524$(objpfx)bug-regex17.out: $(gen-locales)
525$(objpfx)bug-regex18.out: $(gen-locales)
526$(objpfx)bug-regex19.out: $(gen-locales)
527$(objpfx)bug-regex20.out: $(gen-locales)
528$(objpfx)bug-regex22.out: $(gen-locales)
529$(objpfx)bug-regex23.out: $(gen-locales)
530$(objpfx)bug-regex25.out: $(gen-locales)
531$(objpfx)bug-regex26.out: $(gen-locales)
532$(objpfx)bug-regex30.out: $(gen-locales)
533$(objpfx)bug-regex32.out: $(gen-locales)
534$(objpfx)bug-regex33.out: $(gen-locales)
535$(objpfx)bug-regex34.out: $(gen-locales)
536$(objpfx)bug-regex35.out: $(gen-locales)
537$(objpfx)tst-fnmatch.out: $(gen-locales)
538$(objpfx)tst-fnmatch4.out: $(gen-locales)
539$(objpfx)tst-fnmatch5.out: $(gen-locales)
a140ff91 540$(objpfx)tst-fnmatch6.out: $(gen-locales)
f881f6ff
AS
541$(objpfx)tst-regex.out: $(gen-locales)
542$(objpfx)tst-regex2.out: $(gen-locales)
543$(objpfx)tst-regexloc.out: $(gen-locales)
544$(objpfx)tst-rxspencer.out: $(gen-locales)
545$(objpfx)tst-rxspencer-no-utf8.out: $(gen-locales)
761404b7 546$(objpfx)tst-regcomp-truncated.out: $(gen-locales)
df455ccb 547endif
61eb22d3 548
09055553
RM
549# If we will use the generic uname implementation, we must figure out what
550# it will say by examining the system, and write the results in config-name.h.
551uname.c: $(objpfx)config-name.h
552$(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
848917f9 553 $(make-target-directory)
09055553
RM
554 $< '$(config-os)' '$(config-release)' \
555 '$(config-machine)-$(config-vendor)' > $@.new
556 mv -f $@.new $@
557
99b4327a 558CFLAGS-getaddrinfo.c += -fexceptions
36975e8e
L
559CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
560CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
8d98c7c0 561CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
36975e8e 562CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
8d98c7c0 563CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
36975e8e
L
564CFLAGS-sleep.c += -fexceptions
565CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
566CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
567CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
57e687c6 568CFLAGS-wait4.c += -fexceptions -fasynchronous-unwind-tables
36975e8e
L
569CFLAGS-getopt.c += -fexceptions
570CFLAGS-wordexp.c += -fexceptions
70fb71fd 571CFLAGS-wordexp.os = -fomit-frame-pointer
36975e8e
L
572CFLAGS-sysconf.c += -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
573CFLAGS-pathconf.c += -fexceptions
574CFLAGS-fpathconf.c += -fexceptions
575CFLAGS-spawn.c += -fexceptions
70fb71fd 576CFLAGS-spawn.os = -fomit-frame-pointer
36975e8e 577CFLAGS-spawnp.c += -fexceptions
70fb71fd 578CFLAGS-spawnp.os = -fomit-frame-pointer
36975e8e 579CFLAGS-spawni.c += -fexceptions
70fb71fd 580CFLAGS-spawni.os = -fomit-frame-pointer
36975e8e
L
581CFLAGS-glob.c += $(uses-callbacks) -fexceptions
582CFLAGS-glob64.c += $(uses-callbacks) -fexceptions
583CFLAGS-getconf.c += -DGETCONF_DIR='"$(libexecdir)/getconf"'
70fb71fd
UD
584CFLAGS-execve.os = -fomit-frame-pointer
585CFLAGS-fexecve.os = -fomit-frame-pointer
586CFLAGS-execv.os = -fomit-frame-pointer
587CFLAGS-execle.os = -fomit-frame-pointer
588CFLAGS-execl.os = -fomit-frame-pointer
589CFLAGS-execvp.os = -fomit-frame-pointer
590CFLAGS-execlp.os = -fomit-frame-pointer
36975e8e 591CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
8d98c7c0 592CFLAGS-fork.c = $(libio-mtsafe) $(config-cflags-wno-ignored-attributes)
7a114794 593
e25054c4 594tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
b64cd08a 595 --none random --col --color --colour
0793d348 596
740b3dbe 597tst-exec-ARGS = -- $(host-test-program-cmd)
4cf8f209 598tst-exec-static-ARGS = $(tst-exec-ARGS)
1eb89306 599tst-execvpe5-ARGS = -- $(host-test-program-cmd)
740b3dbe 600tst-spawn-ARGS = -- $(host-test-program-cmd)
4cf8f209 601tst-spawn-static-ARGS = $(tst-spawn-ARGS)
882d6e17 602tst-spawn5-ARGS = -- $(host-test-program-cmd)
342cc934 603tst-spawn6-ARGS = -- $(host-test-program-cmd)
2053c113 604tst-spawn7-ARGS = -- $(host-test-program-cmd)
0d6f9f62 605tst-posix_spawn-setsid-ARGS = -- $(host-test-program-cmd)
53e5cdd8 606tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
3aa65137 607tst-chmod-ARGS = $(objdir)
df859a0c 608tst-vfork3-ARGS = --test-dir=$(objpfx)
079199de 609
c13c99fa 610tst-rxspencer-ARGS = --utf8 rxspencer/tests
7f98f180 611tst-rxspencer-no-utf8-ARGS = rxspencer/tests
6c805a2b
UD
612tst-pcre-ARGS = PCRE.tests
613tst-boost-ARGS = BOOST.tests
0da4ee55 614bug-glob1-ARGS = "$(objpfx)"
506cbf1f 615tst-execvp3-ARGS = --test-dir=$(objpfx)
27f10a09 616CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
0d6af3a8 617
20c894d2
FB
618# Test voluntarily overflows struct dirent
619CFLAGS-bug-glob2.c += $(no-fortify-source)
620
250102c8 621$(objpfx)testcases.h: TESTS TESTS2C.sed
3e6bd4b1 622 LC_ALL=C sed -f TESTS2C.sed < $< > $@T
250102c8
FW
623 mv $@T $@
624$(objpfx)runtests.o: $(objpfx)testcases.h
92040cbc 625
250102c8 626$(objpfx)ptestcases.h: PTESTS PTESTS2C.sed
3e6bd4b1 627 LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
250102c8
FW
628 mv $@T $@
629$(objpfx)runptests.o: $(objpfx)ptestcases.h
4959e310 630
544ce845 631$(objpfx)tst-getopt-cancel: $(shared-thread-library)
c32c868a 632$(objpfx)tst-_Fork: $(shared-thread-library)
544ce845 633
f8c17e79 634test-xfail-annexc = yes
3f36c563 635$(objpfx)annexc.out: $(objpfx)annexc
f8c17e79 636 $(dir $<)$(notdir $<) '$(CC)' \
f0881698
JM
637 '$(patsubst %,-I../%,$(sorted-subdirs)) -I../include $(+sysdep-includes) $(sysincludes) -I..' > $@; \
638 $(evaluate-test)
4959e310 639
e69924e3 640annexc-CFLAGS = -O
4959e310
UD
641$(objpfx)annexc: annexc.c
642 $(native-compile)
770d454d 643
2d2d9f2b
SP
644tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace \
645 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
3540d66b 646
0b20a9e8 647$(objpfx)tst-fnmatch-mem.out: $(objpfx)tst-fnmatch.out
f0881698
JM
648 $(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@; \
649 $(evaluate-test)
3540d66b 650
2d2d9f2b
SP
651bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace \
652 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
770d454d 653
0b20a9e8 654$(objpfx)bug-regex2-mem.out: $(objpfx)bug-regex2.out
f0881698
JM
655 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@; \
656 $(evaluate-test)
a3bbce5b 657
2d2d9f2b
SP
658bug-regex14-ENV = MALLOC_TRACE=$(objpfx)bug-regex14.mtrace \
659 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
240e87c2 660
0b20a9e8 661$(objpfx)bug-regex14-mem.out: $(objpfx)bug-regex14.out
f0881698
JM
662 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex14.mtrace > $@; \
663 $(evaluate-test)
240e87c2 664
2d2d9f2b
SP
665bug-regex21-ENV = MALLOC_TRACE=$(objpfx)bug-regex21.mtrace \
666 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
ee70274a 667
0b20a9e8 668$(objpfx)bug-regex21-mem.out: $(objpfx)bug-regex21.out
f0881698
JM
669 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@; \
670 $(evaluate-test)
ee70274a 671
2d2d9f2b
SP
672bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace \
673 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
ef06edbe 674
0b20a9e8 675$(objpfx)bug-regex31-mem.out: $(objpfx)bug-regex31.out
f0881698
JM
676 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@; \
677 $(evaluate-test)
ef06edbe 678
2d2d9f2b
SP
679bug-regex36-ENV = MALLOC_TRACE=$(objpfx)bug-regex36.mtrace \
680 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
4d43ef1e
AS
681
682$(objpfx)bug-regex36-mem.out: $(objpfx)bug-regex36.out
683 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex36.mtrace > $@; \
684 $(evaluate-test)
685
2d2d9f2b
SP
686tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace \
687 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
df859a0c 688
0b20a9e8 689$(objpfx)tst-vfork3-mem.out: $(objpfx)tst-vfork3.out
c142eb25
SP
690 { test -r $(objpfx)tst-vfork3.mtrace \
691 || ( echo "tst-vfork3.mtrace does not exist"; exit 77; ) \
692 && $(common-objpfx)malloc/mtrace $(objpfx)tst-vfork3.mtrace; } > $@; \
f0881698 693 $(evaluate-test)
df859a0c 694
7f98f180
JM
695# tst-rxspencer.mtrace is not generated, only
696# tst-rxspencer-no-utf8.mtrace, since otherwise the file has almost
697# 100M and takes very long time to process.
2d2d9f2b
SP
698tst-rxspencer-no-utf8-ENV += \
699 MALLOC_TRACE=$(objpfx)tst-rxspencer-no-utf8.mtrace \
700 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
0b20a9e8 701$(objpfx)tst-rxspencer-no-utf8-mem.out: $(objpfx)tst-rxspencer-no-utf8.out
f0881698
JM
702 $(common-objpfx)malloc/mtrace $(objpfx)tst-rxspencer-no-utf8.mtrace \
703 > $@; \
704 $(evaluate-test)
ee70274a 705
2d2d9f2b
SP
706tst-pcre-ENV = MALLOC_TRACE=$(objpfx)tst-pcre.mtrace \
707 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
0b20a9e8 708$(objpfx)tst-pcre-mem.out: $(objpfx)tst-pcre.out
f0881698
JM
709 $(common-objpfx)malloc/mtrace $(objpfx)tst-pcre.mtrace > $@; \
710 $(evaluate-test)
6c805a2b 711
2d2d9f2b
SP
712tst-boost-ENV = MALLOC_TRACE=$(objpfx)tst-boost.mtrace \
713 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
0b20a9e8 714$(objpfx)tst-boost-mem.out: $(objpfx)tst-boost.out
f0881698
JM
715 $(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@; \
716 $(evaluate-test)
6c805a2b 717
a3bbce5b 718$(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
8f8052c2 719 $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'; \
f0881698 720 $(evaluate-test)
64333c66 721
0b20a9e8 722$(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
aa7e05c3
SL
723 { test -r $(objpfx)bug-ga2.mtrace \
724 || ( echo "bug-ga2.mtrace does not exist"; exit 77; ) \
725 && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace; } > $@; \
f0881698 726 $(evaluate-test)
5605e117 727
2d2d9f2b
SP
728bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace \
729 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
778cddad 730
2d2d9f2b
SP
731bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace \
732 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
778cddad 733
0b20a9e8 734$(objpfx)bug-glob2-mem.out: $(objpfx)bug-glob2.out
f0881698
JM
735 $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@; \
736 $(evaluate-test)
28f367c4 737
2d2d9f2b
SP
738tst-glob-tilde-ENV = MALLOC_TRACE=$(objpfx)tst-glob-tilde.mtrace \
739 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
e80fc1fc
FW
740
741$(objpfx)tst-glob-tilde-mem.out: $(objpfx)tst-glob-tilde.out
742 $(common-objpfx)malloc/mtrace $(objpfx)tst-glob-tilde.mtrace > $@; \
743 $(evaluate-test)
744
db502a60
RM
745$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
746 $(objpfx)getconf.speclist FORCE
28f367c4
UD
747 $(addprefix $(..)./scripts/mkinstalldirs ,\
748 $(filter-out $(wildcard $@),$@))
db502a60
RM
749 while read spec; do \
750 ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
751 mv -f $@/$$spec.new $@/$$spec; \
752 done < $(objpfx)getconf.speclist
753
531f1ae0
JM
754$(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
755 $(compile.c) -E -o - \
756 | sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > $@.new
d9967a8b 757 mv -f $@.new $@
ad98e30c
RM
758
759# This file is only actually needed at install time. But forcing it to
760# be built both makes it available for eyeball inspection and avoids the
761# surprise of things that look like compilation being done by 'make install'.
762others: $(objpfx)getconf.speclist
4a6aca7b
SP
763
764$(objpfx)posix-conf-vars-def.h: $(..)scripts/gen-posix-conf-vars.awk \
765 posix-conf-vars.list Makefile
766 $(make-target-directory)
767 $(AWK) -f $(filter-out Makefile, $^) > $@.tmp
768 mv -f $@.tmp $@
This page took 0.74624 seconds and 5 git commands to generate.