Add a -d option to mktables to emit the dependency list, and invoke it from the Makefile to add the result (with the include directory prepended) to the tables.h dependency list.
PR: 238828
Differential D21069
libsysdecode: automate tables.h dependency generation Authored by emaste on Jul 25 2019, 4:16 PM. Tags None Referenced Files
Details
Diff Detail
Event Timeline
Comment Actions This already has .depend file support. Why is this needed? ~/git/freebsd2/lib/libsysdecode # less obj/.depend.tables.h.tmp
tables.h.tmp: \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/aio.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netgraph/bluetooth/include/ng_btsocket.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet/in.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet/sctp.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet/sctp_uio.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet/tcp.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet/udp.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet/udplite.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/netinet6/in6.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/nfs/nfssvc.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sched.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/acl.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/capsicum.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/event.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/extattr.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/fcntl.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/linker.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/mman.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/mount.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/procctl.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/ptrace.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/reboot.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/resource.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/rtprio.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/shm.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/signal.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/socket.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/stat.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/thr.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/umtx.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/unistd.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/sys/wait.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/ufs/ufs/quota.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/vm/vm.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/vm/vm_param.h \
/scratch/obj/root/git/freebsd2/amd64.amd64/tmp/usr/include/x86/sysarch.h \Comment Actions Something like this is probably needed instead ~/git/freebsd2/lib/libsysdecode # git diff diff --git lib/libsysdecode/Makefile lib/libsysdecode/Makefile index 2be244a6da46..9edfe067063c 100644 --- lib/libsysdecode/Makefile +++ lib/libsysdecode/Makefile @@ -127,7 +127,8 @@ incdir=${SYSROOT:U${DESTDIR}}${INCLUDEDIR} tables.h: mktables ${incdir}/netinet/in.h ${incdir}/netinet/tcp.h \ ${incdir}/netinet6/in6.h sh ${.CURDIR}/mktables ${incdir} ${.TARGET}.tmp && \ - mv -f ${.TARGET}.tmp ${.TARGET} + mv -f ${.TARGET}.tmp ${.TARGET} && \ + mv -f .depend.${.TARGET}.tmp .depend.${.TARGET} And the tables.h.tmp: needs to be tables.h: in the depend file. Really just stop the .tmp nonsense somehow. | ||||||||||||||||||||||||||||||||||||||||