aboutsummaryrefslogtreecommitdiffstats
path: root/shells/sash/files/patch-Makefile
blob: d87e5f4675d568d4af97d1de2323ba386f205b75 (plain) (blame)
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
--- Makefile.orig   2014-03-05 18:56:53.000000000 +0900
+++ Makefile    2014-03-13 03:27:58.000000000 +0900
@@ -19,17 +19,17 @@
 #
 
 HAVE_GZIP      = 1
-HAVE_LINUX_ATTR        = 1
-HAVE_LINUX_CHROOT  = 1
-HAVE_LINUX_LOSETUP = 1
-HAVE_LINUX_PIVOT   = 1
-HAVE_LINUX_MOUNT   = 1
-HAVE_BSD_MOUNT     = 0
-MOUNT_TYPE     = '"ext3"'
+HAVE_LINUX_ATTR        = 0
+HAVE_LINUX_CHROOT  = 0
+HAVE_LINUX_LOSETUP = 0
+HAVE_LINUX_PIVOT   = 0
+HAVE_LINUX_MOUNT   = 0
+HAVE_BSD_MOUNT     = 1
+MOUNT_TYPE     = '"ufs"'
 
 OPT = -O3
 
-CFLAGS = $(OPT) -Wall -Wmissing-prototypes \
+CFLAGS += -Wall -Wmissing-prototypes \
    -DHAVE_GZIP=$(HAVE_GZIP) \
    -DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
    -DHAVE_LINUX_CHROOT=$(HAVE_LINUX_CHROOT) \
@@ -43,24 +43,26 @@
 LIBS = -lz
 
 
-DESTDIR =
-BINDIR = /bin
-MANDIR = /usr/man
+#DESTDIR =
+PREFIX ?= /usr/local
+MANPREFIX ?= $(PREFIX)
+BINDIR = $(PREFIX)/bin
+MANDIR = $(MANPREFIX)/man
 
 
 OBJS = sash.o cmds.o cmd_dd.o cmd_ed.o cmd_grep.o cmd_ls.o cmd_tar.o \
    cmd_gzip.o cmd_find.o cmd_file.o cmd_chattr.o cmd_ar.o utils.o
 
+all:   sash
 
 sash:  $(OBJS)
    $(CC) $(LDFLAGS) -o sash $(OBJS) $(LIBS)
-   strip sash
 
 clean:
    rm -f $(OBJS) sash
 
 install: sash
-   cp sash $(DESTDIR)/$(BINDIR)/sash
-   cp sash.1 $(DESTDIR)/$(MANDIR)/man1/sash.1
+   ${BSD_INSTALL_PROGRAM} sash $(DESTDIR)$(BINDIR)/sash
+   ${BSD_INSTALL_MAN} sash.1 $(DESTDIR)$(MANDIR)/man1/sash.1
 
 $(OBJS):   sash.h