1# machine-independent gen sources 2.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen ${SRCTOP}/etc 3 4CONFS+= group master.passwd shells 5CONFSMODE_master.passwd= 600 6CONFSPACKAGE= runtime 7 8SRCS+= \ 9 __pthread_mutex_init_calloc_cb_stub.c \ 10 __xuname.c \ 11 _once_stub.c \ 12 _pthread_stubs.c \ 13 _rand48.c \ 14 _spinlock_stub.c \ 15 _thread_init.c \ 16 aio_read2.c \ 17 aio_write2.c \ 18 alarm.c \ 19 arc4random.c \ 20 arc4random-compat.c \ 21 arc4random_uniform.c \ 22 assert.c \ 23 basename.c \ 24 basename_compat.c \ 25 cap_sandboxed.c \ 26 check_utility_compat.c \ 27 clock.c \ 28 clock_getcpuclockid.c \ 29 closedir.c \ 30 confstr.c \ 31 cpuset_alloc.c \ 32 cpuset_free.c \ 33 crypt.c \ 34 ctermid.c \ 35 daemon.c \ 36 devname.c \ 37 devname-compat11.c \ 38 dirfd.c \ 39 dirname.c \ 40 dirname_compat.c \ 41 disklabel.c \ 42 dlfcn.c \ 43 drand48.c \ 44 dup3.c \ 45 elf_utils.c \ 46 erand48.c \ 47 err.c \ 48 errlst.c \ 49 eventfd.c \ 50 exec.c \ 51 exect.c \ 52 fdevname.c \ 53 fdopendir.c \ 54 feature_present.c \ 55 fmtcheck.c \ 56 fmtmsg.c \ 57 fnmatch.c \ 58 fpclassify.c \ 59 freadlink.c \ 60 frexp.c \ 61 fstab.c \ 62 ftok.c \ 63 fts.c \ 64 fts-compat.c \ 65 fts-compat11.c \ 66 fts-compat15.c \ 67 ftw.c \ 68 ftw-compat11.c \ 69 getbootfile.c \ 70 getbsize.c \ 71 getcap.c \ 72 getcwd.c \ 73 getdomainname.c \ 74 getentropy.c \ 75 getgrent.c \ 76 getgrouplist.c \ 77 gethostname.c \ 78 getloadavg.c \ 79 getlogin.c \ 80 getmntinfo.c \ 81 getmntinfo-compat11.c \ 82 getnetgrent.c \ 83 getosreldate.c \ 84 getpeereid.c \ 85 getprogname.c \ 86 getpwent.c \ 87 getttyent.c \ 88 getusershell.c \ 89 getutxent.c \ 90 getvfsbyname.c \ 91 glob.c \ 92 glob-compat11.c \ 93 initgroups.c \ 94 inotify.c \ 95 isatty.c \ 96 isinf.c \ 97 isnan.c \ 98 jrand48.c \ 99 kqueue1.c \ 100 lcong48.c \ 101 libc_dlopen.c \ 102 libc_interposing_table.c \ 103 lrand48.c \ 104 memalign.c \ 105 memfd_create.c \ 106 mrand48.c \ 107 nftw.c \ 108 nftw-compat11.c \ 109 nice.c \ 110 nlist.c \ 111 nrand48.c \ 112 opendir.c \ 113 opendir2.c \ 114 pause.c \ 115 pmadvise.c \ 116 popen.c \ 117 posix_spawn.c \ 118 psignal.c \ 119 pututxline.c \ 120 pw_scan.c \ 121 raise.c \ 122 readdir.c \ 123 readdir-compat11.c \ 124 readpassphrase.c \ 125 rewinddir.c \ 126 scandir.c \ 127 scandir_b.c \ 128 scandir-compat11.c \ 129 sched_getaffinity.c \ 130 sched_setaffinity.c \ 131 seed48.c \ 132 seekdir.c \ 133 semctl.c \ 134 setdomainname.c \ 135 sethostname.c \ 136 setjmperr.c \ 137 setmode.c \ 138 setproctitle.c \ 139 setprogname.c \ 140 sig2str.c \ 141 siginterrupt.c \ 142 siglist.c \ 143 signal.c \ 144 sigsetops.c \ 145 sleep.c \ 146 srand48.c \ 147 statvfs.c \ 148 stringlist.c \ 149 strtofflags.c \ 150 sysconf.c \ 151 sysctl.c \ 152 sysctlbyname.c \ 153 sysctlnametomib.c \ 154 syslog.c \ 155 telldir.c \ 156 termios.c \ 157 time.c \ 158 times.c \ 159 timespec_get.c \ 160 timespec_getres.c \ 161 timezone.c \ 162 tls.c \ 163 ttyname.c \ 164 ttyslot.c \ 165 ualarm.c \ 166 uexterr_format.c \ 167 uexterr_gettext.c \ 168 uexterr_init.c \ 169 uexterr_set.c \ 170 ulimit.c \ 171 uname.c \ 172 unvis-compat.c \ 173 usleep.c \ 174 utime.c \ 175 utxdb.c \ 176 valloc.c \ 177 wordexp.c 178 179.if ${COMPILER_FEATURES:Mblocks} 180CFLAGS.fts.c= -fblocks 181CFLAGS.glob.c= -fblocks 182.endif 183 184CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20 185 186CFLAGS.sysconf.c= -I${SRCTOP}/contrib/tzcode 187 188CFLAGS.dlfcn.c= ${RTLD_HDRS} 189CFLAGS.tls.c= ${RTLD_HDRS} 190 191.PATH: ${SRCTOP}/contrib/libc-pwcache 192SRCS+= pwcache.c pwcache.h 193 194.PATH: ${SRCTOP}/contrib/libc-vis 195CFLAGS+= -I${SRCTOP}/contrib/libc-vis 196SRCS+= unvis.c vis.c 197 198MISRCS+=modf.c 199 200CANCELPOINTS_SRCS=sem.c sem_new.c 201.for src in ${CANCELPOINTS_SRCS} 202SRCS+=cancelpoints_${src} 203CLEANFILES+=cancelpoints_${src} 204cancelpoints_${src}: ${LIBC_SRCTOP}/gen/${src} .NOMETA 205 ln -sf ${.ALLSRC} ${.TARGET} 206.endfor 207 208SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map 209 210# machine-dependent gen sources 211.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/gen/Makefile.inc" 212 213MAN+= alarm.3 \ 214 arc4random.3 \ 215 basename.3 \ 216 cap_rights_get.3 \ 217 cap_sandboxed.3 \ 218 check_utility_compat.3 \ 219 clock.3 \ 220 clock_getcpuclockid.3 \ 221 confstr.3 \ 222 ctermid.3 \ 223 daemon.3 \ 224 devname.3 \ 225 directory.3 \ 226 dirname.3 \ 227 dl_iterate_phdr.3 \ 228 dladdr.3 \ 229 dlinfo.3 \ 230 dllockinit.3 \ 231 dlopen.3 \ 232 dup3.3 \ 233 err.3 \ 234 exec.3 \ 235 feature_present.3 \ 236 fmtcheck.3 \ 237 fmtmsg.3 \ 238 fnmatch.3 \ 239 fpclassify.3 \ 240 frexp.3 \ 241 ftok.3 \ 242 fts.3 \ 243 ftw.3 \ 244 getbootfile.3 \ 245 getbsize.3 \ 246 getcap.3 \ 247 getcontext.3 \ 248 getcwd.3 \ 249 getdiskbyname.3 \ 250 getdomainname.3 \ 251 getentropy.3 \ 252 getfsent.3 \ 253 getgrent.3 \ 254 getgrouplist.3 \ 255 gethostname.3 \ 256 getloadavg.3 \ 257 getmntinfo.3 \ 258 getnetgrent.3 \ 259 getosreldate.3 \ 260 getpass.3 \ 261 getpeereid.3 \ 262 getprogname.3 \ 263 getpwent.3 \ 264 getttyent.3 \ 265 getusershell.3 \ 266 getutxent.3 \ 267 getvfsbyname.3 \ 268 glob.3 \ 269 initgroups.3 \ 270 isgreater.3 \ 271 ldexp.3 \ 272 makecontext.3 \ 273 modf.3 \ 274 nice.3 \ 275 nlist.3 \ 276 pause.3 \ 277 popen.3 \ 278 posix_spawn.3 \ 279 posix_spawn_file_actions_addopen.3 \ 280 posix_spawn_file_actions_init.3 \ 281 posix_spawnattr_getexecfd_np.3 \ 282 posix_spawnattr_getflags.3 \ 283 posix_spawnattr_getpgroup.3 \ 284 posix_spawnattr_getprocdescp_np.3 \ 285 posix_spawnattr_getschedparam.3 \ 286 posix_spawnattr_getschedpolicy.3 \ 287 posix_spawnattr_init.3 \ 288 posix_spawnattr_getsigdefault.3 \ 289 posix_spawnattr_getsigmask.3 \ 290 psignal.3 \ 291 pwcache.3 \ 292 raise.3 \ 293 rand48.3 \ 294 readpassphrase.3 \ 295 rtld_get_var.3 \ 296 scandir.3 \ 297 sem_destroy.3 \ 298 sem_getvalue.3 \ 299 sem_init.3 \ 300 sem_open.3 \ 301 sem_post.3 \ 302 sem_timedwait.3 \ 303 sem_wait.3 \ 304 setjmp.3 \ 305 setmode.3 \ 306 setproctitle.3 \ 307 siginterrupt.3 \ 308 signal.3 \ 309 sigsetops.3 \ 310 statvfs.3 \ 311 stringlist.3 \ 312 strtofflags.3 \ 313 sysconf.3 \ 314 sysctl.3 \ 315 syslog.3 \ 316 tcgetpgrp.3 \ 317 tcgetsid.3 \ 318 tcgetwinsize.3 \ 319 tcsendbreak.3 \ 320 tcsetattr.3 \ 321 tcsetpgrp.3 \ 322 tcsetsid.3 \ 323 time.3 \ 324 times.3 \ 325 timespec_get.3 \ 326 timespec_getres.3 \ 327 ttyname.3 \ 328 ualarm.3 \ 329 ucontext.3 \ 330 uexterr_gettext.3 \ 331 uexterror.3 \ 332 ulimit.3 \ 333 uname.3 \ 334 unvis.3 \ 335 utime.3 \ 336 valloc.3 \ 337 vis.3 \ 338 wordexp.3 339 340MLINKS+=arc4random.3 arc4random_buf.3 \ 341 arc4random.3 arc4random_uniform.3 342MLINKS+=ctermid.3 ctermid_r.3 343MLINKS+=daemon.3 daemonfd.3 344MLINKS+=devname.3 devname_r.3 345MLINKS+=devname.3 fdevname.3 346MLINKS+=devname.3 fdevname_r.3 347MLINKS+=directory.3 closedir.3 \ 348 directory.3 dirfd.3 \ 349 directory.3 fdclosedir.3 \ 350 directory.3 fdopendir.3 \ 351 directory.3 opendir.3 \ 352 directory.3 readdir.3 \ 353 directory.3 readdir_r.3 \ 354 directory.3 rewinddir.3 \ 355 directory.3 seekdir.3 \ 356 directory.3 telldir.3 357MLINKS+=dlopen.3 fdlopen.3 \ 358 dlopen.3 dlclose.3 \ 359 dlopen.3 dlerror.3 \ 360 dlopen.3 dlfunc.3 \ 361 dlopen.3 dlsym.3 \ 362 dlopen.3 dlvsym.3 363MLINKS+=err.3 err_set_exit.3 \ 364 err.3 err_set_file.3 \ 365 err.3 errc.3 \ 366 err.3 errx.3 \ 367 err.3 verr.3 \ 368 err.3 verrc.3 \ 369 err.3 verrx.3 \ 370 err.3 vwarn.3 \ 371 err.3 vwarnc.3 \ 372 err.3 vwarnx.3 \ 373 err.3 warnc.3 \ 374 err.3 warn.3 \ 375 err.3 warnx.3 376MLINKS+=exec.3 execl.3 \ 377 exec.3 execle.3 \ 378 exec.3 execlp.3 \ 379 exec.3 exect.3 \ 380 exec.3 execv.3 \ 381 exec.3 execvP.3 \ 382 exec.3 execvp.3 \ 383 exec.3 execvpe.3 384MLINKS+=fpclassify.3 finite.3 \ 385 fpclassify.3 finitef.3 \ 386 fpclassify.3 isfinite.3 \ 387 fpclassify.3 isinf.3 \ 388 fpclassify.3 isnan.3 \ 389 fpclassify.3 isnormal.3 390MLINKS+=frexp.3 frexpf.3 \ 391 frexp.3 frexpl.3 392MLINKS+=fts.3 fts_children.3 \ 393 fts.3 fts_close.3 \ 394 fts.3 fts_open.3 \ 395 fts.3 fts_openat.3 \ 396 fts.3 fts_read.3 \ 397 fts.3 fts_set.3 \ 398 fts.3 fts_set_clientptr.3 \ 399 fts.3 fts_get_clientptr.3 \ 400 fts.3 fts_get_stream.3 401MLINKS+=ftw.3 nftw.3 402MLINKS+=getcap.3 cgetcap.3 \ 403 getcap.3 cgetclose.3 \ 404 getcap.3 cgetent.3 \ 405 getcap.3 cgetfirst.3 \ 406 getcap.3 cgetmatch.3 \ 407 getcap.3 cgetnext.3 \ 408 getcap.3 cgetnum.3 \ 409 getcap.3 cgetset.3 \ 410 getcap.3 cgetstr.3 \ 411 getcap.3 cgetustr.3 412MLINKS+=getcwd.3 getwd.3 413MLINKS+=getcontext.3 getcontextx.3 414MLINKS+=getcontext.3 setcontext.3 415MLINKS+=getdomainname.3 setdomainname.3 416MLINKS+=getfsent.3 endfsent.3 \ 417 getfsent.3 getfsfile.3 \ 418 getfsent.3 getfsspec.3 \ 419 getfsent.3 getfstype.3 \ 420 getfsent.3 setfsent.3 \ 421 getfsent.3 setfstab.3 \ 422 getfsent.3 getfstab.3 423MLINKS+=getgrent.3 endgrent.3 \ 424 getgrent.3 getgrgid.3 \ 425 getgrent.3 getgrnam.3 \ 426 getgrent.3 setgrent.3 \ 427 getgrent.3 setgroupent.3 \ 428 getgrent.3 getgrent_r.3 \ 429 getgrent.3 getgrnam_r.3 \ 430 getgrent.3 getgrgid_r.3 431MLINKS+=gethostname.3 sethostname.3 432MLINKS+=getnetgrent.3 endnetgrent.3 \ 433 getnetgrent.3 getnetgrent_r.3 \ 434 getnetgrent.3 innetgr.3 \ 435 getnetgrent.3 setnetgrent.3 436MLINKS+=getprogname.3 setprogname.3 437MLINKS+=getpwent.3 endpwent.3 \ 438 getpwent.3 getpwnam.3 \ 439 getpwent.3 getpwuid.3 \ 440 getpwent.3 setpassent.3 \ 441 getpwent.3 setpwent.3 \ 442 getpwent.3 setpwfile.3 \ 443 getpwent.3 getpwent_r.3 \ 444 getpwent.3 getpwnam_r.3 \ 445 getpwent.3 getpwuid_r.3 446MLINKS+=getttyent.3 endttyent.3 \ 447 getttyent.3 getttynam.3 \ 448 getttyent.3 isdialuptty.3 \ 449 getttyent.3 isnettty.3 \ 450 getttyent.3 setttyent.3 451MLINKS+=getusershell.3 endusershell.3 \ 452 getusershell.3 setusershell.3 453MLINKS+=getutxent.3 endutxent.3 \ 454 getutxent.3 getutxid.3 \ 455 getutxent.3 getutxline.3 \ 456 getutxent.3 getutxuser.3 \ 457 getutxent.3 pututxline.3 \ 458 getutxent.3 setutxdb.3 \ 459 getutxent.3 setutxent.3 \ 460 getutxent.3 utmpx.3 461MLINKS+=glob.3 globfree.3 462MLINKS+=isgreater.3 isgreaterequal.3 \ 463 isgreater.3 isless.3 \ 464 isgreater.3 islessequal.3 \ 465 isgreater.3 islessgreater.3 \ 466 isgreater.3 isunordered.3 467MLINKS+=ldexp.3 ldexpf.3 \ 468 ldexp.3 ldexpl.3 469MLINKS+=makecontext.3 swapcontext.3 470MLINKS+=modf.3 modff.3 \ 471 modf.3 modfl.3 472MLINKS+=popen.3 pclose.3 473MLINKS+=posix_spawn.3 posix_spawnp.3 \ 474 posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \ 475 posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclosefrom_np.3 \ 476 posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \ 477 posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir.3 \ 478 posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir.3 \ 479 posix_spawn_file_actions_init.3 posix_spawn_file_actions_destroy.3 \ 480 posix_spawnattr_getflags.3 posix_spawnattr_setflags.3 \ 481 posix_spawnattr_getexecfd_np.3 posix_spawnattr_setexecfd_np.3 \ 482 posix_spawnattr_getpgroup.3 posix_spawnattr_setpgroup.3 \ 483 posix_spawnattr_getprocdescp_np.3 posix_spawnattr_setprocdescp_np.3 \ 484 posix_spawnattr_getschedparam.3 posix_spawnattr_setschedparam.3 \ 485 posix_spawnattr_getschedpolicy.3 posix_spawnattr_setschedpolicy.3 \ 486 posix_spawnattr_getsigdefault.3 posix_spawnattr_setsigdefault.3 \ 487 posix_spawnattr_getsigmask.3 posix_spawnattr_setsigmask.3 \ 488 posix_spawnattr_init.3 posix_spawnattr_destroy.3 489MLINKS+=psignal.3 psiginfo.3 \ 490 psignal.3 sig2str.3 \ 491 psignal.3 str2sig.3 \ 492 psignal.3 strsignal.3 \ 493 psignal.3 sys_siglist.3 \ 494 psignal.3 sys_signame.3 495MLINKS+=pwcache.3 gid_from_group.3 \ 496 pwcache.3 group_from_gid.3 \ 497 pwcache.3 pwcache_groupdb.3 \ 498 pwcache.3 pwcache_userdb.3 \ 499 pwcache.3 uid_from_user.3 \ 500 pwcache.3 user_from_uid.3 501MLINKS+=rand48.3 _rand48.3 \ 502 rand48.3 drand48.3 \ 503 rand48.3 erand48.3 \ 504 rand48.3 jrand48.3 \ 505 rand48.3 lcong48.3 \ 506 rand48.3 lrand48.3 \ 507 rand48.3 mrand48.3 \ 508 rand48.3 nrand48.3 \ 509 rand48.3 seed48.3 \ 510 rand48.3 srand48.3 511MLINKS+=rtld_get_var.3 \ 512 rtld_set_var.3 513MLINKS+=scandir.3 alphasort.3 \ 514 scandir.3 fdscandir.3 \ 515 scandir.3 fdscandir_b.3 \ 516 scandir.3 scandir_b.3 \ 517 scandir.3 scandirat.3 \ 518 scandir.3 scandirat_b.3 \ 519 scandir.3 versionsort.3 520MLINKS+=sem_open.3 sem_close.3 \ 521 sem_open.3 sem_unlink.3 522MLINKS+=sem_wait.3 sem_trywait.3 523MLINKS+=sem_timedwait.3 sem_clockwait_np.3 524MLINKS+=setjmp.3 _longjmp.3 \ 525 setjmp.3 _setjmp.3 \ 526 setjmp.3 longjmp.3 \ 527 setjmp.3 longjmperr.3 \ 528 setjmp.3 longjmperror.3 \ 529 setjmp.3 siglongjmp.3 \ 530 setjmp.3 sigsetjmp.3 531MLINKS+=setmode.3 getmode.3 532MLINKS+=setproctitle.3 setproctitle_fast.3 533MLINKS+=sigsetops.3 sigaddset.3 \ 534 sigsetops.3 sigandset.3 \ 535 sigsetops.3 sigdelset.3 \ 536 sigsetops.3 sigemptyset.3 \ 537 sigsetops.3 sigfillset.3 \ 538 sigsetops.3 sigisemptyset.3 \ 539 sigsetops.3 sigismember.3 \ 540 sigsetops.3 sigorset.3 541MLINKS+=statvfs.3 fstatvfs.3 542MLINKS+=stringlist.3 sl_add.3 \ 543 stringlist.3 sl_find.3 \ 544 stringlist.3 sl_free.3 \ 545 stringlist.3 sl_init.3 546MLINKS+=strtofflags.3 fflagstostr.3 547MLINKS+=sysctl.3 sysctlbyname.3 \ 548 sysctl.3 sysctlnametomib.3 549MLINKS+=syslog.3 closelog.3 \ 550 syslog.3 openlog.3 \ 551 syslog.3 setlogmask.3 \ 552 syslog.3 vsyslog.3 553MLINKS+=tcgetwinsize.3 tcsetwinsize.3 554MLINKS+=tcsendbreak.3 tcdrain.3 \ 555 tcsendbreak.3 tcflow.3 \ 556 tcsendbreak.3 tcflush.3 557MLINKS+=tcsetattr.3 cfgetispeed.3 \ 558 tcsetattr.3 cfgetospeed.3 \ 559 tcsetattr.3 cfmakeraw.3 \ 560 tcsetattr.3 cfmakesane.3 \ 561 tcsetattr.3 cfsetispeed.3 \ 562 tcsetattr.3 cfsetospeed.3 \ 563 tcsetattr.3 cfsetspeed.3 \ 564 tcsetattr.3 tcgetattr.3 565MLINKS+=ttyname.3 isatty.3 \ 566 ttyname.3 ttyname_r.3 567MLINKS+=unvis.3 strunvis.3 \ 568 unvis.3 strunvisx.3 569MLINKS+=vis.3 nvis.3 \ 570 vis.3 snvis.3 \ 571 vis.3 stravis.3 \ 572 vis.3 strenvisx.3 \ 573 vis.3 strnunvis.3 \ 574 vis.3 strnunvisx.3 \ 575 vis.3 strnvis.3 \ 576 vis.3 strnvisx.3 \ 577 vis.3 strsenvisx.3 \ 578 vis.3 strsnvis.3 \ 579 vis.3 strsnvisx.3 \ 580 vis.3 strsvis.3 \ 581 vis.3 strsvisx.3 \ 582 vis.3 strvis.3 \ 583 vis.3 strvisx.3 \ 584 vis.3 svis.3 585 586MLINKS+=wordexp.3 wordfree.3 587 588.include <src.tools.mk> 589 590afterinstallconfig: install-passwd 591install-passwd: .PHONY 592.if ${MK_TCSH} == "no" 593 sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd 594.endif 595 ${PWD_MKDB_CMD} -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd 596.if defined(NO_ROOT) && defined(METALOG) 597 ( \ 598 echo ".${DISTBASE}/etc/pwd.db type=file uname=root gname=wheel mode=0644"; \ 599 echo ".${DISTBASE}/etc/spwd.db type=file uname=root gname=wheel mode=0600"; \ 600 echo ".${DISTBASE}/etc/passwd type=file uname=root gname=wheel mode=0644"; \ 601 ) | cat -l >> ${METALOG} 602.endif 603