From 561273e27cdd086246524e4b9f07f0104a9cd3de Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 27 Apr 2023 01:46:04 +0300 Subject: [PATCH] cleanup + make ergonomics... Signed-off-by: Alex A. Naanou --- Makefile | 14 ++++++++++---- README.md | 11 +++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 769c5c2..d07f978 100644 --- a/Makefile +++ b/Makefile @@ -248,11 +248,8 @@ LN := cp -l # NOTE: grep's -z flag generates a bunch if nulls that we need to clean # out via tr. DEPENDS.txt: $(MODULE).cls - cat $< \ - | grep -Ezo '\s*\\RequirePackage(\[[^]]*\])?\{[^}]*\}' \ - | sed -e 's/.*{\(.*\)}/hard \1\n/' \ + make depends \ | grep -a hard \ - | tr -d '\000' \ > $@ @@ -265,6 +262,15 @@ 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... diff --git a/README.md b/README.md index 75f4e25..a046e8d 100644 --- a/README.md +++ b/README.md @@ -34,15 +34,14 @@ $ cd ./photobook $ make install ``` -The `photobook` document class requres a set of modules to be installed -for it to function properly, the full list is included in the docs and -can be generated (`DEPENDS.txt` file) by calling: +The `photobook` document class requires a set of modules to be installed +for it to function, the full list is included in the docs and can be +printed by calling: ```shell -$ make DEPENDS.txt +$ make depends ``` - -If only building the docs is required without installing: +If only building the docs is required without installing, do: ```shell $ make pdf ```