Include directory reorg and makefile updates.

-Convert the include directory over to using bsdmake
 syntax
-Update/add mkfiles
-Modify install(1) so that it can create symlinks
-Update makefiles to use new install(1) options
-Rename /usr/include/ibm to /usr/include/i386
-Create /usr/include/machine symlink to arch header files
-Move vm_i386.h to its new home in the /usr/include/i386
-Update source files to #include the header files at their
 new homes.
-Add new gnu-includes target for building GCC headers
This commit is contained in:
Arun Thomas 2010-03-08 11:04:59 +00:00
parent ecf1a36d48
commit 2a8fabf4ad
90 changed files with 485 additions and 152 deletions

View file

@ -8,13 +8,15 @@ usage:
@echo "Root privileges are required for some actions." @echo "Root privileges are required for some actions."
@echo "" @echo ""
@echo "Usage:" @echo "Usage:"
@echo " make world # Compile everything (libraries & commands)" @echo " make world # Compile everything (libraries & commands)"
@echo " make includes # Install include files from src/" @echo " make includes # Install include files from src/"
@echo " make libraries # Compile and install libraries" @echo " make libraries # Compile and install libraries"
@echo " make commands # Compile all, commands, but don't install" @echo " make commands # Compile all, commands, but don't install"
@echo " make install # Compile and install commands" @echo " make install # Compile and install commands"
@echo " make depend # Generate required .depend files" @echo " make depend # Generate required .depend files"
@echo " make clean # Remove all compiler results" @echo " make gnu-includes # Install include files for GCC"
@echo " make gnu-libraries # Compile and install libraries for GCC"
@echo " make clean # Remove all compiler results"
@echo "" @echo ""
@echo "Run 'make' in tools/ to create a new MINIX configuration." @echo "Run 'make' in tools/ to create a new MINIX configuration."
@echo "" @echo ""
@ -33,11 +35,15 @@ mkfiles:
cp etc/mk/*.mk /etc/mk/ cp etc/mk/*.mk /etc/mk/
includes: includes:
cd include && $(MAKE) install gcc cd include && $(MAKE) includes
libraries: libraries:
cd lib && sh ack_build.sh obj depend all install cd lib && sh ack_build.sh obj depend all install
MKHEADERS411=/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders
gnu-includes: includes
SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
gnu-libraries: gnu-libraries:
cd lib && sh gnu_build.sh obj depend all install cd lib && sh gnu_build.sh obj depend all install

View file

@ -17,8 +17,8 @@ char version[]= "2.20";
#include <limits.h> #include <limits.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <ibm/bios.h> #include <machine/bios.h>
#include <minix/config.h> #include <minix/config.h>
#include <minix/type.h> #include <minix/type.h>
#include <minix/dmap.h> #include <minix/dmap.h>

View file

@ -22,7 +22,7 @@
#include <sys/video.h> #include <sys/video.h>
#include <kernel/const.h> #include <kernel/const.h>
#include <kernel/type.h> #include <kernel/type.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include "rawfs.h" #include "rawfs.h"
#include "image.h" #include "image.h"
#include "boot.h" #include "boot.h"

View file

@ -33,7 +33,7 @@ install: /usr/bin/aal /usr/bin/ar
install -cs -o bin aal $@ install -cs -o bin aal $@
/usr/bin/ar: /usr/bin/aal /usr/bin/ar: /usr/bin/aal
install -l $? $@ install -l h $? $@
archiver.o: archiver.o:
print.o: print.o:

View file

@ -58,13 +58,13 @@ install: /usr/bin/ash /usr/bin/sh /bin/sh /bin/bigsh
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/sh: /usr/bin/ash /usr/bin/sh: /usr/bin/ash
install -l $> $@ install -l h $> $@
/bin/sh: /usr/bin/ash /bin/sh: /usr/bin/ash
install -lcs $> $@ install -l h -cs $> $@
/bin/bigsh: /usr/bin/ash /bin/bigsh: /usr/bin/ash
install -S 6600k -lcs $> $@ install -S 6600k -l h -cs $> $@
clean: clean:
rm -f $(CLEANFILES) sh core rm -f $(CLEANFILES) sh core

View file

@ -74,13 +74,13 @@ install: \
install -cs -o bin bsfilt $@ install -cs -o bin bsfilt $@
/usr/bin/colcrt: /usr/bin/bsfilt /usr/bin/colcrt: /usr/bin/bsfilt
install -l /usr/bin/bsfilt $@ install -l h /usr/bin/bsfilt $@
/usr/bin/cawf: cawf /usr/bin/cawf: cawf
install -cs -o bin cawf $@ install -cs -o bin cawf $@
/usr/bin/nroff: /usr/bin/cawf /usr/bin/nroff: /usr/bin/cawf
install -l /usr/bin/cawf $@ install -l h /usr/bin/cawf $@
/usr/lib/cawf: /usr/lib/cawf:
install -d -o bin /usr/lib/cawf install -d -o bin /usr/lib/cawf

View file

@ -73,7 +73,7 @@ install: /usr/bin/elvis \
/usr/bin/vi: /usr/bin/elvis /usr/bin/vi: /usr/bin/elvis
if [ ! -x $@ ]; \ if [ ! -x $@ ]; \
then install -l $? $@ ; \ then install -l h $? $@ ; \
fi fi
/usr/bin/ctags: ctags /usr/bin/ctags: ctags

View file

@ -18,7 +18,7 @@ install:: /usr/bin/acd /usr/bin/cc /usr/bin/m2 /usr/bin/pc \
install -cs -o bin $? $@ install -cs -o bin $? $@
/usr/bin/cc /usr/bin/m2 /usr/bin/pc: /usr/bin/acd /usr/bin/cc /usr/bin/m2 /usr/bin/pc: /usr/bin/acd
install -l $? $@ install -l h $? $@
/usr/lib/descr: acd.descr /usr/lib/descr: acd.descr
install $? $@ install $? $@

View file

@ -117,7 +117,7 @@ install: \
install -cs -o bin $? $@ install -cs -o bin $? $@
/usr/bin/dosdir /usr/bin/doswrite: /usr/bin/dosread /usr/bin/dosdir /usr/bin/doswrite: /usr/bin/dosread
install -l $? $@ install -l h $? $@
/usr/bin/fdisk: fdisk /usr/bin/fdisk: fdisk
install -cs -o bin $? $@ install -cs -o bin $? $@
@ -135,7 +135,7 @@ install: \
install -cs -o bin $? $@ install -cs -o bin $? $@
/usr/bin/autopart: autopart /usr/bin/autopart: autopart
install -lcs $? $@ install -l h -cs $? $@
/usr/bin/part: part /usr/bin/part: part
install -cs -o bin $? $@ install -cs -o bin $? $@
@ -162,7 +162,7 @@ install: \
install -cs -o bin $? $@ install -cs -o bin $? $@
/bin/loadkeys: /usr/bin/loadkeys /bin/loadkeys: /usr/bin/loadkeys
install -lcs $? $@ install -l h -cs $? $@
clean: clean:
rm -rf $(ALL) a.out core rm -rf $(ALL) a.out core

View file

@ -20,7 +20,7 @@
#include <minix/const.h> #include <minix/const.h>
#include <minix/partition.h> #include <minix/partition.h>
#include <minix/u64.h> #include <minix/u64.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <termios.h> #include <termios.h>
#include <stdarg.h> #include <stdarg.h>

View file

@ -31,7 +31,7 @@
#include <minix/u64.h> #include <minix/u64.h>
#include <minix/com.h> #include <minix/com.h>
#include <minix/sysinfo.h> #include <minix/sysinfo.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <termios.h> #include <termios.h>
#include <stdarg.h> #include <stdarg.h>

View file

@ -34,7 +34,7 @@
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <minix/partition.h> #include <minix/partition.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/stat.h> #include <sys/stat.h>

View file

@ -12,7 +12,7 @@
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <ibm/diskparm.h> #include <machine/diskparm.h>
#include <minix/minlib.h> #include <minix/minlib.h>
/* Constants. */ /* Constants. */

