-
Notifications
You must be signed in to change notification settings - Fork 0
/
XMakefile.uninst
48 lines (35 loc) · 1.58 KB
/
XMakefile.uninst
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
.set BD
#include "XMakefile.inc"
.set IDIRS samples/adm samples
.set XDIRS dbin
.set IFILES `find $(IDIRS) -type f -print | sort | uniq`
.set XFILES `find $(XDIRS) -type f -print`
.set IMAN `find man -type f -print`
.set MDIRS dqueue spool group spool/news spool/group
.set DDIRS $(XDIRS:"*":"$(IDIR)/*.dummy") $(IDIRS:"*":"$(IDIR)/*.dummy")
.set DMDIRS $(MDIRS:"*":"$(IDIR)/*.dummy")
.set DFILES $(IFILES:"*":"$(IDIR)/*.dummy")
.set DTFILES $(IFILES:"samples/*":"$(IDIR)/*.dummy")
.set DTDIRS $(IDIRS:"samples/*":"$(IDIR)/*.dummy")
.set DXFILES $(XFILES:"*":"$(IDIR)/*.dummy")
.set DMAN $(IMAN:"man/*.?":"$(MDIR)/man%2/%1.%2.dummy")
uninstall: $(IDIR) $(DTFILES) $(DXFILES) $(DFILES) $(DMAN) $(DDIRS) $(DMDIRS) $(DTDIRS)
@echo "note: only files matching installation were deleted"
$(IDIR) : $(IDIR)
@echo "no $(IDIR) directory/partition"; exit 1
$(DDIRS) : $(DDIRS)
@-rmdir %(left:"*.dummy":"*") > /dev/null 2>&1
@if [ -d %(left:"*.dummy":"*") ]; then echo 'unable to remove %(left:"*.dummy":"*")'; fi
$(DTDIRS) : $(DTDIRS)
@-rmdir %(left:"*.dummy":"*") > /dev/null 2>&1
@if [ -d %(left:"*.dummy":"*") ]; then echo 'unable to remove %(left:"*.dummy":"*")'; fi
$(DMDIRS) : $(DMDIRS)
@echo "You must remove %(left:"*.dummy":"*") yourself"
$(DFILES) : $(IFILES)
@-(cmp %(left:"*.dummy":"*") %(right) && rm -f %(left:"*.dummy":"*")) > /dev/null 2>&1
$(DTFILES) : $(IFILES)
@-(cmp %(left:"*.dummy":"*") %(right) && rm -f %(left:"*.dummy":"*")) > /dev/null 2>&1
$(DXFILES) : $(XFILES)
@rm -f %(left:"*.dummy":"*")
$(DMAN) : $(IMAN)
@rm -f %(left:"*.dummy":"*")