c - Make not producing output -


all: 1.c 2.c 3.c  1.c:   gcc 1.c -o 1 2.c:   gcc 2.c -o 2 3.c:   gcc 3.c -o 3 

so when type "make", why no file produced (it tells me "make" date.) , doing wrong?!

note 1, 2, , 3 not actual file names.

all: 1 2 3  1: 1.c     gcc 1.c -o 1 2: 2.c     gcc 2.c -o 2 3: 3.c     gcc 3.c -o 3 

how make know compile? checks last modified time of dependencies! , if dependency file has modified after target file he's doing work!

he checks 1 2 3 , dependencies. dependency 1 1.c. , now, if 1.c modified after 1 gcc 1.c -o 1. since in case 1 doesn't exist, make create file you.

target: -> dependencies: 1 2 3

target: 1 -> dependency: 1.c

target: 2 -> dependency: 2.c

target: 3 -> dependency: 3.c

and checks, last modified, 1 or 1.c? don't have 1, i'll create target file 1 using gcc 1.c -o 1 etc.

next time, if have 1 file , modified 1.c see file 1 created before 1.c last modified , again gcc 1.c -o 1.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -