summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7acc620)
raw | patch | inline | side by side (parent: 7acc620)
author | Alexander Shiryaev <aixp@mail.ru> | |
Mon, 19 Nov 2012 14:20:23 +0000 (18:20 +0400) | ||
committer | Alexander Shiryaev <aixp@mail.ru> | |
Mon, 19 Nov 2012 14:20:23 +0000 (18:20 +0400) |
index 7c3b5200c057834238e203542f000dc8ecf89b96..07b85b3393381631a7a063b4c6ccc29590a1b48e 100644 (file)
# ${.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
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}
index 9b7bbe7370308b0d8d68717eb288961e8c1ac3fe..5fe037ad9bf60634bf1f3d0f27e3e1242d3c81b1 100644 (file)
# ${.ALLSRC} $^
# ${.IMPSRC} $<
+INCDIR ?= /usr/include
+
all: mkioctl Ioctl.txt
PY = python2.7
${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}
index a1aa80e66235486c779c158bbe2952f610b3a47d..4f00e45d31a47438386c1b85f8ea535463699135 100644 (file)
# ${.ALLSRC} $^
# ${.IMPSRC} $<
+INCDIR ?= /usr/include
+
all: Net.txt dumphstrerrno
PY = python2.7
${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
index 41bb64dd4de7004604e6c61904b76b6513322b0d..73ead529cf75f350042ad7606acf8c9f4270301c 100644 (file)
# ${.ALLSRC} $^
# ${.IMPSRC} $<
+INCDIR ?= /usr/include
+
all: Termios.txt
PY = python2.7
${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}
index a3b7beb22ce6292fa68b749838aa4c03d3d6f4de..6696eb9001ff17dc3e02a4cfb93515d1f4fc267e 100644 (file)
# ${.ALLSRC} $^
# ${.IMPSRC} $<
+INCDIR ?= /usr/include
+
all: mkioctl Ioctl.txt
PY = python2.7
${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}
index f9dd381417737ea38e55a6fb6ba20a7d6eed1d1b..87f675119f38755b4c239954871722ef15631498 100644 (file)
# ${.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}
index a44c64e77c431bf013fefa803571723704ac1227..9fe82db863599881635ad2cf47f5161094fd1c32 100644 (file)
# ${.ALLSRC} $^
# ${.IMPSRC} $<
+INCDIR ?= /usr/include
+
all: Net.txt dumphstrerrno
PY = python2.7
${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 d1ec45b9835666d33a0da165ec1aabc632d339d9..346bb9a12b4287690304f1365c0d0d03077612f6 100644 (file)
# ${.ALLSRC} $^
# ${.IMPSRC} $<
+INCDIR ?= /usr/include
+
all: Termios.txt
PY = python2.7
${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}