sasozivanovic / memoize

A cross-format package for externalization of graphics and memoization of compilation results in general
LaTeX Project Public License v1.3c
16 stars 3 forks source link

ctan package zip file is broken #23

Open JasonGross opened 4 months ago

JasonGross commented 4 months ago

If I download an unzip https://mirrors.ctan.org/macros/generic/memoize.zip, the Makefile cannot build memoize.sty, with errors such as

find: ‘doc/examples’: No such file or directory
sed: can't read doc/attachments.lst: No such file or directory
Makefile:146: Makefile.runtimes: No such file or directory
make: *** No rule to make target 'Makefile.runtimes'.  Stop.

The first can be fixed by unzipping doc/examples.zip, but the rest don't seem to have as straightforward a fix.

sasozivanovic commented 4 months ago

Sorry, I was a bit selfish here: my "build system" expects the standard Unix tools such as find, sed, grep, sort, etc.

Assuming you're running Windows: If I remember correctly, installing Git and checking (in the installer) the box to install Git Bash will install the many if not all of the required tools.

If you only want to generate the runtimes, i.e. .sty and such: Looking at the Makefiles, I see that make runtimes and make all-runtimes (to include Advice and CollArgs) should only require sed, and even that only to generate the ConTeXt runtimes. So if you only want the LaTeX runtimes, you could get away by commenting out the sed line in Makefile.runtimes.

JasonGross commented 4 months ago

No, I have all these tools (I'm on WSL), and the Makefile works fine when I build from the git repo. It is only the ctan zip file that is lacking (for example, it does not contain Makefile.runtimes at all, AFAICT)

sasozivanovic commented 4 months ago

Ahh, I see! Many thanks for bringing my attention to this, I completely forgot about the included makefiles! I'll add them with the next release. (And apologies for the unfounded assumptions.)

cfr42 commented 4 months ago

Tell me if this is a different issue, but I also get a listings error

! Package Listings Error: File `examples/titlepage.tex.c1.listing(.tex)' not f
ound.

if I run make from the top level directory after cloning the repo from GitHub. However, there is no zip to unzip: the examples directory is already populated. It just doesn't contain the file make is looking for.

I have a standard Linux environment (insofar as any Linux environment can be described as 'standard'). It certainly includes basics like the tools you mention. And make would certainly tell me if I didn't, rather than complain about not finding a file.

I assume I can probably figure out how to make at least some of the things it wants from the .dtx files, but I think the Makefile should tell make to do that for me ;).

sasozivanovic commented 4 months ago

This is a different issue, indeed, and one I intend to fix, it's just that it wasn't on the top of my list. The issue is that compiling the document runs make (urgh!) to create various formats of the examples from the example .dtxs. I intend to move this process into an examples Makefile, to be processed before compiling the document. Until then, the docs have to be compiled with -shell-escape. :(

cfr42 commented 4 months ago

Tell me if you'd rather I made this a different report.

Is the issue that you don't want to include --shell-escape in the Makefile? If the worry is security, isn't running make already a problem? It would be different if I was compiling the documentation directly, but it's a bit surprising that make doesn't compile the docs with whatever options are necessary to compile them.

sasozivanovic commented 4 months ago

Tell me if you'd rather I made this a different report.

No need for that.

Is the issue that you don't want to include --shell-escape in the Makefile? If the worry is security, isn't running make already a problem? It would be different if I was compiling the documentation directly, but it's a bit surprising that make doesn't compile the docs with whatever options are necessary to compile them.

I'm ashamed to answer this, as it implies how lax the security on my system is ;-) But you're absolutely right, make should invoke the compilation with -shell-escape.