summaryrefslogtreecommitdiff
blob: d07928219b40323edeb1f0c0120ed7fbcd1b6114 (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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
- remove non standard "mantex" page
- respect user flags

--- a/configure
+++ b/configure
@@ -3938,7 +3938,7 @@
 
 
 EXPORT_SOURCE_FILE="aclient.c wwwget.c skio.c skclient.c sk.h"
-EXPORT_MAN_FILE="sk.3 aclient.1 wwwget.1 aclient.tex"
+EXPORT_MAN_FILE="sk.3 aclient.1 wwwget.1 "
 EXPORT_MAN_TEX="man.tex"
 CASE="dev"
 
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,17 +31,17 @@
 #################################################################
 #PREFIX  = /usr/local
 #PREFIX  = $(HOME)
-PREFIX  = @prefix@
+PREFIX  = $(DESTDIR)@prefix@
 PACKAGE = cdsclient
 VERSION = @version@
 DISTRIB = $(PACKAGE)-$(VERSION)
 #################################################################
 
 INCDIR  = $(PREFIX)/include
-LIBDIR  = $(PREFIX)/lib
+LIBDIR  = $(DESTDIR)/@libdir@
 BINDIR  = $(PREFIX)/bin
 SHSDIR  = $(PREFIX)/bin
-MANDIR  = $(PREFIX)/man
+MANDIR  = $(PREFIX)/share/man
 ###########
 # NOTE: The definition below is required only on SOLARIS
 #       Comment the following line if required
@@ -57,12 +57,13 @@
 COPY   = cp -p
 RM     = rm
 AWK    = @AWK@
+MKDIR  = mkdir -p
 
 # C options	--------------------------------
 DEBUG = 
 C_OPT = -O
 SYS = 
-CFLAGS = $(C_OPT) $(DEBUG) $(SYS) -I.
+
 
 # FILES		--------------------------------
 VERFILE = $(PREFIX)/versions
@@ -102,7 +103,7 @@
 # RULES		--------------------------------
 .SUFFIXES: .o .c 
 .c.o:
-	$(CC) $(CFLAGS) -c $<
+	$(CC) $(CFLAGS) -I. -c $<
 
 # DEPENDENCIES	--------------------------------
 
@@ -121,41 +122,39 @@
 #		rm -f $$f; ln finducac2 $$f; done
 
 aclient: aclient.o $(OBJ)
-	$(CC) $@.o $(OBJ) $(LIBSYS) -o $@
-	$(STRIP) $@
+	$(CC) $(LDFLAGS) $@.o $(OBJ) $(LIBSYS) -o $@
 
 wwwget: wwwget.c
-	$(CC) wwwget.c $(LIBSYS) -o $@
-	$(STRIP) $@
+	$(CC) $(CFLAGS) $(LDFLAGS) wwwget.c $(LIBSYS) -o $@
 
 doc: sk.tex man.tex aclient.tex
 	latex man.tex
 
-install: $(EXPORT_INSTALL) install_shs install_info
+install: $(EXPORT_INSTALL) install_shs
 	rm -rf *.cache
 
 export_install: install_bin install_man 
 
 install_man: $(MAN)
 	if [ -d $(MANDIR) ]; then echo $(MANDIR) exists; \
-	else mkdir $(MANDIR); fi 
+	else $(MKDIR) $(MANDIR); fi 
 	for f in $(MAN); do \
 	    e=`echo $$f | cut -d. -f2`;  \
 	    if [ -d $(MANDIR)/man$$e ] ; then echo $(MANDIR)/man$$e exists ; \
-	    else mkdir $(MANDIR)/man$$e ; fi ; \
+	    else $(MKDIR) $(MANDIR)/man$$e ; fi ; \
 	    $(COPY) $$f $(MANDIR)/man$$e ;  \
 	done
 
 install_h: $(INC)
-	test -d $(INCDIR) || mkdir $(INCDIR)
+	test -d $(INCDIR) || $(MKDIR) $(INCDIR)
 	$(COPY) $(INC) $(INCDIR)
 
 install_bin: $(BIN)
-	test -d $(BINDIR) || mkdir $(BINDIR)
+	test -d $(BINDIR) || $(MKDIR) $(BINDIR)
 	$(COPY) $(BIN) $(BINDIR)
 
 install_shs: Makefile
-	test -d $(SHSDIR) || mkdir $(SHSDIR)
+	test -d $(SHSDIR) || $(MKDIR) $(SHSDIR)
 	ractools=""; test -r $(RACatCDS) && ractools=$(RACatCDS)/*; \
         test -z "$$ractools" || ls -l $$ractools; \
 	cdsutil="$(SHSatCDS)"; test -z "$(atCDS)" && cdsutil=""; \
@@ -195,7 +194,7 @@
 	$(MAKE) clean
 	-test -d /tmp/$(DISTRIB) && rm -rf /tmp/$(DISTRIB)
 	autoconf
-	mkdir /tmp/$(DISTRIB)
+	$(MKDIR) /tmp/$(DISTRIB)
 	cp -p COPYRIGHT /ftp/pub/sw/COPYING /tmp/$(DISTRIB)
 	for f in $(SHS) Makefile.in configure; do cp -p $$f /tmp/$(DISTRIB); \
 	    add_license $$f > /tmp/$(DISTRIB)/$$f; done