View file

@ -24,7 +24,7 @@
#include <minix/const.h> #include <minix/const.h>
#include <minix/partition.h> #include <minix/partition.h>
#include <minix/u64.h> #include <minix/u64.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <termios.h> #include <termios.h>
/* True if a partition is an extended partition. */ /* True if a partition is an extended partition. */

View file

@ -11,7 +11,7 @@
#include <minix/const.h> #include <minix/const.h>
#include <minix/partition.h> #include <minix/partition.h>
#include <minix/u64.h> #include <minix/u64.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>

View file

@ -12,7 +12,7 @@
#include <minix/const.h> #include <minix/const.h>
#include <minix/partition.h> #include <minix/partition.h>
#include <minix/u64.h> #include <minix/u64.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>

View file

@ -28,7 +28,7 @@ install: /usr/bin/halt /usr/bin/reboot /usr/bin/shutdown \
install -cs -o root -g operator -m 744 $? $@ install -cs -o root -g operator -m 744 $? $@
/usr/bin/reboot: /usr/bin/halt /usr/bin/reboot: /usr/bin/halt
install -l $? $@ install -l h $? $@
/usr/bin/shutdown: shutdown /usr/bin/shutdown: shutdown
install -cs -o root -g operator -m 4754 $? $@ install -cs -o root -g operator -m 4754 $? $@
@ -37,7 +37,7 @@ install: /usr/bin/halt /usr/bin/reboot /usr/bin/shutdown \
install -cs -o root -g operator -m 744 $? $@ install -cs -o root -g operator -m 744 $? $@
/bin/reboot: /bin/halt /bin/reboot: /bin/halt
install -l $? $@ install -l h $? $@
clean: clean:
rm -f *.o a.out core $(PROGRAMS) rm -f *.o a.out core $(PROGRAMS)

View file

