0
votes

I'm trying to use a makefile to download a zip file to my project. But everytime I try to run make build/gz_2010_us_050_00_20m.zipit gives me the following output:

mkdir -p build/

The syntax of the command is incorrect.

makefile:2: recipe for target 'build/gz_2010_us_050_00_20m.zip' failed

make: *** [build/gz_2010_us_050_00_20m.zip] Error 1

Here is my makefile code:

build/gz_2010_us_050_00_20m.zip:
    mkdir -p $(dir $@)
    curl -o $@ http\://www2.census.gov/geo/tiger/GENZ2010/$(notdir $@)
1
I've put a "\" in front of "/gz_2010_us_050_00_20m.zip" and it made the error go away, but now I'm still stuck with a "No rule to make target 'gz_2010_us_050_00_20m.zip'. Stop." Error. - HeadachePanda

1 Answers

0
votes

When the code was run the slash in between "Build" and "gz_2010_us_050_00_20m.zip" made the command prompt think it was the end of that line and tried to run "mkdir -p build/". I've put a backslash in front of it so it would be handled as a piece of the path. My code still gives me an error but this question and this specific error is solved.