/srv/irclogs.ubuntu.com/2021/09/14/#ubuntu-server.txt

=== scoobydoo_ is now known as scoobydoo
fooNot exactly sure where to ask a Makefile question01:42
fooTrying to write a Makefile to set up a project, eg. https://bpa.st/ZRTQ - but it's failing on source. Is this not possible?01:42
sarnoldfoo: Makefiles use tabs, not spaces01:46
sarnoldfoo: also, each line is executed in its own shell, so probably that venv/bin/activate isn't actually going to do anything for the next pip install line01:46
sarnoldfoo: (i'm not actually good at python things, but I *think* that venv activate thing just messes with settings in your current shell? maybe I'm wrong..)01:47
foosarnold: oh, haha, that makes sense.01:49
fooI think you're right.01:49
foosarnold: any other way to suppress echoing back the commands or is @ the preferred method?01:49
sarnoldfoo: @ is usual for that, yeah :)01:50
mwhudsonbe warned that future maintainers may hate you for using @ too much01:52
sarnoldyeah, I basically only use it for @echo .. :)01:52
sarnoldI want to have an idea what's going on when reading logs later, hehe01:53
fooohh, I appreciate that sentiment - thank you01:53
fooIs there a way to run make by itself and have it default? 02:23
fooinstead of make mycmd02:23
foo?02:23
sarnoldfoo: 'make' on its own will automatically run the first target02:26
foosarnold: oh. thanks. I think I'm doing this wrong, although it does work02:29
foo.go: go02:29
foogo:02:29
foo    @python3 -m venv venv02:29
fooha02:29
fooI think I need PHONY02:29
sarnoldyeah, .PHONY if you want something other than the first one :)02:29
sarnoldoh, uh, that's something else02:30
sarnold.PHONY means 'there's no file with this name' -- .DEFAULT changes the target that's run when no target is given02:31
foosarnold: thanks, this is my whole Makefile - https://bpa.st/2AIQ - if I run make by itself, I'm getting Makefile:5: *** missing separator.  Stop.02:32
fooI wonder if I have a syntax error?02:32
sarnoldfoo: yeah, I think several -- .go: ... introduces a *single suffix* rule, so that make will know how to compile a file ending in .go into a file without an extension at all.. then line 2 starts go:  and introduces a new block. the 'missing separator' is probably make sad that there's no blank line between these things02:33
sarnoldfoo: and don't forget what I said about tabs :) those spaces won't work02:34
foosarnold: yeah yeah, you and your tabs... the tabs are getting lost in my copy/paste to the pastebin :P 02:38
* foo had to disable expandtab on vim already :P 02:38
foosarnold: ahh, ok, so I don't want go then02:38
foosarnold: swapping .go with .PHONY worked, thanks :) 02:39
sarnoldwoot02:40
fooas in, I can now just run make 02:40
fooBeen hearing about makefiles for a while, glad to take a stab at this02:40
sarnoldmake gets a bad rap, and I know I've seen some Makefiles that grew to be pretty complex beasts02:43
sarnoldbut I like how simple it is, if not very friendly at first :)02:43
sarnoldif you're very precise with your rules, you can get some pretty crazy parallelism speedups; eg compiling the linux kernel, 'make -j 300' kind of thing can spin up 300 things at once and make some pretty impressive gains vs a plain 'make' on a single task at a time :)02:45
mwhudsonthe gnu make extensions consist of a mix of things that should always have been there and some things that should never ever be used under any circumstances afaict03:39
mwhudson(i'm hardly an expert on make or gnu make though)03:39
=== genii is now known as genii-core
=== Guest2014 is now known as zerosum
=== genii-core is now known as genii
ShariffHi there15:43
ShariffWhere does my ubuntu server configure the network interface? I can't find the files that handle it. It's not /etc/network/interfaces, /etc/network/interfaces.d/*, /etc/dhcpcd.conf, /etc/dhclient.conf... networkctl does tell me the interface is configured... any ideas?15:44
ograShariff, /etc/netplan ... see the netplan.io website for examples15:45
Shariffogra: thanks.. looking there!15:45
ShariffYay! found it, thanks!15:47
Shariffit seems that my dns server is 127.0.0.53... according to resolv.conf... but resolvcectl status shows the correct dns servers for the interface.. what is going wrong between resolv and the dns from the link?17:59
fooCan someone help with this Makefile recipe? https://bpa.st/QHJQ20:00
fooThe variable replacement doesn't seem to work properly, hmm.20:01
foosarnold: in case you happen to be around :)20:09
sarnoldoh hey foo :)20:09
sarnoldheh, this has grown quite a lot since yesterday :) nice20:10
sarnoldwow, does bash actually ask you for input on that?20:10
foosarnold: yes! This is literally the last step in the puzzle, haha.20:10
foosarnold: yes, but it's not displaying it properly in the URL 20:10
fooOh, I wonder...20:10
foosarnold: Not sure what I'm missing, I've tried a handful of variations here.20:11
sarnoldthe usual convention is to require the user to pass it as a variable, something like VERSION=3.1 make   or make VERSION=3.1   kind of thing20:11
foosarnold: interesting, I suppose I could work with that.20:12
fooLess than desirable, but I'm on a time crunch.20:12
sarnold(they do different things, I don't remember off hand which one works better than the other, or why. sigh.)20:12
foosarnold: if I passed in via env variable, how do I reference it in the URL?20:18
fooI've tried every variation for 20 minutes now. $(VERSION) $$(VERSION) $VERSION $$((VERSION))20:19
fooNevermind, it's {VERSION}20:20
fooNevermind, it's ${VERSION}20:20
sarnoldfoo: https://termbin.com/h8ri20:21
sarnoldaha :)20:21
foosarnold: thanks :D 20:21

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!