Times are UTC Toggle Colours
00:42:05 <wallabra> This is a dumb way to force bridges to be trussed... https://i.imgur.com/lcfkAi8.png 01:01:57 *** Vadtec has quit IRC 01:08:58 *** Vadtec has joined #openttd 01:33:45 <DorpsGek> [OpenTTD/OpenTTD] James103 commented on issue #8712: Thread safety issues detected by ThreadSanitizer https://github.com/OpenTTD/OpenTTD/issues/8712 02:09:30 *** Wormnest_ has quit IRC 02:30:23 *** glx has quit IRC 02:41:48 *** D-HUND has joined #openttd 02:45:13 *** debdog has quit IRC 04:25:13 *** Smedles has quit IRC 04:25:21 *** Smedles has joined #openttd 05:30:59 *** andythenorth has joined #openttd 05:47:37 <DorpsGek> [OpenTTD/OpenTTD] DartPower started discussion #9922: Rewrite of PSP port is possible? https://github.com/OpenTTD/OpenTTD/discussions/9922 05:53:57 *** andythenorth has quit IRC 06:00:07 *** andythenorth has joined #openttd 06:20:52 <andythenorth> oof 06:25:05 *** sla_ro|master has joined #openttd 07:06:35 *** Flygon has joined #openttd 07:10:31 <andythenorth> I forsee learning about make patterns in my future 07:13:09 <andythenorth> if I can convert all the targets to work on lists of deps instead of a single dep 07:13:40 <andythenorth> then if I can somehow pass the list as a shell arg or something 07:15:41 <dwfreed> make has a variable that means "all dependencies for this target" 07:16:27 <andythenorth> is it $@ 07:16:42 <andythenorth> seems to be a magic var I'm seeing used in examples 07:16:44 <dwfreed> $^ 07:16:50 <dwfreed> $@ is the target 07:17:21 <dwfreed> if you only want the deps that are newer than an existing target, there is $? 07:39:57 *** MaverickFischer_ has joined #openttd 07:40:46 *** MaverickFischer has quit IRC 07:48:35 *** andythenorth has quit IRC 07:52:08 *** andythenorth has joined #openttd 08:11:20 *** Etua has joined #openttd 08:11:22 *** yoltid[m] has quit IRC 08:11:27 *** ciet[m] has quit IRC 08:11:53 *** Etua has quit IRC 08:19:31 *** WormnestAndroid has quit IRC 08:19:36 *** WormnestAndroid has joined #openttd 10:03:41 *** Etua has joined #openttd 10:10:41 *** Etua has quit IRC 10:17:55 *** Samu has joined #openttd 10:22:42 *** WormnestAndroid has quit IRC 10:22:58 *** WormnestAndroid has joined #openttd 10:26:49 *** D-HUND is now known as debdog 10:31:01 *** WormnestAndroid has quit IRC 10:31:28 *** WormnestAndroid has joined #openttd 11:39:17 <DorpsGek> [OpenTTD/team] glx22 commented on issue #322: [cs_CZ] Translator access request https://github.com/OpenTTD/team/issues/322 12:07:24 <andythenorth> think I need something like this https://stackoverflow.com/questions/4320416/how-to-use-a-variable-list-as-a-target-in-a-makefile 12:08:09 <andythenorth> to convert from $(NFO_FILE) to $(NFO_FILES) https://github.com/andythenorth/iron-horse/blob/master/Makefile#L95 12:11:16 <andythenorth> dunno if a target can be a list 12:11:59 <andythenorth> SO overflow examples implies it can 12:19:37 <LordAro> sure 12:25:10 <andythenorth> so this is a pattern thing? `grf-%: ...\n\t$(MAKE) PROJECT_NAME=$* grf` 12:25:29 <LordAro> yup 12:25:31 <andythenorth> this is becoming a little bit clearer 12:25:53 <andythenorth> ok so I think I need to do the following 12:26:07 <andythenorth> 1) convert all the single-file targets and deps to lists with patterns 12:26:17 <andythenorth> 2) have the default list be 'all grfs' 12:26:33 <andythenorth> 3) provide an optional parameter to target a single roster (this already exists, but is only used by python currently) 12:26:49 <andythenorth> the case for building is e.g. 'moose' or 'all' 12:27:07 <andythenorth> the case of 'moose', 'ibex' combinations is not valid 12:27:10 <andythenorth> it's 1 or all 13:11:50 <peter1138> Nice weather, shame I can't go out and play :-( 13:12:17 *** glx has joined #openttd 13:12:17 *** ChanServ sets mode: +v glx 13:46:33 *** nielsm has joined #openttd 14:54:55 <andythenorth> le oof 15:02:41 *** andythenorth has quit IRC 15:17:41 *** dihedral has quit IRC 15:17:52 *** dihedral has joined #openttd 15:20:07 *** sla_ro|master has quit IRC 15:22:32 *** andythenorth has joined #openttd 15:40:23 *** gelignite has joined #openttd 15:56:34 <andythenorth> was it lunch? 16:05:14 <FLHerne> It was. Chips, then cheese and red onion sandwich 16:06:59 *** Wormnest has joined #openttd 16:12:41 <andythenorth> sound epic 16:12:44 <andythenorth> sounds * 16:19:47 <FLHerne> I'm in Stourbridge atm, with the weird tiny train https://www.flherne.uk/files/IMG_20220525_191853.jpg 16:20:10 <FLHerne> (picture not current but I'm still here) 16:20:25 <FLHerne> it's too hot :p 16:20:57 <andythenorth> hmm train is not in Iron Horse 16:21:08 <andythenorth> 'must redesign' 16:22:36 *** virtualrandomnumber has joined #openttd 16:33:35 *** Smedles has quit IRC 16:33:49 *** Smedles has joined #openttd 16:37:02 *** sla_ro|master has joined #openttd 16:42:55 *** virtualrandomnumber has quit IRC 16:50:46 <FLHerne> It would be just as bad in-game as in real life 16:55:05 *** Wolf01 has joined #openttd 16:58:40 *** HerzogDeXtEr has joined #openttd 18:22:07 <andythenorth> ok today is educate-the-clueless-about-makefiles-day 18:22:08 <andythenorth> again 18:23:36 <andythenorth> I need to convert this to a pattern for nfo files, not a single nfo file https://github.com/andythenorth/iron-horse/blob/master/Makefile#L95 18:29:19 <andythenorth> https://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Static-Usage.html has me lost in prerequisites :P 18:38:45 <andythenorth> :0 18:38:50 <andythenorth> what have I done? https://github.com/andythenorth/iron-horse/commit/9c12a653c4aa7d915790bc784d7a6d4a2a5bd396 18:38:54 <andythenorth> it appears to kinda work 18:38:58 <andythenorth> even with -j 18:39:31 <andythenorth> but I've changed the logic with the lang / graphics deps, and I don't know how it worked, or if it still worked :P 18:42:21 <nielsm> wrong dependencies in a makefile can cause three kinds of issues: first is if you make a circular dependency, then I think you get errors. second is if you forgot to declare a dependency, then sometimes the target might not get made when it needs to. third is if you add unncessary dependencies, then your target might get made more often than it needs to. 18:43:08 <nielsm> actually nm, there's the fourth which is serious 18:43:42 <nielsm> that an undeclared dependency won't get made before the target, so the target gets made wrong or errors 18:48:38 <andythenorth> uuf this would be so much easier in python 18:48:40 <andythenorth> but also not 18:59:23 *** uhren has joined #openttd 19:07:18 *** Flygon has quit IRC 19:10:54 *** uhren has quit IRC 19:12:26 <andythenorth> I thought maybe I was doing something make can't do 19:12:45 <andythenorth> but it seems this is really core purpose of make? 19:18:22 <nielsm> yes, the core concept of make is that you have targets made from dependencies, where both targets and dependencies are real files 19:19:34 <nielsm> the dependencies can either be source files or other targets in the makefile, and if any of the dependencies of a target has a newer modification time than the target file, then the target is considered out of date and needs to be rebuilt according to the "recipe" for that target 19:20:40 <andythenorth> specifically it's the pattern matching in lists that I thought might be 'doing make wrong' 19:20:42 <andythenorth> but seems not 19:20:52 <nielsm> and because software projects typically have lots of targets built in similar manners it supports generic targets like "an .o file can be made from a .c file by running this command" 19:21:39 <nielsm> I think the normal way is to assume that foo.nfo is built from foo.nml (basename remains the same, extension changes) 19:22:49 <andythenorth> that would hold here 19:23:01 <andythenorth> foo.grf depends on foo.nfo which depends on foo.nml 19:23:17 <andythenorth> foo.nml depends on a set of input files as determined by an external python script 19:23:30 <andythenorth> but foo.grf also depends on graphics and lang targets 19:25:17 <nielsm> I think there is also a way to have a separate dependency calculation step or have make read additional dependencies from somewhere 19:25:59 <nielsm> which can be used with C and C++ compilers that can output a list of included files so changing a header file automatically causes all dependent source files to be rebuilt 19:28:09 <andythenorth> L90 is an example of fetching the deps from elsewhere https://github.com/andythenorth/iron-horse/blob/master/Makefile#L90 19:30:39 *** tokai|noir has joined #openttd 19:30:40 *** ChanServ sets mode: +v tokai|noir 19:37:36 *** tokai has quit IRC 19:41:22 *** virtualrandomnumber has joined #openttd 19:41:28 *** virtualrandomnumber has quit IRC 19:48:53 <andythenorth> hmm need to strip some text from some var names 19:58:25 <andythenorth> this seems to sort of work, for the limited test case so far 19:58:25 <andythenorth> https://github.com/andythenorth/iron-horse/commit/70f880fce961269f12bfe5a3c15d9ddb9952c7cf 19:58:29 <andythenorth> this is quite surprising to me 20:13:46 *** geli has joined #openttd 20:13:46 *** gelignite has quit IRC 20:14:50 *** gelignite has joined #openttd 20:14:50 *** geli has quit IRC 20:19:13 * andythenorth looking at https://github.com/andythenorth/iron-horse/commit/be4207c9b3d13bc57894662063132fe4431758d0 20:20:16 <andythenorth> no quak :P 20:30:32 *** gelignite has quit IRC 20:40:36 *** nielsm has quit IRC 20:46:21 *** MaverickFischer_ is now known as MaverickFischer 21:11:34 *** HerzogDeXtEr has quit IRC 21:21:17 <andythenorth> not sure how to adapt the `install` target https://github.com/andythenorth/iron-horse/blob/6790f95eacc0c018ddf2adad02dd8af2f6428760/Makefile#L145 21:22:16 <andythenorth> it needs to use the GRF_FILES list, but it's not a targets: prerequisites type rule 21:31:57 <andythenorth> install is a phony target 21:32:27 *** Samu has quit IRC 21:41:24 *** Wolf01 has quit IRC 21:51:20 *** sla_ro|master has quit IRC 22:03:45 <andythenorth> well this seems to work but eh 22:03:46 <andythenorth> https://github.com/andythenorth/iron-horse/blob/8c26d3f3c05e9d0c86b3c6b933aa2a0f419fa171/Makefile#L145 22:04:20 <andythenorth> $${GRF_FILE_PATH##*/} is copy-paste and the syntax highlighter for make hates it 22:04:34 <andythenorth> it seems to strip the dir name, not sure what the magic is 22:08:42 *** wallabra_ has joined #openttd 22:09:51 *** wallabra is now known as Guest2106 22:09:51 *** wallabra_ is now known as wallabra 22:13:37 *** Guest2106 has quit IRC 22:15:47 *** wallabra_ has joined #openttd 22:20:37 *** wallabra has quit IRC 22:21:49 <andythenorth> ok sometimes -j causes a target to attempt to build multiple times when it only needs to build once 22:21:56 <andythenorth> hmmm 22:23:06 <andythenorth> I can see why, but I don't know what to do to prevent it :P 22:27:51 <andythenorth> meh failure is intermittent :D 22:39:43 *** andythenorth has quit IRC 23:19:12 *** wallabra has joined #openttd 23:24:07 *** wallabra_ has quit IRC 23:57:30 *** wallabra_ has joined #openttd