你的Makefile适合我(空格被标签取代),所以听起来你有一个流浪的非打印字符.
尝试检查" cat -vet Makefile
" 的输出.这将显示EOL,TAB和其他看不见的字符的位置.
你会想看到这样的东西:
# Backup Makefile$ #$ # Create backups from various services and the system itself. This$ # script is used to perform single backup tasks or a whole backup$ # from the system. For more information about this file and how to$ # use it, read the README file in the same directory.$ $ BACKUP_ROOT = /srv/backup$ ETC_PATH = /srv/config$ SVN_PATH = /srv/svn/$ TRAC_PATH = /srv/trac/sysinventory$ PR10_PATH = /swsd/project/vmimages/...$ PR10_MOUNT_PATH = /tmp/temp_sshfs_pr10$ $ MYSQL_USER = "xxx"$ MYSQL_PASSWORD = "xxx"$ $ $ DATE = `date +%F`$ $ help :$ ^Icat README$ $ $ init-environment :$ ^Imkdir -p $(BACKUP_ROOT)$ ^Imkdir $(BACKUP_ROOT)/tmp$ ^Imkdir -p $(PR10_MOUNT_PATH)$ $
确保所有命令都以" ^I
" 开头.
您还可以尝试使用以下方法查找杂散字符:
cat -vet Makefile | grep "\^[^I]" --colour=auto