summaryrefslogtreecommitdiff
path: root/libstd
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-03-08 18:40:42 -0700
committerOri Bernstein <ori@eigenstate.org>2015-03-08 18:46:11 -0700
commit44c403b682be8f5784b70a17b1f18c47fad55883 (patch)
tree5ad4426997f66fceb443c921906aadad87a21365 /libstd
parent41a1d7f0e0cd1d54c1b568739dea557441e2191b (diff)
downloadmc-44c403b682be8f5784b70a17b1f18c47fad55883.tar.gz
Move system files to the right place in the build.
Moving them in the makefile to SYSFILES, and naming them correctly in the bldfile means that Myrddin should now know how to build them without make's shuffling them around, and make clean will do the right thing.
Diffstat (limited to 'libstd')
-rw-r--r--libstd/Makefile20
-rw-r--r--libstd/bldfile9
-rw-r--r--libstd/syserrno.myr54
3 files changed, 16 insertions, 67 deletions
diff --git a/libstd/Makefile b/libstd/Makefile
index d1e75e2..123cbaf 100644
--- a/libstd/Makefile
+++ b/libstd/Makefile
@@ -1,9 +1,15 @@
SYSLIB=sys
SYSSRC= \
- sys.myr \
- syserrno.myr \
- systypes.myr \
+ dial.myr \
+ dir.myr \
+ env.myr \
ifreq.myr \
+ resolve.myr \
+ syserrno.myr \
+ sys.myr \
+ syswrap.myr \
+ syswrap-ss.myr \
+ wait.myr \
SYSASMSRC= \
syscall.s \
@@ -20,12 +26,9 @@ STDSRC= \
chartype.myr \
cmp.myr \
clear.myr \
- dial.myr \
die.myr \
- dir.myr \
dirname.myr \
endian.myr \
- env.myr \
errno.myr \
execvp.myr \
extremum.myr \
@@ -47,7 +50,6 @@ STDSRC= \
pathjoin.myr \
putint.myr \
rand.myr \
- resolve.myr \
result.myr \
search.myr \
slcp.myr \
@@ -65,15 +67,12 @@ STDSRC= \
strjoin.myr \
strsplit.myr \
strstrip.myr \
- syswrap.myr \
- syswrap-ss.myr \
swap.myr \
try.myr \
types.myr \
units.myr \
utf.myr \
varargs.myr \
- wait.myr \
include ../config.mk
@@ -125,6 +124,7 @@ USE=$(STDSRC:.myr=.use) $(SYSSRC:.myr=.use) $(STDLIB)
clean:
rm -f $(OBJ)
rm -f $(USE)
+ rm -f $(SYSSRC)
rm -f lib$(STDLIB).a lib$(SYSLIB).a
install: all
diff --git a/libstd/bldfile b/libstd/bldfile
index d0ab7bb..be901dc 100644
--- a/libstd/bldfile
+++ b/libstd/bldfile
@@ -28,11 +28,13 @@ lib std {inc=.} =
clear.myr
cmp.myr
cstrconv.myr
- dial.myr
+ dial+posixy.myr
+ dial+plan9.myr
die.myr
dirname.myr
endian.myr
- env.myr
+ env+posixy.myr
+ env+plan9.myr
errno.myr
execvp.myr
extremum.myr
@@ -54,7 +56,8 @@ lib std {inc=.} =
pathjoin.myr
putint.myr
rand.myr
- resolve.myr
+ resolve+posixy.myr
+ resolve+plan9.myr
result.myr
search.myr
slcp.myr
diff --git a/libstd/syserrno.myr b/libstd/syserrno.myr
deleted file mode 100644
index 7b5d888..0000000
--- a/libstd/syserrno.myr
+++ /dev/null
@@ -1,54 +0,0 @@
-pkg sys =
- type errno = int
-
- const Eperm : errno = -1 /* Operation not permitted */
- const Enoent : errno = -2 /* No such file or directory */
- const Esrch : errno = -3 /* No such process */
- const Eintr : errno = -4 /* Interrupted system call */
- const Eio : errno = -5 /* Input/output error */
- const Enxio : errno = -6 /* Device not configured */
- const E2big : errno = -7 /* Argument list too long */
- const Enoexec : errno = -8 /* Exec format error */
- const Ebadf : errno = -9 /* Bad file descriptor */
- const Echild : errno = -10 /* No child processes */
- const Edeadlk : errno = -11 /* Resource deadlock avoided */
- /* 11 was EAGAIN */
- const Enomem : errno = -12 /* Cannot allocate memory */
- const Eacces : errno = -13 /* Permission denied */
- const Efault : errno = -14 /* Bad address */
- const Enotblk : errno = -15 /* Block device required */
- const Ebusy : errno = -16 /* Device / Resource busy */
- const Eexist : errno = -17 /* File exists */
- const Exdev : errno = -18 /* Cross-device link */
- const Enodev : errno = -19 /* Operation not supported by device */
- const Enotdir : errno = -20 /* Not a directory */
- const Eisdir : errno = -21 /* Is a directory */
- const Einval : errno = -22 /* Invalid argument */
- const Enfile : errno = -23 /* Too many open files in system */
- const Emfile : errno = -24 /* Too many open files */
- const Enotty : errno = -25 /* Inappropriate ioctl for device */
- const Etxtbsy : errno = -26 /* Text file busy */
- const Efbig : errno = -27 /* File too large */
- const Enospc : errno = -28 /* No space left on device */
- const Espipe : errno = -29 /* Illegal seek */
- const Erofs : errno = -30 /* Read-only file system */
- const Emlink : errno = -31 /* Too many links */
- const Epipe : errno = -32 /* Broken pipe */
-
- /* math software */
- const Edom : errno = -33 /* Numerical argument out of domain */
- const Erange : errno = -34 /* Result too large */
-
- /* non-blocking and interrupt i/o */
- const Eagain : errno = -35 /* Resource temporarily unavailable */
- const Einprogress : errno = -36 /* Operation now in progress */
- const Ealready : errno = -37 /* Operation already in progress */
-
- /* ipc/network software -- argument errors */
- const Enotsock : errno = -38 /* Socket operation on non-socket */
- const Edestaddrreq : errno = -39 /* Destination address required */
- const Emsgsize : errno = -40 /* Message too long */
- const Eprototype : errno = -41 /* Protocol wrong type for socket */
- const Enoprotoopt : errno = -42 /* Protocol not available */
- const Eprotonosupport : errno = -43 /* Protocol not supported */
-;;