blob: 29895b329fe38995f4e69b1658d7e4c699b58a5c (
plain)
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
|
--- Makefile
+++ Makefile
@@ -23,14 +23,15 @@
MACHINE = -DSYSTIME_HAS_NO_TM -DEUC -DSYSV_SYSTEM_DIR -DMKTIME
#OPTIMIZE = -O2 -fstrength-reduce -fomit-frame-pointer
-OPTIMIZE = -O2 -DSUPPORT_LH7 -DMKSTEMP
+OPTIMIZE = $(CFLAGS) -DSUPPORT_LH7 -DMKSTEMP
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man
-MANSECT = n
+DESTDIR =
+BINDIR = /usr/bin
+MANDIR = /usr/share/man/ja
+MANSECT = 1
INSTALL = install
-INSTALLBIN = -s -m 755
+INSTALLBIN = -m 755
INSTALLMAN = -m 644
SUBDIRS = src man
@@ -42,6 +43,7 @@
LIBRARYOBJS = patmatch$(O)
MYMAKEFLAGS = 'BINDIR=$(BINDIR)' 'MANDIR=$(MANDIR)' 'MANSECT=$(MANSECT)'\
+ 'DESTDIR=$(DESTDIR)' \
'INSTALL=$(INSTALL)' 'INSTALLBIN=$(INSTALLBIN)' 'INSTALLMAN=$(INSTALLMAN)'\
'CC=$(CC)' 'SWITCHES=$(SWITCHES)' 'O=$(O)' 'LIBRARYOBJS=$(LIBRARYOBJS)' \
'OPTIMIZE=$(OPTIMIZE)' 'MACHINE=$(MACHINE)'
--- man/Makefile
+++ man/Makefile
@@ -11,7 +11,8 @@
$(NROFF) -man lha.n > lha.man
install:
- $(INSTALL) $(INSTALLMAN) lha.n $(MANDIR)/man$(MANSECT)/lha.$(MANSECT)
+ mkdir -p `dirname $(DESTDIR)$(MANDIR)/man$(MANSECT)/lha.$(MANSECT)`
+ $(INSTALL) $(INSTALLMAN) lha.n $(DESTDIR)$(MANDIR)/man$(MANSECT)/lha.$(MANSECT)
clean:
rm -f *~
--- src/Makefile
+++ src/Makefile
@@ -49,4 +49,5 @@
rm -f core *.o lha.tar lha.tar.Z *~ \#* *.orig
install:
+ mkdir -p `dirname $(DESTDIR)$(BINDIR)/lha`
+ $(INSTALL) $(INSTALLBIN) lha $(DESTDIR)$(BINDIR)/lha
- $(INSTALL) $(INSTALLBIN) lha $(BINDIR)/lha
|