-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
88 lines (73 loc) · 2.44 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env make
#
# polite.english.words - sorted list of polite words from the English language
#
# Copyright (c) 2024 by Landon Curt Noll. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby granted,
# provided that the above copyright, this permission notice and text
# this comment, and the disclaimer below appear in all of the following:
#
# supporting documentation
# source copies
# source works derived from this source
# binaries derived from this source or from derived source
#
# LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
# EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
# USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# chongo (Landon Curt Noll, http://www.isthe.com/chongo/index.html) /\oo/\
#
# Share and enjoy! :-)
#############
# utilities #
#############
CHMOD= chmod
CP= cp
INSTALL= install
MV= mv
RM= rm
SHELL= bash
SORT= sort
UNIQ= uniq
######################
# target information #
######################
DESTDIR= /usr/local/share/polite.words
TARGETS= polite.english.words.txt
######################################
# all - default rule - must be first #
######################################
all: ${TARGETS}
#################################################
# .PHONY list of rules that do not create files #
#################################################
.PHONY: all configure clean clobber install sort
# Perform a canonical sort, removing duplicate words
#
# NOTE: We cannot use sort -d -f -u because that would remove words
# that differ by letter case.
#
sort: polite.english.words.txt
TMP=".tmp.$$.polite.english.words.txt.tmp" ; \
${RM} -f "$$TMP" ; \
LC_ALL=C ${SORT} -d -f polite.english.words.txt | ${UNIQ} > "$$TMP" ; \
${MV} -f "$$TMP" polite.english.words.txt
###################################
# standard Makefile utility rules #
###################################
configure:
@echo nothing to configure
clean:
@:
clobber: clean
${RM} -f .tmp.*.polite.english.words.txt.tmp
install: all sort
${INSTALL} -m 0755 -d ${DESTDIR}
${INSTALL} -m 0444 ${TARGETS} ${DESTDIR}