Makefiles are driving me batty
-
I have a makefile that has
resources: myexe python3 <script that creates a MO files> python3 <script that creates a zip file with said MO files> all: resources myexe python3 <script to run myexe>
If I do a
make resources
, all is good. But if I justmake
(ormake all
), it looks like I get some ancient version of the zip. I put all sorts of debugging into the python script and I see the files get added. But they just don't exist in the zip.I've even searched the system with a
find / -name ...
and there just ain't nothin there!(And, yes, even after a
make resources
, amake
will put back the old file.)I'm losing what little hair I have left.
-
@dcon have you tried batch files? Or make clean first?
-
@Gribnit said in Makefiles are driving me batty:
@dcon have you tried batch files? Or make clean first?
I'm on Ubuntu (and MacOS). And I've completely deleted the build directory.
-
@dcon said in Makefiles are driving me batty:
<script that creates a zip fil </blockquote>
Verbosify that, see where it thinks it is, where it thinks the files are, etc.
-
Oh, even better... I stuck a
cp zipfile newname
in there.newname
is correct.zipfile
is wrong.
-
@Tsaukpaetra said in Makefiles are driving me batty:
Verbosify that, see where it thinks it is, where it thinks the files are, etc.
I did
make -d >out
- looking for 'resources', things look proper. And I only see the actual filename where the script spits it out.
-
@dcon said in Makefiles are driving me batty:
I only see the actual filename where the script spits it out.
Is the script immutable?
-
It was a different script. One that was only supposed to be running tests, not modifying things.(found it by adding a
chmod 400
in the makefile - that other script then failed)And I'm all out of liquor...
-
-
@dcon said in Makefiles are driving me batty:
The surest sign that you're working with build automation is a series of new dents in your desk.
-
@dkf The only thing worse than
make
is all of the alternatives?
-
@PleegWat
make
works well… provided you can follow the “this file generates exactly that file” paradigm that is common in C and C++. It really sucks for Java (BTDT) because Java has a simultaneous-declaration model, and hence likes to recompile theworldwhole project at once. (Fortunately, that's quick.)make
is also not a very good fit for (La)TeX, but there it's because you potentially have to repeatedly run the build in a loop until it stabilises the cross-references, and there's potentially no upper bound on how long that takes.In both cases, you can make it work… sort of… but it's horrid and you're better off doing something else.
-
@dkf We use a utility to generate function declarations automatically. It has been suggested to run this utility automatically during the build phase. I've always been opposed to that because I have no idea how that could work without always rebuilding all object files.