cleanup + make ergonomics...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-04-27 01:46:04 +03:00
parent f094d073b5
commit 561273e27c
2 changed files with 15 additions and 10 deletions

View File

@ -248,11 +248,8 @@ LN := cp -l
# NOTE: grep's -z flag generates a bunch if nulls that we need to clean # NOTE: grep's -z flag generates a bunch if nulls that we need to clean
# out via tr. # out via tr.
DEPENDS.txt: $(MODULE).cls DEPENDS.txt: $(MODULE).cls
cat $< \ make depends \
| grep -Ezo '\s*\\RequirePackage(\[[^]]*\])?\{[^}]*\}' \
| sed -e 's/.*{\(.*\)}/hard \1\n/' \
| grep -a hard \ | grep -a hard \
| tr -d '\000' \
> $@ > $@
@ -265,6 +262,15 @@ version:
@echo $(VERSION) @echo $(VERSION)
.PHONY: depends
depends: $(MODULE).cls
@cat $< \
| grep -Ezo '\s*\\RequirePackage(\[[^]]*\])?\{[^}]*\}' \
| sed -e 's/.*{\(.*\)}/hard \1\n/' \
| grep -a hard \
| tr -d '\000'
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Main targets... # Main targets...

View File

@ -34,15 +34,14 @@ $ cd ./photobook
$ make install $ make install
``` ```
The `photobook` document class requres a set of modules to be installed The `photobook` document class requires a set of modules to be installed
for it to function properly, the full list is included in the docs and for it to function, the full list is included in the docs and can be
can be generated (`DEPENDS.txt` file) by calling: printed by calling:
```shell ```shell
$ make DEPENDS.txt $ make depends
``` ```
If only building the docs is required without installing, do:
If only building the docs is required without installing:
```shell ```shell
$ make pdf $ make pdf
``` ```