@ -81,7 +81,7 @@ clean:
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
/usr/bin/U: /usr/bin/M /usr/bin/U: /usr/bin/M
install -m 755 -l $? $@ install -m 755 -l h $? $@
/usr/bin/MAKEDEV: MAKEDEV.sh /usr/bin/MAKEDEV: MAKEDEV.sh
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
@ -104,7 +104,7 @@ clean:
/usr/bin/[ /usr/bin/command /usr/bin/echo /usr/bin/expr /usr/bin/false \ /usr/bin/[ /usr/bin/command /usr/bin/echo /usr/bin/expr /usr/bin/false \
/usr/bin/getopts /usr/bin/read /usr/bin/test /usr/bin/true /usr/bin/umask \ /usr/bin/getopts /usr/bin/read /usr/bin/test /usr/bin/true /usr/bin/umask \
/usr/bin/wait: /usr/bin/cd /usr/bin/wait: /usr/bin/cd
install -m 755 -l $? $@ install -m 755 -l h $? $@
/usr/bin/easypack: easypack.sh /usr/bin/easypack: easypack.sh
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
@ -116,7 +116,7 @@ clean:
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
/usr/bin/clr: /usr/bin/clear /usr/bin/clr: /usr/bin/clear
install -m 755 -l $? $@ install -m 755 -l h $? $@
/usr/bin/makewhatis: makewhatis.sh /usr/bin/makewhatis: makewhatis.sh
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
@ -173,7 +173,7 @@ clean:
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
/usr/bin/apropos: /usr/bin/whatis /usr/bin/apropos: /usr/bin/whatis
install -m 755 -l $? $@ install -m 755 -l h $? $@
/usr/bin/whereis: whereis.sh /usr/bin/whereis: whereis.sh
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
@ -182,11 +182,11 @@ clean:
install -m 755 -c -o bin $? $@ install -m 755 -c -o bin $? $@
/bin/U: /bin/M /bin/U: /bin/M
install -m 755 -l $? $@ install -m 755 -l h $? $@
/bin/cd: /usr/bin/cd /bin/cd: /usr/bin/cd
install -m 755 -lc $? $@ install -m 755 -l h -c $? $@
/bin/[ /bin/command /bin/echo /bin/expr /bin/false /bin/getopts \ /bin/[ /bin/command /bin/echo /bin/expr /bin/false /bin/getopts \
/bin/read /bin/test /bin/true /bin/umask /bin/wait: /bin/cd /bin/read /bin/test /bin/true /bin/umask /bin/wait: /bin/cd
install -m 755 -l $? $@ install -m 755 -l h $? $@

View file

@ -18,10 +18,10 @@ install: /usr/bin/msh
install -cs -o bin $? $@ install -cs -o bin $? $@
#/usr/bin/sh: /usr/bin/msh #/usr/bin/sh: /usr/bin/msh
# install -l $? $@ # install -l h $? $@
# #
#/bin/sh: /usr/bin/msh #/bin/sh: /usr/bin/msh
# install -lcs $? $@ # install -l h -cs $? $@
$(OBJ): sh.h $(OBJ): sh.h

View file

@ -28,7 +28,7 @@ CC = exec cc
# strip symbol table (-s) # strip symbol table (-s)
# #
# /bin/cat: /usr/bin/cat # /bin/cat: /usr/bin/cat
# install -lcs $< $@ install '/bin/cat' by linking (if possible) # install -l h -cs $< $@ install '/bin/cat' by linking (if possible)
# or copying (otherwise) # or copying (otherwise)
# #
# Some of the binaries are installed under more than one name. The extra # Some of the binaries are installed under more than one name. The extra
@ -1120,7 +1120,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/del_route: /usr/bin/add_route /usr/bin/del_route: /usr/bin/add_route
install -l $> $@ install -l h $> $@
/usr/bin/arp: arp /usr/bin/arp: arp
install -cs -o root -m 4755 $> $@ install -cs -o root -m 4755 $> $@
@ -1132,7 +1132,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/restore: /usr/bin/backup /usr/bin/restore: /usr/bin/backup
install -l $> $@ install -l h $> $@
/usr/bin/badblocks: badblocks /usr/bin/badblocks: badblocks
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1174,7 +1174,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/chgrp: /usr/bin/chown /usr/bin/chgrp: /usr/bin/chown
install -l $> $@ install -l h $> $@
/usr/bin/ci: ci /usr/bin/ci: ci
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1198,7 +1198,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/uncompress /usr/bin/zcat: /usr/bin/compress /usr/bin/uncompress /usr/bin/zcat: /usr/bin/compress
install -l $> $@ install -l h $> $@
/bin/cp: cp /bin/cp: cp
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1208,10 +1208,10 @@ install: \
/usr/bin/clone /usr/bin/cpdir \ /usr/bin/clone /usr/bin/cpdir \
/usr/bin/ln /usr/bin/mv /usr/bin/rm: /usr/bin/cp /usr/bin/ln /usr/bin/mv /usr/bin/rm: /usr/bin/cp
install -l $> $@ install -l h $> $@
/bin/ln /bin/mv /bin/rm: /bin/cp /bin/ln /bin/mv /bin/rm: /bin/cp
install -l $> $@ install -l h $> $@
/usr/bin/crc: crc /usr/bin/crc: crc
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1304,7 +1304,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/egrep: /usr/bin/grep /usr/bin/egrep: /usr/bin/grep
install -l $> $@ install -l h $> $@
/usr/bin/head: head /usr/bin/head: head
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1352,7 +1352,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/isodir /usr/bin/isoinfo: /usr/bin/isoread /usr/bin/isodir /usr/bin/isoinfo: /usr/bin/isoread
install -l $> $@ install -l h $> $@
/usr/bin/join: join /usr/bin/join: join
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1364,7 +1364,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/uptime: /usr/bin/last /usr/bin/uptime: /usr/bin/last
install -l $> $@ install -l h $> $@
/usr/bin/leave: leave /usr/bin/leave: leave
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1451,7 +1451,7 @@ install: \
install -cs -o root -m 4755 $> $@ install -cs -o root -m 4755 $> $@
/usr/bin/chfn /usr/bin/chsh: /usr/bin/passwd /usr/bin/chfn /usr/bin/chsh: /usr/bin/passwd
install -l $> $@ install -l h $> $@
/usr/bin/paste: paste /usr/bin/paste: paste
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1475,7 +1475,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/printenv: /usr/bin/env /usr/bin/printenv: /usr/bin/env
install -ls -o bin /usr/bin/env /usr/bin/printenv install -l h -s -o bin /usr/bin/env /usr/bin/printenv
/usr/bin/printroot: printroot /usr/bin/printroot: printroot
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1508,7 +1508,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/readlink: /usr/bin/stat /usr/bin/readlink: /usr/bin/stat
install -l $> $@ install -l h $> $@
/usr/bin/readfs: readfs /usr/bin/readfs: readfs
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1523,7 +1523,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/rput: /usr/bin/rget /usr/bin/rput: /usr/bin/rget
install -l $> $@ install -l h $> $@
/usr/bin/rlogin: rlogin /usr/bin/rlogin: rlogin
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1562,7 +1562,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/fstat: /usr/bin/stat /usr/bin/fstat: /usr/bin/stat
install -l $> $@ install -l h $> $@
/usr/bin/strings: strings /usr/bin/strings: strings
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1652,7 +1652,7 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/arch: /usr/bin/uname /usr/bin/arch: /usr/bin/uname
install -l $> $@ install -l h $> $@
/usr/bin/unexpand: unexpand /usr/bin/unexpand: unexpand
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1667,13 +1667,13 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/uudecode: /usr/bin/uud /usr/bin/uudecode: /usr/bin/uud
install -l $> $@ install -l h $> $@
/usr/bin/uue: uue /usr/bin/uue: uue
install -cs -o bin $> $@ install -cs -o bin $> $@
/usr/bin/uuencode: /usr/bin/uue /usr/bin/uuencode: /usr/bin/uue
install -l $> $@ install -l h $> $@
/usr/bin/vol: vol /usr/bin/vol: vol
install -cs -o bin $> $@ install -cs -o bin $> $@
@ -1703,28 +1703,28 @@ install: \
install -cs -o bin $> $@ install -cs -o bin $> $@
/bin/cat: /usr/bin/cat /bin/cat: /usr/bin/cat
install -lcs $> $@ install -l h -cs $> $@
/bin/fsck: /usr/bin/fsck /bin/fsck: /usr/bin/fsck
install -lcs $> $@ install -l h -cs $> $@
/bin/intr: /usr/bin/intr /bin/intr: /usr/bin/intr
install -lcs $> $@ install -l h -cs $> $@
/bin/mount: /usr/bin/mount /bin/mount: /usr/bin/mount
install -lcs $> $@ install -l h -cs $> $@
/bin/printroot: /usr/bin/printroot /bin/printroot: /usr/bin/printroot
install -lcs $> $@ install -l h -cs $> $@
/bin/pwd: /usr/bin/pwd /bin/pwd: /usr/bin/pwd
install -lcs $> $@ install -l h -cs $> $@
/bin/sync: /usr/bin/sync /bin/sync: /usr/bin/sync
install -lcs $> $@ install -l h -cs $> $@
/bin/umount: /usr/bin/umount /bin/umount: /usr/bin/umount
install -lcs $> $@ install -l h -cs $> $@
clean: clean:
rm -rf $(ALL) a.out core rm -rf $(ALL) a.out core

View file

@ -6,7 +6,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/dir.h> #include <sys/dir.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <minix/partition.h> #include <minix/partition.h>
#include <minix/u64.h> #include <minix/u64.h>
#include <sys/ioc_disk.h> #include <sys/ioc_disk.h>

View file

@ -57,7 +57,7 @@ void deallocate(void *mem)
if (mem != nil) free(mem); if (mem != nil) free(mem);
} }
int lflag= 0; /* Make a hard link if possible. */ int lflag= 0; /* Make a link if possible. */
int cflag= 0; /* Copy if you can't link, otherwise symlink. */ int cflag= 0; /* Copy if you can't link, otherwise symlink. */
int dflag= 0; /* Create a directory. */ int dflag= 0; /* Create a directory. */
int pflag= 0; /* Preserve timestamps. */ int pflag= 0; /* Preserve timestamps. */
@ -65,6 +65,9 @@ int strip= 0; /* Strip the copy. */
char **compress= nil; /* Compress utility to make a compressed executable. */ char **compress= nil; /* Compress utility to make a compressed executable. */
char *zcat= nil; /* Line one to decompress. */ char *zcat= nil; /* Line one to decompress. */
int make_hardlink = 0; /* Make a hard link */
int make_symlink = 0; /* Make a symbolic link */
long stack= -1; /* Amount of heap + stack. */ long stack= -1; /* Amount of heap + stack. */
int wordpow= 1; /* Must be multiplied with wordsize ** wordpow */ int wordpow= 1; /* Must be multiplied with wordsize ** wordpow */
/* So 8kb for an 8086 and 16kb for the rest. */ /* So 8kb for an 8086 and 16kb for the rest. */
@ -238,16 +241,16 @@ void copylink(char *source, char *dest, int mode, int owner, int group)
if (owner == -1) owner= sst.st_uid; if (owner == -1) owner= sst.st_uid;
if (group == -1) group= sst.st_gid; if (group == -1) group= sst.st_gid;
if (!S_ISREG(sst.st_mode)) { if (!make_symlink && !S_ISREG(sst.st_mode)) {
fprintf(stderr, "install: %s is not a regular file\n", source); fprintf(stderr, "install: %s is not a regular file\n", source);
excode= 1; excode= 1;
return; return;
} }
r= stat(dest, &dst); r= lstat(dest, &dst);
if (r < 0) { if (r < 0) {
if (errno != ENOENT) { report(dest); return; } if (errno != ENOENT) { report(dest); return; }
} else { } else {
if (!S_ISREG(dst.st_mode)) { if (!make_symlink && !S_ISREG(dst.st_mode)) {
fprintf(stderr, "install: %s is not a regular file\n", fprintf(stderr, "install: %s is not a regular file\n",
dest); dest);
excode= 1; excode= 1;
@ -267,14 +270,24 @@ void copylink(char *source, char *dest, int mode, int owner, int group)
} }
} }
if (lflag && !same) { if (lflag) {
/* Try to link the files. */ /* Try to link the files. */
if (r >= 0 && unlink(dest) < 0) { if (r >= 0 && unlink(dest) < 0) {
report(dest); return; report(dest); return;
} }
if (link(source, dest) >= 0) { if (make_hardlink) {
r = link(source, dest);
}
else if (make_symlink) {
r = symlink(source, dest);
} else {
fprintf(stderr,
"install: must specify hardlink or symlink\n");
}
if (r >= 0) {
docopy= 0; docopy= 0;
} else { } else {
if (!cflag || errno != EXDEV) { if (!cflag || errno != EXDEV) {
@ -382,6 +395,9 @@ void copylink(char *source, char *dest, int mode, int owner, int group)
} }
} }
/* Don't modify metadata if symlink target doesn't exist */
if (make_symlink && stat(dest, &dst) < 0) return;
if (stat(dest, &dst) < 0) { report(dest); return; } if (stat(dest, &dst) < 0) { report(dest); return; }
if ((dst.st_mode & 07777) != mode) { if ((dst.st_mode & 07777) != mode) {
@ -455,7 +471,6 @@ void main(int argc, char **argv)
while (*p != 0) { while (*p != 0) {
switch (*p++) { switch (*p++) {
case 'l': lflag= 1; break;
case 'c': cflag= 1; break; case 'c': cflag= 1; break;
case 's': strip= 1; break; case 's': strip= 1; break;
case 'd': dflag= 1; break; case 'd': dflag= 1; break;
@ -526,6 +541,25 @@ void main(int argc, char **argv)
} }
p= ""; p= "";
break; break;
case 'l':
lflag= 1;
if (*p == 0) {
if (i == argc) usage();
p= argv[i++];
if (*p == 0) usage();
}
switch(*p) {
case 'h':
make_hardlink = 1;
break;
case 's':
make_symlink = 1;
break;
default:
break;
}
p= "";
break;
case 'S': case 'S':
if (*p == 0) { if (*p == 0) {
if (i == argc) usage(); if (i == argc) usage();
@ -582,7 +616,7 @@ void main(int argc, char **argv)
if ((argc - i) < 1) usage(); if ((argc - i) < 1) usage();
if ((lflag || cflag) && (argc - i) == 1) usage(); if ((lflag || cflag) && (argc - i) == 1) usage();
if (stat(argv[argc-1], &st) >= 0 && S_ISDIR(st.st_mode)) { if (lstat(argv[argc-1], &st) >= 0 && S_ISDIR(st.st_mode)) {
/* install file ... dir */ /* install file ... dir */
char *target= nil; char *target= nil;
char *base; char *base;

View file

@ -10,7 +10,7 @@
#include <unistd.h> #include <unistd.h>
#include <dirent.h> #include <dirent.h>
#include <ctype.h> #include <ctype.h>
#include <ibm/partition.h> #include <machine/partition.h>
#include <sys/stat.h> #include <sys/stat.h>

View file

@ -31,6 +31,6 @@ $(BINDIR)/$(PROG): $(PROG)
install -c $? $@ install -c $? $@
$(BINDIR)/$(LINK1) $(BINDIR)/$(LINK2): $(BINDIR)/$(PROG) $(BINDIR)/$(LINK1) $(BINDIR)/$(LINK2): $(BINDIR)/$(PROG)
install -l $? $@ install -l h $? $@
$(OBJS): net.h $(OBJS): net.h

View file

@ -77,7 +77,7 @@ $(BINDIR)/yap: yap
install -cs -o bin yap $@ install -cs -o bin yap $@
$(BINDIR)/more: $(BINDIR)/yap $(BINDIR)/more: $(BINDIR)/yap
install -l $? $@ install -l h $? $@
clean: clean:
rm -f yap $(OFILES) a.out core *.bak rm -f yap $(OFILES) a.out core *.bak

View file

@ -1,3 +1,9 @@
20100308:
Include directory reorganization:
# mv /usr/include/ibm /usr/include/i386
# ln -s /usr/include/i386 /usr/include/machine
Install(1) updates:
# cd commands/simple && make /bin/install
20100303: 20100303:
Gas2ack updates: Run 'make install' in commands/i386/gas2ack Gas2ack updates: Run 'make install' in commands/i386/gas2ack
20100215: 20100215:

View file

@ -15,14 +15,14 @@ Driver for the AMD Device Exclusion Vector (DEV)
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include <minix/com.h> #include <minix/com.h>
#include <minix/const.h> #include <minix/const.h>
#include <minix/ipc.h> #include <minix/ipc.h>
#include <minix/syslib.h> #include <minix/syslib.h>
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include <ibm/pci.h> #include <machine/pci.h>
/* Offsets from capability pointer */ /* Offsets from capability pointer */
#define DEV_OP 4 /* Selects control/status register to access */ #define DEV_OP 4 /* Selects control/status register to access */

View file

@ -20,7 +20,7 @@
#include <minix/type.h> #include <minix/type.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include <sys/ioc_disk.h> #include <sys/ioc_disk.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <sys/mman.h> #include <sys/mman.h>
/* Variables. */ /* Variables. */

View file

@ -10,7 +10,7 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <minix/ds.h> #include <minix/ds.h>
#include <minix/vm.h> #include <minix/vm.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <assert.h> #include <assert.h>

View file

@ -15,7 +15,7 @@
* based on ES1371 driver by Laurens Bronwasser * based on ES1371 driver by Laurens Bronwasser
*/ */
#include <ibm/pci.h> #include <machine/pci.h>
#include "../framework/audio_fw.h" #include "../framework/audio_fw.h"
#include "es1370.h" #include "es1370.h"

View file

@ -20,7 +20,7 @@
* by Laurens Bronwasser * by Laurens Bronwasser
*/ */
#include <ibm/pci.h> #include <machine/pci.h>
#include "../framework/audio_fw.h" #include "../framework/audio_fw.h"
#include "es1371.h" #include "es1371.h"

View file

@ -26,7 +26,7 @@
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <minix/safecopies.h> #include <minix/safecopies.h>
#include <sys/ioc_disk.h> #include <sys/ioc_disk.h>
#include <ibm/int86.h> #include <machine/int86.h>
#include <assert.h> #include <assert.h>
#define ME "BIOS_WINI" #define ME "BIOS_WINI"

View file

@ -12,7 +12,7 @@
#include "../drivers.h" #include "../drivers.h"
#include <assert.h> #include <assert.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <minix/syslib.h> #include <minix/syslib.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include <minix/com.h> #include <minix/com.h>

View file

@ -60,7 +60,7 @@
#include <net/hton.h> #include <net/hton.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include "assert.h" #include "assert.h"
#include "local.h" #include "local.h"

View file

@ -12,7 +12,7 @@ Created: April 2000 by Philip Homburg <philip@f-mnx.phicoh.com>
#include <sys/types.h> #include <sys/types.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include "assert.h" #include "assert.h"

View file

@ -224,7 +224,7 @@ void dp_next_iovec(iovec_dat_s_t * iovp);
/* devio.c */ /* devio.c */
#if defined USE_IOPL #if defined USE_IOPL
#include <ibm/portio.h> #include <machine/portio.h>
#else #else
unsigned int inb(unsigned short int); unsigned int inb(unsigned short int);
unsigned int inw(unsigned short int); unsigned int inw(unsigned short int);

View file

@ -23,9 +23,9 @@
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <minix/bitmap.h> #include <minix/bitmap.h>
#include <ibm/interrupt.h> /* IRQ vectors and miscellaneous ports */ #include <machine/interrupt.h> /* IRQ vectors and miscellaneous ports */
#include <ibm/bios.h> /* BIOS index numbers */ #include <machine/bios.h> /* BIOS index numbers */
#include <ibm/ports.h> /* Well-known ports */ #include <machine/ports.h> /* Well-known ports */
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>

View file

@ -9,7 +9,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <minix/ds.h> #include <minix/ds.h>
#include <minix/vm.h> #include <minix/vm.h>
#include <timers.h> #include <timers.h>

View file

@ -23,7 +23,7 @@
#include <net/hton.h> #include <net/hton.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <minix/ds.h> #include <minix/ds.h>
#include "e1000_hw.h" #include "e1000_hw.h"

View file

@ -24,7 +24,7 @@
#include "floppy.h" #include "floppy.h"
#include <timers.h> #include <timers.h>
#include <ibm/diskparm.h> #include <machine/diskparm.h>
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <minix/syslib.h> #include <minix/syslib.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>

View file

@ -58,7 +58,7 @@
#include <net/hton.h> #include <net/hton.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <minix/ds.h> #include <minix/ds.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>

View file

@ -49,7 +49,7 @@
#include <minix/syslib.h> #include <minix/syslib.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <minix/ds.h> #include <minix/ds.h>
#include "lance.h" #include "lance.h"

View file

@ -2,7 +2,7 @@
* 7 Dec 1995 * 7 Dec 1995
*/ */
#include <ibm/partition.h> #include <machine/partition.h>
_PROTOTYPE( void partition, (struct driver *dr, int device, int style, int atapi) ); _PROTOTYPE( void partition, (struct driver *dr, int device, int style, int atapi) );

View file

@ -25,7 +25,7 @@
#include "../../kernel/config.h" #include "../../kernel/config.h"
#include "../../kernel/type.h" #include "../../kernel/type.h"
#include <sys/vm_i386.h> #include <machine/vm.h>
#include "local.h" #include "local.h"

View file

@ -59,7 +59,7 @@
#include <minix/type.h> #include <minix/type.h>
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <timers.h> #include <timers.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <minix/ds.h> #include <minix/ds.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include "../../kernel/const.h" #include "../../kernel/const.h"
@ -89,7 +89,7 @@ static timer_t or_watchdog;
#include <net/hton.h> #include <net/hton.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>

View file

@ -10,8 +10,8 @@ Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
#include "../drivers.h" #include "../drivers.h"
#include <assert.h> #include <assert.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include <minix/com.h> #include <minix/com.h>
#include <minix/syslib.h> #include <minix/syslib.h>

View file

@ -51,7 +51,7 @@
#include <minix/syslib.h> #include <minix/syslib.h>
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <minix/com.h> #include <minix/com.h>
#include <ibm/cmos.h> #include <machine/cmos.h>
#include <sys/svrctl.h> #include <sys/svrctl.h>
int nflag = 0; /* Tell what, but don't do it. */ int nflag = 0; /* Tell what, but don't do it. */

View file

@ -21,7 +21,7 @@ Created: Aug 2003 by Philip Homburg <philip@cs.vu.nl>
#include <net/hton.h> #include <net/hton.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <sys/types.h> #include <sys/types.h>
#include <fcntl.h> #include <fcntl.h>

View file

@ -21,7 +21,7 @@
#include <net/hton.h> #include <net/hton.h>
#include <net/gen/ether.h> #include <net/gen/ether.h>
#include <net/gen/eth_io.h> #include <net/gen/eth_io.h>
#include <ibm/pci.h> #include <machine/pci.h>
#include <sys/types.h> #include <sys/types.h>
#include <assert.h> #include <assert.h>

View file

@ -5,8 +5,8 @@ Created: Dec 2005 by Philip Homburg
*/ */
#include "../drivers.h" #include "../drivers.h"
#include <ibm/pci.h> #include <machine/pci.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include "ti1225.h" #include "ti1225.h"
#include "i82365.h" #include "i82365.h"

57
etc/mk/minix.inc.mk Normal file
View file

@ -0,0 +1,57 @@
# $NetBSD: bsd.inc.mk,v 1.32 2006/03/16 18:43:34 jwise Exp $
.include <minix.init.mk>
##### Basic targets
includes: ${INCS} incinstall inclinkinstall
##### Default values
INCSYMLINKS?=
##### Install rules
incinstall:: # ensure existence
.PHONY: incinstall
# -c is forced on here, in order to preserve modtimes for "make depend"
__incinstall: .USE
@cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
(${_MKSHMSG_INSTALL} ${.TARGET}; \
${_MKSHECHO} "${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" && \
${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
.for F in ${INCS:O:u}
_FDIR:= ${INCSDIR_${F:C,/,_,g}:U${INCSDIR}} # dir override
_FNAME:= ${INCSNAME_${F:C,/,_,g}:U${INCSNAME:U${F}}} # name override
_F:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path
.if ${MKUPDATE} == "no"
${_F}! ${F} __incinstall # install rule
.else
${_F}: ${F} __incinstall # install rule
.endif
incinstall:: ${_F}
.PRECIOUS: ${_F} # keep if install fails
.endfor
.undef _FDIR
.undef _FNAME
.undef _F
inclinkinstall: .PHONY
.if !empty(INCSYMLINKS)
@(set ${INCSYMLINKS}; \
while test $$# -ge 2; do \
l=$$1; shift; \
t=${DESTDIR}$$1; shift; \
if ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
[ "$$l" = "$$ttarg" ]; then \
continue ; \
fi ; \
${_MKSHMSG_INSTALL} $$t; \
${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
${INSTALL_SYMLINK} $$l $$t; \
done; )
.endif

93
etc/mk/minix.kinc.mk Normal file
View file

@ -0,0 +1,93 @@
# $NetBSD: bsd.kinc.mk,v 1.36 2006/03/16 18:43:34 jwise Exp $
# Variables:
#
# INCSDIR Directory to install includes into (and/or make, and/or
# symlink, depending on what's going on).
#
# INCS Headers to install.
#
# DEPINCS Headers to install which are built dynamically.
#
# SUBDIR Subdirectories to enter
#
# INCSYMLINKS Symlinks to make (unconditionally), a la bsd.links.mk.
# Note that the original bits will be 'rm -rf'd rather than
# just 'rm -f'd, to make the right thing happen with include
# directories.
#
.include <minix.init.mk>
##### Basic targets
.PRECIOUS: ${DESTDIR}${INCSDIR}
includes: ${DESTDIR}${INCSDIR} .WAIT ${INCS} incinstall
##### Install rules
incinstall:: # ensure existence
.PHONY: incinstall
# make sure the directory is OK, and install includes.
${DESTDIR}${INCSDIR}: .EXEC
@if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \
${_MKSHMSG_CREATE} ${.TARGET}; \
/bin/rm -rf ${.TARGET}; \
${_MKSHECHO} ${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} -m 755 \
${.TARGET}; \
${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} -m 755 \
${.TARGET}; \
fi
# -c is forced on here, in order to preserve modtimes for "make depend"
__incinstall: .USE
@cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
(${_MKSHMSG_INSTALL} ${.TARGET}; \
${_MKSHECHO} "${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" && \
${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
.for F in ${INCS:O:u} ${DEPINCS:O:u}
_F:= ${DESTDIR}${INCSDIR}/${F} # installed path
.if ${MKUPDATE} == "no"
${_F}! ${F} __incinstall # install rule
.else
${_F}: ${F} __incinstall # install rule
.endif
incinstall:: ${_F}
.PRECIOUS: ${_F} # keep if install fails
.endfor
.undef _F
.if defined(INCSYMLINKS) && !empty(INCSYMLINKS)
incinstall::
# XXX: Minix can't handle stat -qf
# @(set ${INCSYMLINKS}; \
# while test $$# -ge 2; do \
# l=$$1; shift; \
# t=${DESTDIR}$$1; shift; \
# if ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
# [ "$$l" = "$$ttarg" ]; then \
# continue ; \
# fi ; \
# ${_MKSHMSG_INSTALL} $$t; \
# ${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
# ${INSTALL_SYMLINK} $$l $$t; \
# done; )
@(set ${INCSYMLINKS}; \
while test $$# -ge 2; do \
l=$$1; shift; \
t=${DESTDIR}$$1; shift; \
${_MKSHMSG_INSTALL} $$t; \
${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
${INSTALL_SYMLINK} $$l $$t; \
done; )
.endif
##### Pull in related .mk logic
.include <minix.subdir.mk>
.include <minix.sys.mk>

69
etc/mk/minix.klinks.mk Normal file
View file

@ -0,0 +1,69 @@
# $NetBSD: bsd.klinks.mk,v 1.6 2009/11/27 13:50:29 pooka Exp $
#
.include <minix.own.mk>
##### Default values
.if !defined(S)
.if defined(NETBSDSRCDIR)
S= ${NETBSDSRCDIR}/sys
.elif defined(BSDSRCDIR)
S= ${BSDSRCDIR}/sys
.else
S= /sys
.endif
.endif
CLEANFILES+= machine ${MACHINE_CPU}
.if ${MACHINE} == "sun2" || ${MACHINE} == "sun3"
CLEANFILES+= sun68k
.elif ${MACHINE} == "sparc64"
CLEANFILES+= sparc
.elif ${MACHINE} == "i386"
CLEANFILES+= x86
.elif ${MACHINE} == "amd64"
CLEANFILES+= x86
.endif
.if defined(XEN_BUILD) || ${MACHINE} == "xen"
CLEANFILES+= xen xen-ma/machine # xen-ma
CPPFLAGS+= -I${.OBJDIR}/xen-ma
.if ${MACHINE_CPU} == "i386"
CLEANFILES+= x86
.endif
.endif
# XXX. This should be done a better way. It's @'d to reduce visual spew.
# XXX .BEGIN is used to make sure the links are done before anything else.
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
@rm -f machine && \
ln -s $S/arch/${MACHINE}/include machine
@rm -f ${MACHINE_CPU} && \
ln -s $S/arch/${MACHINE_CPU}/include ${MACHINE_CPU}
# XXX. it gets worse..
.if ${MACHINE} == "sun2" || ${MACHINE} == "sun3"
@rm -f sun68k && \
ln -s $S/arch/sun68k/include sun68k
.endif
.if ${MACHINE} == "sparc64"
@rm -f sparc && \
ln -s $S/arch/sparc/include sparc
.endif
.if ${MACHINE} == "amd64"
@rm -f x86 && \
ln -s $S/arch/x86/include x86
@rm -f i386 && \
ln -s $S/arch/i386/include i386
.endif
.if ${MACHINE_CPU} == "i386"
@rm -f x86 && \
ln -s $S/arch/x86/include x86
.endif
.if defined(XEN_BUILD) || ${MACHINE} == "xen"
@rm -f xen && \
ln -s $S/arch/xen/include xen
@rm -rf xen-ma && mkdir xen-ma && \
ln -s ../${XEN_BUILD:U${MACHINE_ARCH}} xen-ma/machine
.endif
.endif

View file

@ -769,9 +769,7 @@ PRESERVE?= -p
.endif .endif
#XXX: Not supported by MINIX install #XXX: Not supported by MINIX install
#RENAME?= -r #RENAME?= -r
#XXX: MINIX install only supports hard link HRDLINK?= -l h
#HRDLINK?= -l h
HRDLINK?= -l
SYMLINK?= -l s SYMLINK?= -l s
METALOG?= ${DESTDIR}/METALOG METALOG?= ${DESTDIR}/METALOG

View file

@ -358,7 +358,7 @@ LINKSGRP?= ${BINGRP}
LINKSMODE?= ${BINMODE} LINKSMODE?= ${BINMODE}
.include <minix.man.mk> .include <minix.man.mk>
.include <minix.files.mk> .include <minix.files.mk>
# .include <minix.inc.mk> .include <minix.inc.mk>
.include <minix.links.mk> .include <minix.links.mk>
.include <minix.sys.mk> .include <minix.sys.mk>
.include <minix.dep.mk> .include <minix.dep.mk>

View file

@ -20,6 +20,12 @@
755 root operator /usr/etc 755 root operator /usr/etc
755 root operator /home 755 root operator /home
755 bin operator /usr/include 755 bin operator /usr/include
755 bin operator /usr/include/arpa
755 bin operator /usr/include/minix
755 bin operator /usr/include/net
755 bin operator /usr/include/net/gen
755 bin operator /usr/include/netinet
755 bin operator /usr/include/sys
755 root operator /usr/lib 755 root operator /usr/lib
755 root operator /usr/lib/advent 755 root operator /usr/lib/advent
755 root operator /usr/lib/cawf 755 root operator /usr/lib/cawf

View file

@ -1,19 +1,45 @@
# Doing a make includes builds /usr/include
INC=/usr/include INCS= alloca.h ansi.h a.out.h ar.h assert.h configfile.h ctype.h \
MKHEADERS343=/usr/gnu//libexec/gcc/i386-pc-minix/3.4.3/install-tools/mkheaders curses.h dirent.h env.h err.h errno.h fcntl.h fenv.h \
MKHEADERS411=/usr/gnu//libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders float.h fnmatch.h fts.h getopt.h glob.h grp.h ifaddrs.h \
inttypes.h libgen.h lib.h libutil.h limits.h locale.h \
mathconst.h math.h midiparser.h netdb.h pwd.h regex.h \
regexp.h setjmp.h sgtty.h signal.h stdarg.h stddef.h \
stdint.h stdio.h stdlib.h string.h strings.h sysexits.h \
syslog.h tar.h termcap.h termios.h time.h timers.h tools.h \
ttyent.h unistd.h utime.h utmp.h
INCS+= arpa/inet.h
INCS+= minix/a.out.h minix/bitmap.h minix/callnr.h minix/cdrom.h \
minix/com.h minix/config.h minix/const.h minix/cpufeature.h \
minix/crtso.h minix/debug.h minix/devio.h minix/dirent.h \
minix/dir.h minix/dl_eth.h minix/dmap.h minix/ds.h \
minix/endpoint.h minix/fslib.h minix/ioctl.h minix/ipc.h \
minix/keymap.h minix/minlib.h minix/mq.h minix/partition.h \
minix/paths.h minix/portio.h minix/profile.h \
minix/queryparam.h minix/rs.h minix/safecopies.h \
minix/sef.h minix/sound.h minix/sys_config.h \
minix/sysinfo.h minix/syslib.h minix/sysutil.h minix/tty.h \
minix/type.h minix/types.h minix/u64.h minix/vfsif.h \
minix/vm.h
INCS+= net/hton.h net/if.h net/ioctl.h net/netlib.h
INCS+= net/gen/arp_io.h net/gen/dhcp.h net/gen/ether.h \
net/gen/eth_hdr.h net/gen/eth_io.h net/gen/icmp.h \
net/gen/icmp_hdr.h net/gen/if_ether.h net/gen/inet.h \
net/gen/in.h net/gen/ip_hdr.h net/gen/ip_io.h \
net/gen/nameser.h net/gen/netdb.h net/gen/oneCsum.h \
net/gen/psip_hdr.h net/gen/psip_io.h net/gen/resolv.h \
net/gen/rip.h net/gen/route.h net/gen/socket.h \
net/gen/tcp.h net/gen/tcp_hdr.h net/gen/tcp_io.h \
net/gen/udp.h net/gen/udp_hdr.h net/gen/udp_io.h \
net/gen/vjhc.h
INCS+= netinet/if_ether.h netinet/in.h netinet/tcp.h
all:: .include <minix.own.mk>
clean:: INCSDIR= /usr/include
install:: SUBDIR= sys arch
-rm -rf $(INC)
mkdir -p $(INC)
cpdir . $(INC)
@chown -R bin $(INC)
@rm -f $(INC)/Makefile
gcc: install .include <minix.prog.mk>
SHELL=/bin/sh; if [ -f $(MKHEADERS343) ] ; then sh -e $(MKHEADERS343) ; fi .include <minix.subdir.mk>
SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi

7
include/arch/Makefile Normal file
View file

@ -0,0 +1,7 @@
.include <minix.own.mk>
SUBDIR= ${ARCH}
INCSYMLINKS= ${MACHINE} /usr/include/machine
.include <minix.kinc.mk>

View file

@ -0,0 +1,6 @@
INCSDIR= /usr/include/i386
INCS= bios.h cmos.h cpu.h diskparm.h int86.h interrupt.h memory.h \
partition.h pci.h ports.h vm.h
.include <minix.kinc.mk>

View file

@ -1,7 +1,7 @@
#ifndef __SYS_VM_386_H__ #ifndef __SYS_VM_386_H__
#define __SYS_VM_386_H__ #define __SYS_VM_386_H__
/* /*
sys/vm_i386.h i386/vm.h
*/ */
#define I386_PAGE_SIZE 4096 #define I386_PAGE_SIZE 4096

View file

@ -179,7 +179,7 @@ struct kmessages {
}; };
#include <minix/config.h> #include <minix/config.h>
#include <ibm/interrupt.h> #include <machine/interrupt.h>
/* randomness struct: random sources after interrupts: */ /* randomness struct: random sources after interrupts: */
#define RANDOM_SOURCES NR_IRQ_VECTORS #define RANDOM_SOURCES NR_IRQ_VECTORS

14
include/sys/Makefile Normal file
View file

@ -0,0 +1,14 @@
.include <minix.sys.mk>
INCSDIR= /usr/include/sys
INCS= asynchio.h dir.h file.h fpu.h ioc_cmos.h ioc_disk.h \
ioc_file.h ioc_memory.h ioc_scsi.h ioc_sound.h ioc_tape.h \
ioctl.h ioc_tty.h ipc.h jmp_buf.h kbdio.h mman.h \
mount.h mtio.h param.h ptrace.h queue.h resource.h \
select.h sem.h shm.h sigcontext.h signal.h socket.h \
soundcard.h stackframe.h statfs.h stat.h svrctl.h timeb.h \
time.h times.h types.h uio.h un.h utsname.h video.h vm.h \
wait.h
.include <minix.kinc.mk>

View file

@ -1,7 +1,7 @@
/* i386-specific clock functions. */ /* i386-specific clock functions. */
#include <ibm/ports.h> #include <machine/ports.h>
#include <minix/portio.h> #include <minix/portio.h>
#include "../../kernel.h" #include "../../kernel.h"

View file

@ -8,7 +8,7 @@
#include "../../system.h" #include "../../system.h"
#include <minix/type.h> #include <minix/type.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include <ibm/int86.h> #include <machine/int86.h>
#include "proto.h" #include "proto.h"

View file

@ -9,7 +9,7 @@
#include "../../proc.h" #include "../../proc.h"
#include "proto.h" #include "proto.h"
#include <minix/portio.h> #include <minix/portio.h>
#include <ibm/cpu.h> #include <machine/cpu.h>
#define ICW1_AT 0x11 /* edge triggered, cascade, need ICW4 */ #define ICW1_AT 0x11 /* edge triggered, cascade, need ICW4 */
#define ICW1_PC 0x13 /* edge triggered, no cascade, need ICW4 */ #define ICW1_PC 0x13 /* edge triggered, no cascade, need ICW4 */

View file

@ -2,8 +2,8 @@
#ifndef _I386_ACONST_H #ifndef _I386_ACONST_H
#define _I386_ACONST_H 1 #define _I386_ACONST_H 1
#include <ibm/interrupt.h> #include <machine/interrupt.h>
#include <ibm/memory.h> #include <machine/memory.h>
#define NR_REMOTE_SEGS 3 /* # remote memory regions (variable) */ #define NR_REMOTE_SEGS 3 /* # remote memory regions (variable) */

View file

@ -3,7 +3,7 @@
#include <minix/config.h> #include <minix/config.h>
#include <minix/const.h> #include <minix/const.h>
#include <ibm/interrupt.h> #include <machine/interrupt.h>
#include <archconst.h> #include <archconst.h>
#include "../../const.h" #include "../../const.h"
#include "sconst.h" #include "sconst.h"

View file

@ -9,7 +9,7 @@
#include <minix/cpufeature.h> #include <minix/cpufeature.h>
#include <string.h> #include <string.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include "proto.h" #include "proto.h"
#include "../../proto.h" #include "../../proto.h"

View file

@ -46,7 +46,7 @@
/* sections */ /* sections */
#include <sys/vm_i386.h> #include <machine/vm.h>
#ifdef __ACK__ #ifdef __ACK__
.text .text
@ -67,7 +67,7 @@ begbss:
#include <minix/config.h> #include <minix/config.h>
#include <minix/const.h> #include <minix/const.h>
#include <minix/com.h> #include <minix/com.h>
#include <ibm/interrupt.h> #include <machine/interrupt.h>
#include <archconst.h> #include <archconst.h>
#include "../../const.h" #include "../../const.h"
#include "../../proc.h" #include "../../proc.h"

View file

@ -5,8 +5,8 @@
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <ibm/cmos.h> #include <machine/cmos.h>
#include <ibm/bios.h> #include <machine/bios.h>
#include <minix/portio.h> #include <minix/portio.h>
#include <minix/cpufeature.h> #include <minix/cpufeature.h>
#include <a.out.h> #include <a.out.h>

View file

@ -9,7 +9,7 @@
#include "../system.h" #include "../system.h"
#include <string.h> #include <string.h>
#include <ibm/cpu.h> #include <machine/cpu.h>
#include <sys/sigcontext.h> #include <sys/sigcontext.h>
#if USE_SIGRETURN #if USE_SIGRETURN

View file

@ -2,7 +2,7 @@
#define TYPE_H #define TYPE_H
#include <minix/com.h> #include <minix/com.h>
#include <ibm/interrupt.h> #include <machine/interrupt.h>
typedef _PROTOTYPE( void task_t, (void) ); typedef _PROTOTYPE( void task_t, (void) );

View file

@ -6,7 +6,7 @@
/* simplistic. We simply check for some magic value, but there is no other */ /* simplistic. We simply check for some magic value, but there is no other */
/* way. */ /* way. */
#include <sys/vm_i386.h> #include <machine/vm.h>
.globl begtext, begdata, begbss .globl begtext, begdata, begbss

View file

@ -2,7 +2,7 @@
#include <stdint.h> #include <stdint.h>
#include <minix/minlib.h> #include <minix/minlib.h>
#include <minix/cpufeature.h> #include <minix/cpufeature.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
int _cpufeature(int cpufeature) int _cpufeature(int cpufeature)
{ {

View file

@ -5,7 +5,9 @@ install \- install files
.in +5 .in +5
.ti -5 .ti -5
.B install .B install
.RB [ \-lcpsz\fIN\fP "] [" \-o .RB [ \-cpsz\fIN\fP "] [" \-l
.IR linktype ]
.RB [ \-o
.IR owner ] .IR owner ]
.RB [ \-g .RB [ \-g
.IR group ] .IR group ]
@ -18,7 +20,9 @@ install \- install files
.br .br
.ti -5 .ti -5
.B install .B install
.RB [ \-lcpsz\fIN\fP "] [" \-o .RB [ \-cpsz\fIN\fP "] [" \-l
.IR linktype ]
.RB [ \-o
.IR owner ] .IR owner ]
.RB [ \-g .RB [ \-g
.IR group ] .IR group ]
@ -68,10 +72,17 @@ if they are linked. So copy the file if you change it in a way that makes
it read-only. You would otherwise not be able to compile a command again. it read-only. You would otherwise not be able to compile a command again.
.SH OPTIONS .SH OPTIONS
.TP .TP
.B \-l .BI \-l " linktype"
Link the destination to the source file instead of copying it. This is done Link the destination to the source file instead of copying it. This is done
to either save space on a file system with both the source and the bin to either save space on a file system with both the source and the bin
directories on it, or to install synonyms to a command. directories on it, or to install synonyms to a command. The
.I linktype
argument can either be
.I h
(hard)
or
.I s
(symbolic).
.TP .TP
.B \-c .B \-c
Copy the source file to its proper place. This option is the default if Copy the source file to its proper place. This option is the default if

View file

@ -16,7 +16,7 @@
#include <sys/shm.h> #include <sys/shm.h>
#include <sys/sem.h> #include <sys/sem.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include <sys/vm.h> #include <sys/vm.h>
#include <time.h> #include <time.h>

View file

@ -2,7 +2,7 @@
#include "inc.h" #include "inc.h"
#include <timers.h> #include <timers.h>
#include <ibm/interrupt.h> #include <machine/interrupt.h>
#include <minix/endpoint.h> #include <minix/endpoint.h>
#include <minix/sysutil.h> #include <minix/sysutil.h>
#include <minix/sys_config.h> #include <minix/sys_config.h>

View file

@ -1,4 +1,4 @@
#include <sys/vm_i386.h> #include <machine/vm.h>
/* As visible from the user space process, where is the top of the /* As visible from the user space process, where is the top of the
* stack (first non-stack byte), when in paged mode? * stack (first non-stack byte), when in paged mode?

View file

@ -2,7 +2,7 @@
#ifndef _PAGEFAULTS_H #ifndef _PAGEFAULTS_H
#define _PAGEFAULTS_H 1 #define _PAGEFAULTS_H 1
#include <sys/vm_i386.h> #include <machine/vm.h>
#define PFERR_NOPAGE(e) (!((e) & I386_VM_PFE_P)) #define PFERR_NOPAGE(e) (!((e) & I386_VM_PFE_P))
#define PFERR_PROT(e) (((e) & I386_VM_PFE_P)) #define PFERR_PROT(e) (((e) & I386_VM_PFE_P))

View file

@ -3,7 +3,7 @@
#define _PAGETABLE_H 1 #define _PAGETABLE_H 1
#include <stdint.h> #include <stdint.h>
#include <sys/vm_i386.h> #include <machine/vm.h>
#include "../vm.h" #include "../vm.h"