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
|
--- cw-1.0.16/Makefile.in 2007-09-25 11:10:20.000000000 -0600
+++ cw-1.0.16/Makefile.in 2009-12-23 00:22:47.932698402 -0600
@@ -8,7 +8,7 @@ CC=@CC@
ECHO=echo
LN=ln
RM=rm
-MKDIR=mkdir
+MKDIR=mkdir -p
INSTALL=@INSTALL@
all:
@@ -56,32 +56,18 @@ installlocal: cleanlocal local
install: cleanpub cw cwu
@$(ECHO) "* Installing color wrapper..."
- @for FILE in bin/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(BINDIR);done
- @$(LN) -sf $(BINDIR)/cw $(BINDIR)/cwe
+ @for FILE in bin/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(BINDIR);done
+ @$(LN) -sf $(DESTDIR)$(BINDIR)/cw $(DESTDIR)$(BINDIR)/cwe
@$(ECHO) "* Installing color wrapper generic definition files..."
- @$(MKDIR) -m 755 $(LIBDIR)/cw/
- @for FILE in def/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(LIBDIR)/cw/;done
+ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/
+ @for FILE in def/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(LIBDIR)/cw/;done
@$(ECHO) "* Installing color wrapper generic header/footer files..."
- @$(MKDIR) -m 755 $(LIBDIR)/cw/etc
- @for FILE in etc/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(LIBDIR)/cw/etc;done
+ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/etc
+ @for FILE in etc/*;do $(INSTALL) -m 644 $$FILE $(DESTDIR)$(LIBDIR)/cw/etc;done
@$(ECHO) "* Installing manual pages..."
- @for FILE in man/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(MANDIR)/man1/;done
+ @for FILE in man/*;do $(INSTALL) -m 644 $$FILE $(DESTDIR)$(MANDIR)/man1/;done
@$(ECHO) "* Updating definition files..."
- @$(BINDIR)/cwu $(LIBDIR)/cw $(BINDIR)/cw
- @$(ECHO) "-----------------------------------------------------------"
- @$(ECHO) "* Complete, definitions are stored in: $(LIBDIR)/cw"
- @$(ECHO) "* For bash: place 'export PATH=\"$(LIBDIR)/cw:\$$PATH\"'"\
- "at the end of ~/.bash_profile(or /etc/profile globally)"
- @$(ECHO) "* For tcsh: place 'setenv PATH \"$(LIBDIR)/cw:\$$PATH\"'"\
- "at the end of ~/.login(or /etc/csh.login globally)"
- @$(ECHO) "* Or to automate the two lines above use the"\
- "\"colorcfg\" command. (and add optional anti-coloring precautions)"
- @$(ECHO) "* Once the desired shell(s) are setup, use the"\
- "\"color\" command, or the environmental variable NOCOLOR=1 to turn"\
- "color wrapping on and off."
- @$(ECHO) ""
- @$(ECHO) "* PLEASE view the ./README file for more information if"\
- "you haven't already."
+ @$(DESTDIR)$(BINDIR)/cwu $(DESTDIR)$(LIBDIR)/cw $(DESTDIR)$(BINDIR)/cw
clean:
@$(ECHO) "* Cleaning compiling content..."
@@ -94,9 +80,9 @@ cleanlocal:
cleanpub:
@$(ECHO) "* Cleaning cw and cwu binaries, and definitions..."
- @$(RM) -rf $(BINDIR)/cw $(BINDIR)/cwu $(BINDIR)/cwe\
- $(BINDIR)/cw.exe $(BINDIR)/cwu.exe $(BINDIR)/color $(BINDIR)/colorcfg\
- $(LIBDIR)/cw $(MANDIR)/man1/cw.1.gz $(MANDIR)/man1/cwu.1.gz\
- $(MANDIR)/man1/cwe.1.gz
+ @$(RM) -rf $(DESTDIR)$(BINDIR)/cw $(DESTDIR)$(BINDIR)/cwu $(DESTDIR)$(BINDIR)/cwe\
+ $(DESTDIR)$(BINDIR)/cw.exe $(DESTDIR)$(BINDIR)/cwu.exe $(DESTDIR)$(BINDIR)/color $(DESTDIR)$(BINDIR)/colorcfg\
+ $(DESTDIR)$(LIBDIR)/cw $(DESTDIR)$(MANDIR)/man1/cw.1.gz $(DESTDIR)$(MANDIR)/man1/cwu.1.gz\
+ $(DESTDIR)$(MANDIR)/man1/cwe.1.gz
cleanall: clean cleanlocal cleanpub
--- cw-1.0.16/bin/colorcfg 2007-09-25 11:10:20.000000000 -0600
+++ cw-1.0.16/bin/colorcfg 2009-12-23 00:29:05.105994275 -0600
@@ -12,7 +12,7 @@ if test -x "${HOME}/.cw/bin/colorcfg";th
else
SED="`which sed 2>/dev/null`"
if test -z "$SED";then
- CWLIB="/usr/local/lib/cw"
+ CWLIB="/usr/lib/cw"
echo "(NOTE: using static cw library path, this could be invalid)"
else
CWLIB="`echo \"$0/lib/cw\"|sed \"s/\/bin\/colorcfg//g\"`"
|