«
»
23.05.06

When is a comment not a comment?

Geekism


A brief exercise using GNU Make:


Makefile subMake.sh Submakefile
submake :
  ./subMake.sh
#!/bin/sh
make -f Submakefile
STUFF = a b c d e

all : $(STUFF)

$(STUFF) :
  @echo making $@
  @sleep 1

Run ‘make’. You’ll see a, b, c, d, and e get made serially, one per second. Want to parallelize? You’d think ‘make -j5′ would do it, right? You’d be wrong. The Submakefile complains that there is no jobserver available, and still makes them serially. The reason is that the toplevel Makefile doesn’t “think” that subMake.sh is a sub-make, and doesn’t pass along the necessary magic environment variables and file descriptors for the jobserver stuff to work. But, by merely adding a COMMENT:


Makefile
submake :
  ./subMake.sh # $(MAKE)

IT WORKS!


3 Feedbacks zu "When is a comment not a comment?"

EffordBroarse

hel;o! I’m sorry, but I can’t find some information about computers. What can you advise to me? I realy need it, help me please!
vpxl generic price Thank you!



EffordBroarse

Hello! Can me tell someone I trying to find an information about domastic animales. what advise can you give me? if you have some information about this, I will be glad to read it :)
ciallis order generic Hope you will help me



SapWahCausava

Is that a new way? Nuzzle my somber tiger Fresh joke! When do you need to oil a mouse? When it squeaks.



Comments

Pleae leave a comment!




Please not: Comments may be moderated. It may take a while for them to show on the page.






Word of the Day
Your are browsing
the Archives of Steve Minutillo :: messy-78 in the 'Chinese Word of the Day' Category.
Categories
  • Chinese Word of the Day (1318)
  • Class (9)
  • Geekism (238)
  • Kung Fu (5)
  • Meta (56)
  • Mobile (32)
  • Otherwhere (58)
  • Regular (297)
  • Video Games (43)