[hackers] [libgrapheme] Make lists in Makefile more idiomatic and avoid breaks || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Wed, 15 Dec 2021 13:36:10 +0100 (CET)

commit 20c105bcdd1c54401d4d23cdb9ded56ee7a2ffd4
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Wed Dec 15 13:34:06 2021 +0100
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Wed Dec 15 13:34:06 2021 +0100

    Make lists in Makefile more idiomatic and avoid breaks
    
    Thanks Quentin Rameau for the remark regarding the more idiomatic
    way to specify lists where also the last element has an explicit
    line-break followed by an empty line.
    
    Also avoid breaks later on in the code: This breaks the line-length
    a bit, but has an effect on the output. I prefer a cleaner output
    (also in the build-logs) over one overlong line.
    
    Signed-off-by: Laslo Hunhold <dev_AT_frign.de>

diff --git a/Makefile b/Makefile
index fb8969a..104d805 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -7,22 +7,27 @@ include config.mk
 DATA =\
         data/emoji-data.txt\
         data/GraphemeBreakProperty.txt\
- data/GraphemeBreakTest.txt
+ data/GraphemeBreakTest.txt\
+
 GEN =\
         gen/grapheme\
- gen/grapheme-test
+ gen/grapheme-test\
+
 SRC =\
         src/grapheme\
         src/utf8\
- src/util
+ src/util\
+
 TEST =\
         test/grapheme\
         test/grapheme-performance\
         test/utf8-decode\
- test/utf8-encode
+ test/utf8-encode\
+
 MAN3 =\
         man/lg_grapheme_isbreak.3\
- man/lg_grapheme_nextbreak.3
+ man/lg_grapheme_nextbreak.3\
+
 MAN7 = man/libgrapheme.7
 
 all: libgrapheme.a libgrapheme.so
_AT_@ -99,16 +104,14 @@ uninstall:
         rm -f "$(DESTDIR)$(INCPREFIX)/grapheme.h"
 
 clean:
- rm -f $(GEN:=.h) $(GEN:=.o) $(GEN) gen/util.o $(SRC:=.o) src/util.o \
- $(TEST:=.o) test/util.o $(TEST) libgrapheme.a libgrapheme.so
+ rm -f $(GEN:=.h) $(GEN:=.o) gen/util.o $(GEN) $(SRC:=.o) src/util.o $(TEST:=.o) test/util.o $(TEST) libgrapheme.a libgrapheme.so
 
 clean-data:
         rm -f $(DATA)
 
 dist:
- mkdir libgrapheme-$(VERSION) libgrapheme-$(VERSION)/data\
- libgrapheme-$(VERSION)/gen libgrapheme-$(VERSION)/man\
- libgrapheme-$(VERSION)/src libgrapheme-$(VERSION)/test
+ mkdir libgrapheme-$(VERSION)
+ for m in data gen man src test; do mkdir libgrapheme-$(VERSION)/$$m; done
         cp config.mk grapheme.h LICENSE Makefile libgrapheme-$(VERSION)
         cp $(DATA) libgrapheme-$(VERSION)/data
         cp $(GEN:=.c) gen/util.c gen/util.h libgrapheme-$(VERSION)/gen
Received on Wed Dec 15 2021 - 13:36:10 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 15 2021 - 13:36:35 CET