Makefile Minix 3.2.1生成文件问题
我正在尝试使用下面的Makefile运行make,我得到以下错误Makefile Minix 3.2.1生成文件问题,makefile,minix,makefile-errors,Makefile,Minix,Makefile Errors,我正在尝试使用下面的Makefile运行make,我得到以下错误Makefile:2:**缺少分隔符。停止。。此Makefile是Minix 3.2.1中的原始文件。我没有做任何改变。我从标签上检查问题。有人能帮我吗 谢谢 # Makefile for the kernel image. .include <bsd.own.mk> .include "nbsd.config" .include <bsd.own.mk> .include <bsd.sys.mk&g
Makefile:2:**缺少分隔符。停止。
。此Makefile是Minix 3.2.1中的原始文件。我没有做任何改变。我从标签上检查问题。有人能帮我吗
谢谢
# Makefile for the kernel image.
.include <bsd.own.mk>
.include "nbsd.config"
.include <bsd.own.mk>
.include <bsd.sys.mk>
u=/usr
MDEC= /usr/mdec
GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
# LSC detect where were built the objects files
PROGROOT:= ..
.if "${MAKEOBJDIR:S,${.CURDIR},,}" != ""
PROGROOT:= ${MAKEOBJDIR:S,releasetools,,}
.endif
# Specify the programs that are part of the system image.
KERNEL= ${PROGROOT}/kernel/kernel
# PROGRAMS are in the order they should be loaded by boot
PROGRAMS+= ${PROGROOT}/servers/ds/ds
PROGRAMS+= ${PROGROOT}/servers/rs/rs
PROGRAMS+= ${PROGROOT}/servers/pm/pm
PROGRAMS+= ${PROGROOT}/servers/sched/sched
PROGRAMS+= ${PROGROOT}/servers/vfs/vfs
PROGRAMS+= ${PROGROOT}/drivers/memory/memory
.if ${MACHINE_ARCH} == "i386"
PROGRAMS+= ${PROGROOT}/drivers/log/log
.endif
PROGRAMS+= ${PROGROOT}/drivers/tty/tty
PROGRAMS+= ${PROGROOT}/servers/mfs/mfs
PROGRAMS+= ${PROGROOT}/servers/vm/vm
PROGRAMS+= ${PROGROOT}/servers/pfs/pfs
PROGRAMS+= ${PROGROOT}/servers/init/init
usage:
@echo " " >&2
@echo "Master Makefile to create new MINIX configuration." >& 2
@echo "Root privileges are required." >&2
@echo " " >&2
@echo "Usage:" >&2
@echo " make includes # Install include files" >&2
@echo " make depend # Generate dependency files" >&2
@echo " make services # Compile and install all services" >&2
@echo " make install # Make image, and install to hard disk" >&2
@echo " make hdboot # Make image, and install to hard disk" >&2
@echo " make bootable # Make hard disk bootable" >&2
@echo " make nbsd_fetch # Download current NetBSD reference sources" >&2
@echo " make nbsd_diff # Update minix-port.patch in NetBSD sources" >&2
@echo " make clean # Remove all compiler results, except libs" >&2
@echo " " >&2
@echo "To create a fresh MINIX configuration, try:" >&2
@echo " make clean install # new boot image" >&2
@echo " make fresh install # new everything" >&2
@echo " " >&2
all: services
# rebuild the program or system libraries
includes:
$(MAKE) -C ../ includes
depend: includes .gitignore
$(MAKE) -C ../ depend
.gitignore: Makefile
echo $(GEN_FILES) | tr ' ' '\n' >.gitignore
services: includes kernel servers .WAIT drivers
kernel: includes
$(MAKE) -C ../kernel
servers: includes
$(MAKE) -C ../servers all install
drivers: includes servers
$(MAKE) -C ../drivers all install
# make bootable and place system images
bootable:
exec su root mkboot bootable ${DESTDIR}
hdboot: services .WAIT do-hdboot
do-hdboot:
@rm -rf ${DESTDIR}/boot/minix/.temp/
${INSTALL_DIR} ${DESTDIR}/boot/minix/.temp
# mod_0 is used to make alphabetical order equal to the boot order
@n=0; \
for i in ${PROGRAMS}; \
do \
n=`expr $$n + 1`; \
[ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \
newname="${DESTDIR}/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \
${INSTALL} $$i $$newname; \
done
@cp ${PROGROOT}/kernel/kernel ${DESTDIR}/boot/minix/.temp/
@if [ "${MKINSTALLBOOT:Uno}" != "no" ] ; then \
${STRIP} -s ${DESTDIR}/boot/minix/.temp/* ; \
gzip ${DESTDIR}/boot/minix/.temp/mod* ; \
${HOST_SH} mkboot hdboot ${DESTDIR}; \
${HOST_SH} ../commands/update_bootcfg/update_bootcfg.sh;\
else \
${INSTALL_DIR} ${DESTDIR}/multiboot; \
${INSTALL} ${DESTDIR}/boot/minix/.temp/* ${DESTDIR}/multiboot; \
fi
install:
${MAKE} includes services hdboot
# download and update NetBSD reference sources.
nbsd_fetch:
export CVS_RSH=ssh; \
export OLDPWD=`pwd`; \
echo "retrieving hierarchies from ${NBSD_CVSROOT}"; \
IFS=,; \
cd ..; \
cat releasetools/nbsd_ports | grep -v '^#' | while read port ; \
do set $$port; \
date=$$1; minixpath=$$2; origpath=$$3; \
if [ $$# -lt 3 ]; then origpath=$$2; fi; \
echo "retrieving $$origpath .."; \
cvs -q -d ${NBSD_CVSROOT} co -N -D "$$date UTC" -d nbsdsrc "src/$$origpath" ; \
done; \
cd $${OLDPWD};
nbsd_diff:
find .. -name minix-port.patch | xargs rm
cat nbsd_ports | grep -v '^#' | \
( cd .. && awk -F, '{ minixpath=$$2; origpath=$$3; if(NF < 3) { origpath=$$2; } system("sh releasetools/nbsd_diff.sh " \
"nbsdsrc/src/"origpath" "minixpath" "minixpath"/minix-port.patch");}' )
find .. -name minix-port.patch | xargs wc -l | sort -n
# clean up compile results
clean:
$(MAKE) -C ../kernel $@
$(MAKE) -C ../servers $@
$(MAKE) -C ../drivers $@
rm -rf $(GEN_FILES)
cleandepend::
$(MAKE) -C ../kernel $@
$(MAKE) -C ../servers $@
$(MAKE) -C ../drivers $@
#为内核映像生成文件。
.包括
。包括“nbsd.config”
.包括
.包括
u=/usr
MDEC=/usr/MDEC
GEN_FILES=*.bak image kernel*.iso*.iso.gz cdfdimage rootimage src
#LSC检测对象文件的生成位置
PROGROOT:=。。
。如果“${MAKEOBJDIR:S,${.CURDIR},,}”!=""
PROGROOT:=${MAKEOBJDIR:S,releasetools,,}
.endif
#指定作为系统映像一部分的程序。
KERNEL=${PROGROOT}/KERNEL/KERNEL
#程序按引导加载的顺序进行
程序+=${PROGROOT}/servers/ds/ds
程序+=${PROGROOT}/servers/rs/rs
程序+=${PROGROOT}/servers/pm/pm
程序+=${PROGROOT}/servers/sched/sched
程序+=${PROGROOT}/servers/vfs/vfs
程序+=${PROGROOT}/驱动程序/内存/内存
.如果${MACHINE\u ARCH}==“i386”
程序+=${PROGROOT}/drivers/log/log
.endif
程序+=${PROGROOT}/drivers/tty/tty
程序+=${PROGROOT}/servers/mfs/mfs
程序+=${PROGROOT}/servers/vm/vm
程序+=${PROGROOT}/servers/pfs/pfs
程序+=${PROGROOT}/servers/init/init
用法:
@回显“”>&2
@echo“主Makefile以创建新的MINIX配置。”>&2
@echo“需要Root权限。”>&2
@回显“”>&2
@echo“用法:”>&2
@echo“生成包含#安装包含文件”>&2
@echo“生成依赖项#生成依赖项文件”>&2
@echo“生成服务#编译并安装所有服务”>&2
@echo“制作安装#制作映像并安装到硬盘”>&2
@echo“制作hdboot#制作映像并安装到硬盘”>&2
@echo“使可引导#使硬盘可引导”>&2
@echo“制作nbsd#U获取#下载当前NetBSD参考源”>&2
@echo“在NetBSD源代码中更新minix-port.patch使nbsd#U差异化”>&2
@echo“makeclean#删除除libs之外的所有编译器结果”>&2
@回显“”>&2
@echo“要创建新的MINIX配置,请尝试:”>&2
@echo“干净安装#新启动映像”>&2
@echo“全新安装#全新一切”>&2
@回显“”>&2
全部:服务
#重建程序或系统库
包括:
$(制造)-C../包括
依赖:includes.gitignore
$(MAKE)-C../depend
.gitignore:Makefile
echo$(GEN_文件)|tr''\n'>.gitignore
服务:包括内核服务器。等待驱动程序
内核:包括
$(MAKE)-C../kernel
服务器:包括
$(MAKE)-C../服务器全部安装
驱动程序:包括服务器
$(MAKE)-C../所有驱动程序均已安装
#使可引导并放置系统映像
可引导:
exec su root mkboot可引导${DESTDIR}
hdboot:服务。请等待执行hdboot
执行hdboot:
@rm-rf${DESTDIR}/boot/minix/.temp/
${INSTALL_DIR}${DESTDIR}/boot/minix/.temp
#mod_0用于使字母顺序等于启动顺序
@n=0\
对于${PROGRAMS}中的i\
做\
n=`expr$$n+1`\
[“$$n”-ge 10]&&prefix=“mod”| | prefix=“mod0”\
newname=“${DESTDIR}/boot/minix/.temp/$${prefix}$$${n}}{basename$$i`”\
${INSTALL}$$i$$newname\
完成
@cp${PROGROOT}/kernel/kernel${DESTDIR}/boot/minix/.temp/
@如果[“${MKINSTALLBOOT:Uno}”!=“否”];然后\
${STRIP}-s${DESTDIR}/boot/minix/.temp/*\
gzip${DESTDIR}/boot/minix/.temp/mod*\
${HOST_SH}mkboot hdboot${DESTDIR}\
${HOST_SH}../commands/update_bootcfg/update_bootcfg.SH\
否则\
${INSTALL_DIR}${DESTDIR}/multiboot\
${INSTALL}${DESTDIR}/boot/minix/.temp/*${DESTDIR}/multiboot\
fi
安装:
${MAKE}包括hdboot服务
#下载并更新NetBSD参考源。
nbsd_获取:
导出CVS_RSH=ssh\
导出OLDPWD=`pwd`\
echo“从${NBSD_CVSROOT}检索层次结构”\
如果S=\
cd\
cat releasetools/nbsd|U端口| grep-v'^#'|同时读取端口\
设置$$端口\
日期=$$1;minixpath=$$2;origpath=$$3\
如果[$#-lt 3];然后origpath=$$2;fi\
回显“正在检索$$origpath..”\
cvs-q-d${NBSD_CVSROOT}co-N-d“$$dateUTC”-d nbsdsrc“src/$$origpath”\
完成\
cd$${OLDPWD};
nbsd_差异:
找到-名称minix-port.patch | xargs rm
cat nbsd|U端口| grep-v'^#'|\
(cd.&&awk-F,{minixpath=$$2;origpath=$$3;if(NF<3){origpath=$$2;}系统(“sh releasetools/nbsd_diff.sh”\
“nbsdsrc/src/“origpath”“minipath”“minipath”/minix port.patch”);}”
找到-名称minix-port.patch | xargs wc-l | sort-n
#清理编译结果
清洁:
$(MAKE)-C../kernel$@
$(MAKE)-C../server$@
$(MAKE)-C../drivers$@
rm-rf$(GEN_文件)
清洁剂::
$(MAKE)-C../kernel$@
$(MAKE)-C../server$@
$(MAKE)-C../drivers$@
MINIX使用BSDmake
,它通常使用
作为其特定扩展名的前缀。您安装了GNUmake
,它有另一组扩展,没有前缀
;此外,您将GNUmake
放在路径
的前面,而不重命名它。这不会成功的
我们通常会将GNUmake
命名为gmake
或gnumake
,并在需要时以该名称调用它(例如,从GNU生态系统编译包,或使用强烈的Linux偏好)
你可能考虑的另一种可能性是