@echo "Root privileges are required for some actions."
@echo ""
@echo "Usage:"
- @echo " make world # Compile everything (libraries & commands)"
- @echo " make includes # Install include files from src/"
- @echo " make libraries # Compile and install libraries"
- @echo " make commands # Compile all, commands, but don't install"
- @echo " make install # Compile and install commands"
- @echo " make depend # Generate required .depend files"
- @echo " make clean # Remove all compiler results"
+ @echo " make world # Compile everything (libraries & commands)"
+ @echo " make includes # Install include files from src/"
+ @echo " make libraries # Compile and install libraries"
+ @echo " make commands # Compile all, commands, but don't install"
+ @echo " make install # Compile and install commands"
+ @echo " make depend # Generate required .depend files"
+ @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 "Run 'make' in tools/ to create a new MINIX configuration."
@echo ""
cp etc/mk/*.mk /etc/mk/
includes:
- cd include && $(MAKE) install gcc
+ cd include && $(MAKE) includes
libraries:
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:
cd lib && sh gnu_build.sh obj depend all install
#include <limits.h>
#include <string.h>
#include <errno.h>
-#include <ibm/partition.h>
-#include <ibm/bios.h>
+#include <machine/partition.h>
+#include <machine/bios.h>
#include <minix/config.h>
#include <minix/type.h>
#include <minix/dmap.h>
#include <sys/video.h>
#include <kernel/const.h>
#include <kernel/type.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include "rawfs.h"
#include "image.h"
#include "boot.h"
install -cs -o bin aal $@
/usr/bin/ar: /usr/bin/aal
- install -l $? $@
+ install -l h $? $@
archiver.o:
print.o:
install -cs -o bin $> $@
/usr/bin/sh: /usr/bin/ash
- install -l $> $@
+ install -l h $> $@
/bin/sh: /usr/bin/ash
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/bigsh: /usr/bin/ash
- install -S 6600k -lcs $> $@
+ install -S 6600k -l h -cs $> $@
clean:
rm -f $(CLEANFILES) sh core
install -cs -o bin bsfilt $@
/usr/bin/colcrt: /usr/bin/bsfilt
- install -l /usr/bin/bsfilt $@
+ install -l h /usr/bin/bsfilt $@
/usr/bin/cawf: cawf
install -cs -o bin cawf $@
/usr/bin/nroff: /usr/bin/cawf
- install -l /usr/bin/cawf $@
+ install -l h /usr/bin/cawf $@
/usr/lib/cawf:
install -d -o bin /usr/lib/cawf
/usr/bin/vi: /usr/bin/elvis
if [ ! -x $@ ]; \
- then install -l $? $@ ; \
+ then install -l h $? $@ ; \
fi
/usr/bin/ctags: ctags
install -cs -o bin $? $@
/usr/bin/cc /usr/bin/m2 /usr/bin/pc: /usr/bin/acd
- install -l $? $@
+ install -l h $? $@
/usr/lib/descr: acd.descr
install $? $@
install -cs -o bin $? $@
/usr/bin/dosdir /usr/bin/doswrite: /usr/bin/dosread
- install -l $? $@
+ install -l h $? $@
/usr/bin/fdisk: fdisk
install -cs -o bin $? $@
install -cs -o bin $? $@
/usr/bin/autopart: autopart
- install -lcs $? $@
+ install -l h -cs $? $@
/usr/bin/part: part
install -cs -o bin $? $@
install -cs -o bin $? $@
/bin/loadkeys: /usr/bin/loadkeys
- install -lcs $? $@
+ install -l h -cs $? $@
clean:
rm -rf $(ALL) a.out core
#include <minix/const.h>
#include <minix/partition.h>
#include <minix/u64.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <termios.h>
#include <stdarg.h>
#include <minix/u64.h>
#include <minix/com.h>
#include <minix/sysinfo.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <termios.h>
#include <stdarg.h>
*/
#include <sys/types.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <minix/partition.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <time.h>
#include <errno.h>
#include <limits.h>
-#include <ibm/diskparm.h>
+#include <machine/diskparm.h>
#include <minix/minlib.h>
/* Constants. */
#include <minix/const.h>
#include <minix/partition.h>
#include <minix/u64.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <termios.h>
/* True if a partition is an extended partition. */
#include <minix/const.h>
#include <minix/partition.h>
#include <minix/u64.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include <minix/const.h>
#include <minix/partition.h>
#include <minix/u64.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
install -cs -o root -g operator -m 744 $? $@
/usr/bin/reboot: /usr/bin/halt
- install -l $? $@
+ install -l h $? $@
/usr/bin/shutdown: shutdown
install -cs -o root -g operator -m 4754 $? $@
install -cs -o root -g operator -m 744 $? $@
/bin/reboot: /bin/halt
- install -l $? $@
+ install -l h $? $@
clean:
rm -f *.o a.out core $(PROGRAMS)
install -m 755 -c -o bin $? $@
/usr/bin/U: /usr/bin/M
- install -m 755 -l $? $@
+ install -m 755 -l h $? $@
/usr/bin/MAKEDEV: MAKEDEV.sh
install -m 755 -c -o bin $? $@
/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/wait: /usr/bin/cd
- install -m 755 -l $? $@
+ install -m 755 -l h $? $@
/usr/bin/easypack: easypack.sh
install -m 755 -c -o bin $? $@
install -m 755 -c -o bin $? $@
/usr/bin/clr: /usr/bin/clear
- install -m 755 -l $? $@
+ install -m 755 -l h $? $@
/usr/bin/makewhatis: makewhatis.sh
install -m 755 -c -o bin $? $@
install -m 755 -c -o bin $? $@
/usr/bin/apropos: /usr/bin/whatis
- install -m 755 -l $? $@
+ install -m 755 -l h $? $@
/usr/bin/whereis: whereis.sh
install -m 755 -c -o bin $? $@
install -m 755 -c -o bin $? $@
/bin/U: /bin/M
- install -m 755 -l $? $@
+ install -m 755 -l h $? $@
/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/read /bin/test /bin/true /bin/umask /bin/wait: /bin/cd
- install -m 755 -l $? $@
+ install -m 755 -l h $? $@
install -cs -o bin $? $@
#/usr/bin/sh: /usr/bin/msh
-# install -l $? $@
+# install -l h $? $@
#
#/bin/sh: /usr/bin/msh
-# install -lcs $? $@
+# install -l h -cs $? $@
$(OBJ): sh.h
# strip symbol table (-s)
#
# /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)
#
# Some of the binaries are installed under more than one name. The extra
install -cs -o bin $> $@
/usr/bin/del_route: /usr/bin/add_route
- install -l $> $@
+ install -l h $> $@
/usr/bin/arp: arp
install -cs -o root -m 4755 $> $@
install -cs -o bin $> $@
/usr/bin/restore: /usr/bin/backup
- install -l $> $@
+ install -l h $> $@
/usr/bin/badblocks: badblocks
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/chgrp: /usr/bin/chown
- install -l $> $@
+ install -l h $> $@
/usr/bin/ci: ci
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/uncompress /usr/bin/zcat: /usr/bin/compress
- install -l $> $@
+ install -l h $> $@
/bin/cp: cp
install -cs -o bin $> $@
/usr/bin/clone /usr/bin/cpdir \
/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
- install -l $> $@
+ install -l h $> $@
/usr/bin/crc: crc
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/egrep: /usr/bin/grep
- install -l $> $@
+ install -l h $> $@
/usr/bin/head: head
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/isodir /usr/bin/isoinfo: /usr/bin/isoread
- install -l $> $@
+ install -l h $> $@
/usr/bin/join: join
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/uptime: /usr/bin/last
- install -l $> $@
+ install -l h $> $@
/usr/bin/leave: leave
install -cs -o bin $> $@
install -cs -o root -m 4755 $> $@
/usr/bin/chfn /usr/bin/chsh: /usr/bin/passwd
- install -l $> $@
+ install -l h $> $@
/usr/bin/paste: paste
install -cs -o bin $> $@
install -cs -o bin $> $@
/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
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/readlink: /usr/bin/stat
- install -l $> $@
+ install -l h $> $@
/usr/bin/readfs: readfs
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/rput: /usr/bin/rget
- install -l $> $@
+ install -l h $> $@
/usr/bin/rlogin: rlogin
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/fstat: /usr/bin/stat
- install -l $> $@
+ install -l h $> $@
/usr/bin/strings: strings
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/arch: /usr/bin/uname
- install -l $> $@
+ install -l h $> $@
/usr/bin/unexpand: unexpand
install -cs -o bin $> $@
install -cs -o bin $> $@
/usr/bin/uudecode: /usr/bin/uud
- install -l $> $@
+ install -l h $> $@
/usr/bin/uue: uue
install -cs -o bin $> $@
/usr/bin/uuencode: /usr/bin/uue
- install -l $> $@
+ install -l h $> $@
/usr/bin/vol: vol
install -cs -o bin $> $@
install -cs -o bin $> $@
/bin/cat: /usr/bin/cat
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/fsck: /usr/bin/fsck
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/intr: /usr/bin/intr
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/mount: /usr/bin/mount
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/printroot: /usr/bin/printroot
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/pwd: /usr/bin/pwd
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/sync: /usr/bin/sync
- install -lcs $> $@
+ install -l h -cs $> $@
/bin/umount: /usr/bin/umount
- install -lcs $> $@
+ install -l h -cs $> $@
clean:
rm -rf $(ALL) a.out core
#include <sys/types.h>
#include <sys/dir.h>
#include <sys/stat.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <minix/partition.h>
#include <minix/u64.h>
#include <sys/ioc_disk.h>
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 dflag= 0; /* Create a directory. */
int pflag= 0; /* Preserve timestamps. */
char **compress= nil; /* Compress utility to make a compressed executable. */
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. */
int wordpow= 1; /* Must be multiplied with wordsize ** wordpow */
/* So 8kb for an 8086 and 16kb for the rest. */
if (owner == -1) owner= sst.st_uid;
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);
excode= 1;
return;
}
- r= stat(dest, &dst);
+ r= lstat(dest, &dst);
if (r < 0) {
if (errno != ENOENT) { report(dest); return; }
} 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",
dest);
excode= 1;
}
}
- if (lflag && !same) {
+ if (lflag) {
/* Try to link the files. */
if (r >= 0 && unlink(dest) < 0) {
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;
} else {
if (!cflag || errno != EXDEV) {
}
}
+ /* 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 ((dst.st_mode & 07777) != mode) {
while (*p != 0) {
switch (*p++) {
- case 'l': lflag= 1; break;
case 'c': cflag= 1; break;
case 's': strip= 1; break;
case 'd': dflag= 1; break;
}
p= "";
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':
if (*p == 0) {
if (i == argc) usage();
if ((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 */
char *target= nil;
char *base;
#include <unistd.h>
#include <dirent.h>
#include <ctype.h>
-#include <ibm/partition.h>
+#include <machine/partition.h>
#include <sys/stat.h>
install -c $? $@
$(BINDIR)/$(LINK1) $(BINDIR)/$(LINK2): $(BINDIR)/$(PROG)
- install -l $? $@
+ install -l h $? $@
$(OBJS): net.h
install -cs -o bin yap $@
$(BINDIR)/more: $(BINDIR)/yap
- install -l $? $@
+ install -l h $? $@
clean:
rm -f yap $(OFILES) a.out core *.bak
+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:
Gas2ack updates: Run 'make install' in commands/i386/gas2ack
20100215:
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include <minix/com.h>
#include <minix/const.h>
#include <minix/ipc.h>
#include <minix/syslib.h>
#include <minix/sysutil.h>
#include <minix/endpoint.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
/* Offsets from capability pointer */
#define DEV_OP 4 /* Selects control/status register to access */
#include <minix/type.h>
#include <minix/endpoint.h>
#include <sys/ioc_disk.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <sys/mman.h>
/* Variables. */
#include <sys/mman.h>
#include <minix/ds.h>
#include <minix/vm.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
#include <assert.h>
* based on ES1371 driver by Laurens Bronwasser
*/
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include "../framework/audio_fw.h"
#include "es1370.h"
* by Laurens Bronwasser
*/
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include "../framework/audio_fw.h"
#include "es1371.h"
#include <minix/sysutil.h>
#include <minix/safecopies.h>
#include <sys/ioc_disk.h>
-#include <ibm/int86.h>
+#include <machine/int86.h>
#include <assert.h>
#define ME "BIOS_WINI"
#include "../drivers.h"
#include <assert.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <minix/syslib.h>
#include <minix/endpoint.h>
#include <minix/com.h>
#include <net/hton.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include "assert.h"
#include "local.h"
#include <sys/types.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include "assert.h"
/* devio.c */
#if defined USE_IOPL
-#include <ibm/portio.h>
+#include <machine/portio.h>
#else
unsigned int inb(unsigned short int);
unsigned int inw(unsigned short int);
#include <minix/sysutil.h>
#include <minix/bitmap.h>
-#include <ibm/interrupt.h> /* IRQ vectors and miscellaneous ports */
-#include <ibm/bios.h> /* BIOS index numbers */
-#include <ibm/ports.h> /* Well-known ports */
+#include <machine/interrupt.h> /* IRQ vectors and miscellaneous ports */
+#include <machine/bios.h> /* BIOS index numbers */
+#include <machine/ports.h> /* Well-known ports */
#include <string.h>
#include <signal.h>
#include <stdlib.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <minix/ds.h>
#include <minix/vm.h>
#include <timers.h>
#include <net/hton.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <minix/ds.h>
#include "e1000_hw.h"
#include "floppy.h"
#include <timers.h>
-#include <ibm/diskparm.h>
+#include <machine/diskparm.h>
#include <minix/sysutil.h>
#include <minix/syslib.h>
#include <minix/endpoint.h>
#include <net/hton.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <minix/ds.h>
#include <minix/endpoint.h>
#include <minix/syslib.h>
#include <minix/endpoint.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <minix/ds.h>
#include "lance.h"
* 7 Dec 1995
*/
-#include <ibm/partition.h>
+#include <machine/partition.h>
_PROTOTYPE( void partition, (struct driver *dr, int device, int style, int atapi) );
#include "../../kernel/config.h"
#include "../../kernel/type.h"
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include "local.h"
#include <minix/type.h>
#include <minix/sysutil.h>
#include <timers.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <minix/ds.h>
#include <minix/endpoint.h>
#include "../../kernel/const.h"
#include <net/hton.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include "../drivers.h"
#include <assert.h>
-#include <ibm/pci.h>
-#include <sys/vm_i386.h>
+#include <machine/pci.h>
+#include <machine/vm.h>
#include <minix/com.h>
#include <minix/syslib.h>
#include <minix/syslib.h>
#include <minix/sysutil.h>
#include <minix/com.h>
-#include <ibm/cmos.h>
+#include <machine/cmos.h>
#include <sys/svrctl.h>
int nflag = 0; /* Tell what, but don't do it. */
#include <net/hton.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <sys/types.h>
#include <fcntl.h>
#include <net/hton.h>
#include <net/gen/ether.h>
#include <net/gen/eth_io.h>
-#include <ibm/pci.h>
+#include <machine/pci.h>
#include <sys/types.h>
#include <assert.h>
*/
#include "../drivers.h"
-#include <ibm/pci.h>
-#include <sys/vm_i386.h>
+#include <machine/pci.h>
+#include <machine/vm.h>
#include "ti1225.h"
#include "i82365.h"
--- /dev/null
+# $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
--- /dev/null
+# $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>
--- /dev/null
+# $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
.endif
#XXX: Not supported by MINIX install
#RENAME?= -r
-#XXX: MINIX install only supports hard link
-#HRDLINK?= -l h
-HRDLINK?= -l
+HRDLINK?= -l h
SYMLINK?= -l s
METALOG?= ${DESTDIR}/METALOG
LINKSMODE?= ${BINMODE}
.include <minix.man.mk>
.include <minix.files.mk>
-# .include <minix.inc.mk>
+.include <minix.inc.mk>
.include <minix.links.mk>
.include <minix.sys.mk>
.include <minix.dep.mk>
755 root operator /usr/etc
755 root operator /home
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/advent
755 root operator /usr/lib/cawf
+# Doing a make includes builds /usr/include
-INC=/usr/include
-MKHEADERS343=/usr/gnu//libexec/gcc/i386-pc-minix/3.4.3/install-tools/mkheaders
-MKHEADERS411=/usr/gnu//libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders
+INCS= alloca.h ansi.h a.out.h ar.h assert.h configfile.h ctype.h \
+ curses.h dirent.h env.h err.h errno.h fcntl.h fenv.h \
+ 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::
- -rm -rf $(INC)
- mkdir -p $(INC)
- cpdir . $(INC)
- @chown -R bin $(INC)
- @rm -f $(INC)/Makefile
+SUBDIR= sys arch
-gcc: install
- SHELL=/bin/sh; if [ -f $(MKHEADERS343) ] ; then sh -e $(MKHEADERS343) ; fi
- SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
+.include <minix.prog.mk>
+.include <minix.subdir.mk>
--- /dev/null
+.include <minix.own.mk>
+
+SUBDIR= ${ARCH}
+
+INCSYMLINKS= ${MACHINE} /usr/include/machine
+
+.include <minix.kinc.mk>
--- /dev/null
+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>
#ifndef __SYS_VM_386_H__
#define __SYS_VM_386_H__
/*
-sys/vm_i386.h
+i386/vm.h
*/
#define I386_PAGE_SIZE 4096
};
#include <minix/config.h>
-#include <ibm/interrupt.h>
+#include <machine/interrupt.h>
/* randomness struct: random sources after interrupts: */
#define RANDOM_SOURCES NR_IRQ_VECTORS
--- /dev/null
+.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>
/* i386-specific clock functions. */
-#include <ibm/ports.h>
+#include <machine/ports.h>
#include <minix/portio.h>
#include "../../kernel.h"
#include "../../system.h"
#include <minix/type.h>
#include <minix/endpoint.h>
-#include <ibm/int86.h>
+#include <machine/int86.h>
#include "proto.h"
#include "../../proc.h"
#include "proto.h"
#include <minix/portio.h>
-#include <ibm/cpu.h>
+#include <machine/cpu.h>
#define ICW1_AT 0x11 /* edge triggered, cascade, need ICW4 */
#define ICW1_PC 0x13 /* edge triggered, no cascade, need ICW4 */
#ifndef _I386_ACONST_H
#define _I386_ACONST_H 1
-#include <ibm/interrupt.h>
-#include <ibm/memory.h>
+#include <machine/interrupt.h>
+#include <machine/memory.h>
#define NR_REMOTE_SEGS 3 /* # remote memory regions (variable) */
#include <minix/config.h>
#include <minix/const.h>
-#include <ibm/interrupt.h>
+#include <machine/interrupt.h>
#include <archconst.h>
#include "../../const.h"
#include "sconst.h"
#include <minix/cpufeature.h>
#include <string.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include "proto.h"
#include "../../proto.h"
/* sections */
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#ifdef __ACK__
.text
#include <minix/config.h>
#include <minix/const.h>
#include <minix/com.h>
-#include <ibm/interrupt.h>
+#include <machine/interrupt.h>
#include <archconst.h>
#include "../../const.h"
#include "../../proc.h"
#include <unistd.h>
#include <ctype.h>
#include <string.h>
-#include <ibm/cmos.h>
-#include <ibm/bios.h>
+#include <machine/cmos.h>
+#include <machine/bios.h>
#include <minix/portio.h>
#include <minix/cpufeature.h>
#include <a.out.h>
#include "../system.h"
#include <string.h>
-#include <ibm/cpu.h>
+#include <machine/cpu.h>
#include <sys/sigcontext.h>
#if USE_SIGRETURN
#define TYPE_H
#include <minix/com.h>
-#include <ibm/interrupt.h>
+#include <machine/interrupt.h>
typedef _PROTOTYPE( void task_t, (void) );
/* simplistic. We simply check for some magic value, but there is no other */
/* way. */
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
.globl begtext, begdata, begbss
#include <stdint.h>
#include <minix/minlib.h>
#include <minix/cpufeature.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
int _cpufeature(int cpufeature)
{
.in +5
.ti -5
.B install
-.RB [ \-lcpsz\fIN\fP "] [" \-o
+.RB [ \-cpsz\fIN\fP "] [" \-l
+.IR linktype ]
+.RB [ \-o
.IR owner ]
.RB [ \-g
.IR group ]
.br
.ti -5
.B install
-.RB [ \-lcpsz\fIN\fP "] [" \-o
+.RB [ \-cpsz\fIN\fP "] [" \-l
+.IR linktype ]
+.RB [ \-o
.IR owner ]
.RB [ \-g
.IR group ]
it read-only. You would otherwise not be able to compile a command again.
.SH OPTIONS
.TP
-.B \-l
+.BI \-l " linktype"
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
-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
.B \-c
Copy the source file to its proper place. This option is the default if
#include <sys/shm.h>
#include <sys/sem.h>
#include <sys/mman.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include <sys/vm.h>
#include <time.h>
#include "inc.h"
#include <timers.h>
-#include <ibm/interrupt.h>
+#include <machine/interrupt.h>
#include <minix/endpoint.h>
#include <minix/sysutil.h>
#include <minix/sys_config.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
/* As visible from the user space process, where is the top of the
* stack (first non-stack byte), when in paged mode?
#ifndef _PAGEFAULTS_H
#define _PAGEFAULTS_H 1
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#define PFERR_NOPAGE(e) (!((e) & I386_VM_PFE_P))
#define PFERR_PROT(e) (((e) & I386_VM_PFE_P))
#define _PAGETABLE_H 1
#include <stdint.h>
-#include <sys/vm_i386.h>
+#include <machine/vm.h>
#include "../vm.h"