No rule to make target `–f'

I am trying to make a c file like

make –f makefile1

This is my make file:

TestAssn1: test_assign1_1.o dberror.o storage_mgr.o
        cc -o TestAssn1 test_assign1_1.o dberror.o storage_mgr.o
test_assign1_1.o: test_assign1_1.c test_helper.h dberror.h storage_mgr.h
        cc -c test_assign1_1.c
dberror.o: dberror.c dberror.h
        cc -c dberror.c
storage_mgr.o: storage_mgr.c storage_mgr.h dberror.h
        cc -c storage_mgr.c

But I only get this message:

make: *** No rule to make target `–f'.  Stop.

How should I correct this?


You need to use a normal dash (-), not an en dash, in the command.

My guess is you copied this command from a blog or other web source. Many blog/web frameworks have a bug where they will replace typewriter punctuation with their typographically correct counterparts even within code formatted text.

This is very odd as your make usage is correct per

Please try some of the other formats for this option:

-f file, --file=file, --makefile=FILE  
    Use file as a makefile.   

Otherwise, perhaps your make is not the one listed in that man page (which is GNU make).

Need Your Help

Having a classcast exception in android while using MyApplication class

java android

What i am doing:: I am trying to use Myapplication class to send the data to next activity

request.subdomain is not being set in Rails 3 during conditional routing

ruby-on-rails ruby ruby-on-rails-3 routing subdomain

I'm trying to setup Subdomains in Rails 3 per Ryan Bates screencast on subdomains. However it's not working for me. I have the following setup: