From 94355117a8bd29290fb087a338ed0208d3b344da Mon Sep 17 00:00:00 2001 From: Alexander Shiryaev Date: Mon, 19 Nov 2012 18:20:23 +0400 Subject: [PATCH] "/usr/include" -> INCDIR --- new/_FreeBSD_/Lin/Mod/gen-Libc/Makefile | 68 +++++++++++----------- new/_Linux_/Lin/Mod/gen-Ioctl/Makefile | 4 +- new/_Linux_/Lin/Mod/gen-Net/Makefile | 8 ++- new/_Linux_/Lin/Mod/gen-Termios/Makefile | 4 +- new/_OpenBSD_/Lin/Mod/gen-Ioctl/Makefile | 4 +- new/_OpenBSD_/Lin/Mod/gen-Libc/Makefile | 46 ++++++++------- new/_OpenBSD_/Lin/Mod/gen-Net/Makefile | 20 ++++--- new/_OpenBSD_/Lin/Mod/gen-Termios/Makefile | 8 ++- 8 files changed, 89 insertions(+), 73 deletions(-) diff --git a/new/_FreeBSD_/Lin/Mod/gen-Libc/Makefile b/new/_FreeBSD_/Lin/Mod/gen-Libc/Makefile index 7c3b520..07b85b3 100644 --- a/new/_FreeBSD_/Lin/Mod/gen-Libc/Makefile +++ b/new/_FreeBSD_/Lin/Mod/gen-Libc/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + PY = python2.7 DEFS = clockspersec defs-map defs-prot defs-sigmask defs-signo defs-fpe defs-sa defs-errno namemax defs-fcntlo defs-basictypes defs-sc @@ -13,56 +15,56 @@ all: Libc.txt ${DEFS} strerrnocase.txt Libc.txt: Libc.txt.templ ${DEFS} libver osname machine custom fields-dirent fields-sigaction fields-siginfo fields-stack fields-stat fields-tm fields-ucontext ${PY} ./untempl.py Libc.txt.templ ${.TARGET} -clockspersec: /usr/include/time.h - grep CLOCKS_PER_SEC ${.ALLSRC} | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} +clockspersec: + grep CLOCKS_PER_SEC ${INCDIR}/time.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} -defs-map: /usr/include/sys/mman.h - ./dumpdefs.py 2 1 s ${.ALLSRC} | grep " MAP_" > ${.TARGET} - ./dumpdefs.py 2 2 s ${.ALLSRC} | grep " MAP_" >> ${.TARGET} +defs-map: + ./dumpdefs.py 2 1 s ${INCDIR}/sys/mman.h | grep " MAP_" > ${.TARGET} + ./dumpdefs.py 2 2 s ${INCDIR}/sys/mman.h | grep " MAP_" >> ${.TARGET} -defs-prot: /usr/include/sys/mman.h - ./dumpdefs.py 2 1 s ${.ALLSRC} | grep " PROT_" > ${.TARGET} +defs-prot: + ./dumpdefs.py 2 1 s ${INCDIR}/sys/mman.h | grep " PROT_" > ${.TARGET} -defs-sigmask: /usr/include/sys/signal.h - ./dumpdefs.py 2 2 i ${.ALLSRC} | grep " SIG_" > ${.TARGET} +defs-sigmask: + ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep " SIG_" > ${.TARGET} -defs-signo: /usr/include/sys/signal.h - ./dumpdefs.py 2 1 i ${.ALLSRC} | grep " SIG" > ${.TARGET} - ./dumpdefs.py 2 2 i ${.ALLSRC} | grep " SIG" | grep -v SIG_ >> ${.TARGET} +defs-signo: + ./dumpdefs.py 2 1 i ${INCDIR}/sys/signal.h | grep " SIG" > ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep " SIG" | grep -v SIG_ >> ${.TARGET} -defs-fpe: /usr/include/sys/signal.h - ./dumpdefs.py 2 2 i ${.ALLSRC} | grep " FPE_" > ${.TARGET} +defs-fpe: + ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep " FPE_" > ${.TARGET} -defs-sa: /usr/include/sys/signal.h - ./dumpdefs.py 2 2 s ${.ALLSRC} | grep " SA_" > ${.TARGET} +defs-sa: + ./dumpdefs.py 2 2 s ${INCDIR}/sys/signal.h | grep " SA_" > ${.TARGET} -defs-errno: /usr/include/sys/errno.h - ./dumpdefs.py 2 0 i ${.ALLSRC} > ${.TARGET} - ./dumpdefs.py 2 1 i ${.ALLSRC} >> ${.TARGET} - ./dumpdefs.py 2 2 i ${.ALLSRC} >> ${.TARGET} +defs-errno: + ./dumpdefs.py 2 0 i ${INCDIR}/sys/errno.h > ${.TARGET} + ./dumpdefs.py 2 1 i ${INCDIR}/sys/errno.h >> ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/sys/errno.h >> ${.TARGET} -namemax: /usr/include/sys/syslimits.h - grep " NAME_MAX " ${.ALLSRC} | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} +namemax: + grep " NAME_MAX " ${INCDIR}/sys/syslimits.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} -defs-fcntlo: /usr/include/fcntl.h - ./dumpdefs.py 2 2 s ${.ALLSRC} | grep -v compat | grep " O_" > ${.TARGET} - ./dumpdefs.py 2 1 s ${.ALLSRC} | grep " O_" >> ${.TARGET} +defs-fcntlo: + ./dumpdefs.py 2 2 s ${INCDIR}/fcntl.h | grep -v compat | grep " O_" > ${.TARGET} + ./dumpdefs.py 2 1 s ${INCDIR}/fcntl.h | grep " O_" >> ${.TARGET} defs-basictypes: sizeofs ./sizeofs > ${.TARGET} -defs-sc: /usr/include/unistd.h - ./dumpdefs.py 2 1 i ${.ALLSRC} | grep _SC_ > ${.TARGET} - ./dumpdefs.py 2 2 i ${.ALLSRC} | grep _SC_ > ${.TARGET} +defs-sc: + ./dumpdefs.py 2 1 i ${INCDIR}/unistd.h | grep _SC_ > ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/unistd.h | grep _SC_ > ${.TARGET} #defs-madv: -# ./dumpdefs.py 2 1 i /usr/include/sys/mman.h | grep MADV | sed 's/_//' > ${.TARGET} -# ./dumpdefs.py 2 2 i /usr/include/sys/mman.h | grep MADV >> ${.TARGET} +# ./dumpdefs.py 2 1 i ${INCDIR}/sys/mman.h | grep MADV | sed 's/_//' > ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/mman.h | grep MADV >> ${.TARGET} # #defs-signal1: -# ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep ILL_ >> ${.TARGET} -# ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SEGV_ >> ${.TARGET} -# ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep BUS_ >> ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep ILL_ >> ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep SEGV_ >> ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep BUS_ >> ${.TARGET} dumpstrerrno.c: defs-errno grep -v ERESTART ${.ALLSRC} | grep -v EJUSTRETURN | grep -v ENOIOCTL | grep -v EDIRIOCTL | ./mkdumpstrerrno.py > ${.TARGET} diff --git a/new/_Linux_/Lin/Mod/gen-Ioctl/Makefile b/new/_Linux_/Lin/Mod/gen-Ioctl/Makefile index 9b7bbe7..5fe037a 100644 --- a/new/_Linux_/Lin/Mod/gen-Ioctl/Makefile +++ b/new/_Linux_/Lin/Mod/gen-Ioctl/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + all: mkioctl Ioctl.txt PY = python2.7 @@ -16,7 +18,7 @@ Ioctl.txt: Ioctl.txt.templ ${DEFS} ${PY} ./untempl.py Ioctl.txt.templ $@ defs-ioctl1: - ./dumpdefs.py 3 0 s /usr/include/i386-linux-gnu/bits/ioctl-types.h | grep TIOCM_ > $@ + ./dumpdefs.py 3 0 s ${INCDIR}/i386-linux-gnu/bits/ioctl-types.h | grep TIOCM_ > $@ clean: rm -f mkioctl Ioctl.txt ${DEFS} diff --git a/new/_Linux_/Lin/Mod/gen-Net/Makefile b/new/_Linux_/Lin/Mod/gen-Net/Makefile index a1aa80e..4f00e45 100644 --- a/new/_Linux_/Lin/Mod/gen-Net/Makefile +++ b/new/_Linux_/Lin/Mod/gen-Net/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + all: Net.txt dumphstrerrno PY = python2.7 @@ -13,11 +15,11 @@ Net.txt: Net.txt.templ ${DEFS} defs-netdb defs-in defs-sock ${PY} ./untempl.py Net.txt.templ $@ defs-socket: - ./dumpdefs.py 3 1 i /usr/include/i386-linux-gnu/bits/socket.h | grep " PF_" > $@ - ./dumpdefs.py 3 1 i /usr/include/i386-linux-gnu/bits/socket.h | grep " SOMAXCONN" >> $@ + ./dumpdefs.py 3 1 i ${INCDIR}/i386-linux-gnu/bits/socket.h | grep " PF_" > $@ + ./dumpdefs.py 3 1 i ${INCDIR}/i386-linux-gnu/bits/socket.h | grep " SOMAXCONN" >> $@ defs-so: - ./dumpdefs.py 3 1 s /usr/include/asm-generic/socket.h | grep " SO_" > $@ + ./dumpdefs.py 3 1 s ${INCDIR}/asm-generic/socket.h | grep " SO_" > $@ clean: rm -f Net.txt ${DEFS} dumphstrerrno diff --git a/new/_Linux_/Lin/Mod/gen-Termios/Makefile b/new/_Linux_/Lin/Mod/gen-Termios/Makefile index 41bb64d..73ead52 100644 --- a/new/_Linux_/Lin/Mod/gen-Termios/Makefile +++ b/new/_Linux_/Lin/Mod/gen-Termios/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + all: Termios.txt PY = python2.7 @@ -13,7 +15,7 @@ Termios.txt: Termios.txt.templ ${DEFS} ${PY} ./untempl.py Termios.txt.templ $@ defs-termios: - ./dumpdefs.py 2 0 i /usr/include/i386-linux-gnu/bits/termios.h > $@ + ./dumpdefs.py 2 0 i ${INCDIR}/i386-linux-gnu/bits/termios.h > $@ clean: rm -f Termios.txt ${DEFS} diff --git a/new/_OpenBSD_/Lin/Mod/gen-Ioctl/Makefile b/new/_OpenBSD_/Lin/Mod/gen-Ioctl/Makefile index a3b7beb..6696eb9 100644 --- a/new/_OpenBSD_/Lin/Mod/gen-Ioctl/Makefile +++ b/new/_OpenBSD_/Lin/Mod/gen-Ioctl/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + all: mkioctl Ioctl.txt PY = python2.7 @@ -16,7 +18,7 @@ Ioctl.txt: Ioctl.txt.templ ${DEFS} ${PY} ./untempl.py Ioctl.txt.templ ${.TARGET} defs-ttycom: - ./dumpdefs.py 3 1 s /usr/include/sys/ttycom.h | grep TIOCM_ > ${.TARGET} + ./dumpdefs.py 3 1 s ${INCDIR}/sys/ttycom.h | grep TIOCM_ > ${.TARGET} clean: rm -f mkioctl Ioctl.txt ${DEFS} diff --git a/new/_OpenBSD_/Lin/Mod/gen-Libc/Makefile b/new/_OpenBSD_/Lin/Mod/gen-Libc/Makefile index f9dd381..87f6751 100644 --- a/new/_OpenBSD_/Lin/Mod/gen-Libc/Makefile +++ b/new/_OpenBSD_/Lin/Mod/gen-Libc/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + PY = python2.7 DEFS = clockspersec defs-map defs-prot defs-sigmask nsig defs-signo defs-fpe defs-sa defs-errno namemax defs-fcntlo defs-basictypes defs-sc @@ -14,57 +16,57 @@ Libc.txt: Libc.txt.templ ${DEFS} libver osname machine custom fields-dirent fiel ${PY} ./untempl.py Libc.txt.templ ${.TARGET} clockspersec: - grep CLOCKS_PER_SEC /usr/include/time.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} + grep CLOCKS_PER_SEC ${INCDIR}/time.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} defs-map: - ./dumpdefs.py 2 0 s /usr/include/sys/mman.h | grep " MAP_" > ${.TARGET} + ./dumpdefs.py 2 0 s ${INCDIR}/sys/mman.h | grep " MAP_" > ${.TARGET} defs-prot: - ./dumpdefs.py 2 0 s /usr/include/sys/mman.h | grep " PROT_" > ${.TARGET} + ./dumpdefs.py 2 0 s ${INCDIR}/sys/mman.h | grep " PROT_" > ${.TARGET} defs-sigmask: - ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep " SIG_" > ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep " SIG_" > ${.TARGET} defs-signo: - ./dumpdefs.py 2 1 i /usr/include/sys/signal.h | grep " SIG" > ${.TARGET} - ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIGWINCH >> ${.TARGET} - ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIGTHR >> ${.TARGET} + ./dumpdefs.py 2 1 i ${INCDIR}/sys/signal.h | grep " SIG" > ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep SIGWINCH >> ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/sys/signal.h | grep SIGTHR >> ${.TARGET} nsig: - grep "#define _NSIG" /usr/include/sys/signal.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} + grep "#define _NSIG" ${INCDIR}/sys/signal.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} defs-fpe: - ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep " FPE_" > ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/sys/siginfo.h | grep " FPE_" > ${.TARGET} defs-sa: - ./dumpdefs.py 2 2 s /usr/include/sys/signal.h | grep " SA_" > ${.TARGET} - ./dumpdefs.py 2 3 s /usr/include/sys/signal.h | grep " SA_" >> ${.TARGET} + ./dumpdefs.py 2 2 s ${INCDIR}/sys/signal.h | grep " SA_" > ${.TARGET} + ./dumpdefs.py 2 3 s ${INCDIR}/sys/signal.h | grep " SA_" >> ${.TARGET} defs-errno: - ./dumpdefs.py 2 0 i /usr/include/sys/errno.h > ${.TARGET} - ./dumpdefs.py 2 1 i /usr/include/sys/errno.h >> ${.TARGET} + ./dumpdefs.py 2 0 i ${INCDIR}/sys/errno.h > ${.TARGET} + ./dumpdefs.py 2 1 i ${INCDIR}/sys/errno.h >> ${.TARGET} namemax: - grep " NAME_MAX " /usr/include/sys/syslimits.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} + grep " NAME_MAX " ${INCDIR}/sys/syslimits.h | head -1 | awk '{print $$3}' | tr -d '\n' > ${.TARGET} defs-fcntlo: - ./dumpdefs.py 2 2 s /usr/include/fcntl.h | grep -v compat | grep " O_" > ${.TARGET} - ./dumpdefs.py 2 1 s /usr/include/fcntl.h | grep " O_" >> ${.TARGET} + ./dumpdefs.py 2 2 s ${INCDIR}/fcntl.h | grep -v compat | grep " O_" > ${.TARGET} + ./dumpdefs.py 2 1 s ${INCDIR}/fcntl.h | grep " O_" >> ${.TARGET} defs-basictypes: sizeofs ./sizeofs > ${.TARGET} defs-sc: - ./dumpdefs.py 2 1 i /usr/include/unistd.h | grep _SC_ > ${.TARGET} + ./dumpdefs.py 2 1 i ${INCDIR}/unistd.h | grep _SC_ > ${.TARGET} #defs-madv: -# ./dumpdefs.py 2 0 i /usr/include/sys/mman.h | grep MADV > ${.TARGET} -# ./dumpdefs.py 2 1 i /usr/include/sys/mman.h | grep MADV >> ${.TARGET} +# ./dumpdefs.py 2 0 i ${INCDIR}/sys/mman.h | grep MADV > ${.TARGET} +# ./dumpdefs.py 2 1 i ${INCDIR}/sys/mman.h | grep MADV >> ${.TARGET} # #defs-siginfo1: -# ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep ILL_ >> ${.TARGET} -# ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep SEGV_ >> ${.TARGET} -# ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep BUS_ >> ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/siginfo.h | grep ILL_ >> ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/siginfo.h | grep SEGV_ >> ${.TARGET} +# ./dumpdefs.py 2 2 i ${INCDIR}/sys/siginfo.h | grep BUS_ >> ${.TARGET} dumpstrerrno.c: defs-errno grep -v ERESTART ${.ALLSRC} | grep -v EJUSTRETURN | ./mkdumpstrerrno.py > ${.TARGET} diff --git a/new/_OpenBSD_/Lin/Mod/gen-Net/Makefile b/new/_OpenBSD_/Lin/Mod/gen-Net/Makefile index a44c64e..9fe82db 100644 --- a/new/_OpenBSD_/Lin/Mod/gen-Net/Makefile +++ b/new/_OpenBSD_/Lin/Mod/gen-Net/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + all: Net.txt dumphstrerrno PY = python2.7 @@ -13,19 +15,19 @@ Net.txt: Net.txt.templ ${DEFS} ${PY} ./untempl.py Net.txt.templ ${.TARGET} defs-socket: - ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SOCK_" > ${.TARGET} - ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " AF_" >> ${.TARGET} - ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SHUT_" >> ${.TARGET} - ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SOMAXCONN" >> ${.TARGET} - ./dumpdefs.py 3 1 s /usr/include/sys/socket.h | grep " SO_" >> ${.TARGET} - ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SOL_" >> ${.TARGET} - ./dumpdefs.py 3 1 s /usr/include/sys/socket.h | grep " MSG_" >> ${.TARGET} + ./dumpdefs.py 3 1 i ${INCDIR}/sys/socket.h | grep " SOCK_" > ${.TARGET} + ./dumpdefs.py 3 1 i ${INCDIR}/sys/socket.h | grep " AF_" >> ${.TARGET} + ./dumpdefs.py 3 1 i ${INCDIR}/sys/socket.h | grep " SHUT_" >> ${.TARGET} + ./dumpdefs.py 3 1 i ${INCDIR}/sys/socket.h | grep " SOMAXCONN" >> ${.TARGET} + ./dumpdefs.py 3 1 s ${INCDIR}/sys/socket.h | grep " SO_" >> ${.TARGET} + ./dumpdefs.py 3 1 i ${INCDIR}/sys/socket.h | grep " SOL_" >> ${.TARGET} + ./dumpdefs.py 3 1 s ${INCDIR}/sys/socket.h | grep " MSG_" >> ${.TARGET} defs-in: - ./dumpdefs.py 3 1 i /usr/include/netinet/in.h | grep " IPPROTO_" > ${.TARGET} + ./dumpdefs.py 3 1 i ${INCDIR}/netinet/in.h | grep " IPPROTO_" > ${.TARGET} defs-netdb: - ./dumpdefs.py 3 2 i /usr/include/netdb.h > ${.TARGET} + ./dumpdefs.py 3 2 i ${INCDIR}/netdb.h > ${.TARGET} clean: rm -f Net.txt ${DEFS} dumphstrerrno diff --git a/new/_OpenBSD_/Lin/Mod/gen-Termios/Makefile b/new/_OpenBSD_/Lin/Mod/gen-Termios/Makefile index d1ec45b..346bb9a 100644 --- a/new/_OpenBSD_/Lin/Mod/gen-Termios/Makefile +++ b/new/_OpenBSD_/Lin/Mod/gen-Termios/Makefile @@ -4,6 +4,8 @@ # ${.ALLSRC} $^ # ${.IMPSRC} $< +INCDIR ?= /usr/include + all: Termios.txt PY = python2.7 @@ -13,9 +15,9 @@ Termios.txt: Termios.txt.templ ${DEFS} ${PY} ./untempl.py Termios.txt.templ ${.TARGET} defs-termios: - ./dumpdefs.py 2 0 i /usr/include/termios.h > ${.TARGET} - ./dumpdefs.py 2 1 i /usr/include/termios.h | grep -v compat >> ${.TARGET} - ./dumpdefs.py 2 2 i /usr/include/termios.h | grep -v compat | grep -v CHWFLOW >> ${.TARGET} + ./dumpdefs.py 2 0 i ${INCDIR}/termios.h > ${.TARGET} + ./dumpdefs.py 2 1 i ${INCDIR}/termios.h | grep -v compat >> ${.TARGET} + ./dumpdefs.py 2 2 i ${INCDIR}/termios.h | grep -v compat | grep -v CHWFLOW >> ${.TARGET} clean: rm -f Termios.txt ${DEFS} -- 2.29.2