Я конвертирую make-файл, чтобы его можно было использовать с GNU Make.В другой программе make (не могу найти версию) ... эта часть была выполнена:
#******************************************************************************
# Explicit Rules
#******************************************************************************
#
# This section contents the explicit rules to create the Virtual File system.
# This file system actualy contains the files used by the Web interface.
#
#******************************************************************************
CFGFILE = $(WEBDST)/vfs.cfg
# Compiling vfsdata
$(OBJDIR)vfsdata.o : vfsdata.c
@echo .
@echo ::. COMPILING1 : vfsdata.c
@echo ::::.
$(NOECHOC)$(CC) $(CFLAGS) $(DEBUGFLASG) $(subst \,/,$(VFSDIR))/vfsdata.c -o"$@" $(INCLUDE)
# Dependance of vfsdata.c
vfsdata.c : $(addprefix $(WEBSRC)\,$(WEBGLOBAL)) $(addprefix $(WEBDST)\,$(WEBLOCAL))
# Make vfsdata.c writable
@if exist $(VFSDIR)\vfsdata.c \
chmod 777 $(VFSDIR)\vfsdata.c
#
# Generate the configuration file needed by vfscomp
#
@echo [general] > $(CFGFILE)
@echo vfs_root_dir = $(WEBDST)>> $(CFGFILE)
@echo vfs_data_file = $(VFSDIR)\vfsdata>> $(CFGFILE)
@echo vfs_image_var = vfsimage>> $(CFGFILE)
@echo far_pointer = yes>> $(CFGFILE)
@echo compress = yes>> $(CFGFILE)
@echo [file] >> $(CFGFILE)
@echo $(sort $(WEBGLOBAL) $(WEBLOCAL)) | $(TR) -s " " "[\n*]" \
| $(SED) "s/gif/gif -u/g" \
>> $(CFGFILE)
#
# Create the local directory tree
#
@for %%f in ($(subst /,\,$(dir $(WEBGLOBAL)))) do \
if not exist $(WEBDST)\%%f mkdir $(WEBDST)\%%f
#
# Copy the WEB pages directory tree localy
#
@for %%f in ($(subst /,\,$(WEBGLOBAL))) do \
cp -rf $(WEBSRC)\%%f $(WEBDST)\%%f
#
# Generate the virtual file system
#
@$(TOOLDIR)/vfscomp $(subst \,/,$(CFGFILE))
#
# Delete the local directory tree
#
#delete the directory recursively exept the one in the exclusion list
@for %%f in ($(filter-out $(EXCLUSION), $(WEBDIR))) do \
if exist $(WEBDST)\%%f \
rm -rf $(WEBDST)\%%f
#delete the remaining files.
@for %%f in ($(subst /,\,$(WEBGLOBAL))) do \
if exist $(WEBDST)\%%f \
rm -f $(WEBDST)\%%f
@del $(subst /,\,$(CFGFILE))
Когда я строю свой код, я получаю эту ошибку
The syntax of the command is incorrect.
У меня такое ощущение, что некоторые команды, такие как @for @del @if, существуют, это команды, которые не поддерживаются (или с другим синтаксисом) в make gnu.
Я проверил в онлайн документации по GNU make, но яне найдены команды, похожие на те, которые используются ниже.
Есть ли в gnu make какой-либо эквивалент команды, используемой в этой части make-файла?
Заранее спасибо!
РЕДАКТИРОВАТЬ:
Я удалил@ и выполненная марка.Я вижу, когда появляется сообщение «Синтаксис команды неверен»:
if exist ../Pa/Filesys\vfsdata.c \
chmod 777 ../Pa/Filesys\vfsdata.c
echo [general] > ../Pa/Filesys/vfs.cfg
echo vfs_root_dir = ../Pa/Filesys>> ../Pa/Filesys/vfs.cfg
echo vfs_data_file = ../Pa/Filesys\vfsdata>> ../Pa/Filesys/vfs.cfg
echo vfs_image_var = vfsimage>> ../Pa/Filesys/vfs.cfg
echo far_pointer = yes>> ../Pa/Filesys/vfs.cfg
echo compress = yes>> ../Pa/Filesys/vfs.cfg
echo [file] >> ../Pa/Filesys/vfs.cfg
echo behavior/datasync/datasync.htc behavior/defered/defered.htc behavior/inputs/indirect.htc behavior/inputs/inputs.htc behavior/progress/progress.htc behavior/slider/slBottom.gif behavior/slider/slLeft.gif behavior/slider/slRight.gif behavior/slider/slTop.gif behavior/slider/slider.htc css/env.css html/cfgmain.html html/changepass.html html/diagpa.html html/firmhlp.html html/firmware.html html/home.html html/logpage.html html/progressend.html html/progressstart.html html/soundhlp.html html/support.html html/uplmain.html html/uploadstart.html img/button.gif img/logo.gif index.html xslt/activate.xslt xslt/main.xslt xslt/netmenu.xslt xslt/page.xslt xslt/page_func.xslt xslt/progress.xslt xslt/tlmenu.xslt xslt/upload.xslt | tr -s " " "[\n*]" \
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
The syntax of the command is incorrect.
| sed "s/gif/gif -u/g" \
>> ../Pa/Filesys/vfs.cfg
for %%f in (.\ css\ img\ img\ xslt\ xslt\ xslt\ xslt\ xslt\ xslt\ xslt\ xslt\ html\ html\ html\ html\ html\ html\ html\ html\ html\ html\ html\ html\ behavior\slider\ behavior\slider\ behavior\slider\ behavior\slider\ behavior\slider\ behavior\datasync\ behavior\progress\ behavior\inputs\ behavior\inputs\ behavior\defered\) do \
Похоже, что синтаксическая ошибка находится где-то в строке
echo $(sort $(WEBGLOBAL) $(WEBLOCAL)) | $(TR) -s " " "[\n*]" \
| $(SED) "s/gif/gif -u/g" \