Better HN
topnewbestaskshowjobs
Log inSign up

jacwah

17 karma · joined Dec 14, 2018 (7y ago) · 4 submissions

Submissions

comment 6y ago · link · parent

That's not what O(1) means. If your strings are short, complexity doesn't matter either way.

comment 7y ago · link · parent

> It would be wonderful for say 10 c files compiling one way, and the 11th having a different option.

You can do this by combining implicit and explicit rules:

  target: $(OBJ)
  
  # default rule
  %.o: %.c
      cc -o $@ $^
  
  # special case
  special.o: special.c
      specialc -o $@ $^

comment 7y ago · link · parent

This reminds me of "The Calf-Path": https://www.poets.org/poetsorg/poem/calf-path