blob: 95897908b14678a0c0f01382a989c7bda07a7d27 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/usr/bin/sed
# Match the install section of the makefile
/^install:/,/^$/{
# link commands only substitute the final PREFIX
/^\s*ln.*$/s/\$\(PREFIX\)(\S+)$/$(DESTDIR)$(PREFIX)\1/;
# non-inks substitute $(PREFIX) for $(DESTDIR)$(PREFIX)
/^\s*ln.*$/!s/\$\(PREFIX\)/$(DESTDIR)$(PREFIX)/g;
# fix manpage paths
s|\$\(PREFIX\)/man|$(PREFIX)/share/man|g
}
|