Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7602443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:24:48+00:00 2026-05-30T23:24:48+00:00

I’m converting a makefile so it can be used with gnu make. In the

  • 0

I’m converting a makefile so it can be used with gnu make. In the other make program (can’t find what was the version…) this part was executed :

#******************************************************************************
#                                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))

When I build my code, I get this error

The syntax of the command is incorrect.

I have the feeling that some commands like @for @del @if exist are command that are not supported(or with a different syntax) in the gnu make.

I checked in the online GNU make documentation but I didn’t found commands that are similar to those used below.

Is there any equivalent in gnu make to the command used in this part of the makefile?

Thanks in advance!

EDIT :

I removed the @ and executed make. I can see when the message “The syntax of the command is incorrect” appear :

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 \

It appear that the syntax error is somewhere on the line

echo $(sort $(WEBGLOBAL) $(WEBLOCAL)) | $(TR) -s " " "[\n*]" \
                                       | $(SED) "s/gif/gif -u/g" \
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:24:50+00:00Added an answer on May 30, 2026 at 11:24 pm

    This will take a few iterations (especially since you haven’t given us a complete sample).

    There are two rules here; try them separately.

    Try the second rule with only the first command:

    # Make vfsdata.c writable
            @if exist $(VFSDIR)\vfsdata.c \
                chmod 777 $(VFSDIR)\vfsdata.c
    

    Let us know the results of these experiments, and we’ll go from there.

    EDIT:

    Interesting. I’d guess that either tr doesn’t like your syntax, or the length of that command has exceeded some limit of your Make or OS.

    Try doing it from the command line:

    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*]" \
    | sed "s/gif/gif -u/g" \
    >> ../Pa/Filesys/vfs.cfg
    

    If that succeeds, it’s a Make length limit; try with fewer file names.
    If it fails, try omitting the last term:

    echo blah blah blah \
    | sed "s/gif/gif -u/g"
    

    Tell us the results, and we’ll proceed…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.