File: Makefile

package info (click to toggle)
sqlrelay 1%3A0.35-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 11,944 kB
  • ctags: 6,102
  • sloc: cpp: 41,419; python: 11,007; ansic: 10,279; java: 9,833; perl: 9,500; php: 9,229; ruby: 9,182; sh: 8,700; makefile: 3,474; tcl: 5
file content (64 lines) | stat: -rw-r--r-- 2,149 bytes parent folder | download
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
top_builddir = ..

include ../config.mk

UID = $(shell id | grep "uid=0" )

ifneq ($(UID),)
initroot = $(DESTDIR)
else
initroot = $(prefix)
endif

install:
ifeq ($(UNAME),Linux)
	if ( test -d "/etc/rc.d/init.d" -a -d "/etc/sysconfig" -a -d "/var/lock/subsys" ); then \
		$(MKINSTALLDIRS) $(initroot)/etc/rc.d/init.d; \
		$(MKINSTALLDIRS) $(initroot)/etc/sysconfig; \
		$(INSTALL) -m 755 redhat/init.d/sqlrelay $(initroot)/etc/rc.d/init.d; \
		$(INSTALL) -m 644 redhat/sysconfig/sqlrelay $(initroot)/etc/sysconfig; \
	else \
		if ( test -r "/etc/rc.d/rc.inet2" -a -d "/etc/rc.d" -a -d "/var/lock/subsys" ); then \
			$(MKINSTALLDIRS) $(initroot)/etc/rc.d; \
			$(INSTALL) -m 755 slackware/rc.d/rc.sqlrelay $(initroot)/etc/rc.d; \
			$(INSTALL) -m 644 slackware/sqlrelay $(initroot)/etc; \
		else \
			if ( test -r "/etc/init.d" -a -d "/var/lock" ); then \
				$(MKINSTALLDIRS) $(initroot)/etc/init.d; \
				$(INSTALL) -m 755 debian/init.d/sqlrelay $(initroot)/etc/init.d; \
				$(INSTALL) -m 644 debian/sqlrelay $(initroot)/etc/sqlrelay.start; \
			fi; \
		fi; \
	fi
endif
ifeq ($(UNAME),NetBSD)
	$(MKINSTALLDIRS) $(initroot)/etc/rc.d
	$(INSTALL) -m 755 netbsd/rc.d/sqlrelay $(initroot)/etc/rc.d
	$(INSTALL) -m 644 netbsd/sqlrelay $(initroot)/etc
endif
ifeq ($(UNAME),FreeBSD)
	$(MKINSTALLDIRS) $(initroot)/usr/local/etc/rc.d
	$(INSTALL) -m 755 freebsd/rc.d/sqlrelay $(initroot)/usr/local/etc/rc.d
	$(INSTALL) -m 644 freebsd/sqlrelay $(initroot)/etc
endif
ifeq ($(UNAME),SCO_SV)
	$(MKINSTALLDIRS) $(initroot)/etc/init.d
	$(INSTALL) -m 755 openserver/init.d/sqlrelay $(initroot)/etc/init.d
	$(INSTALL) -m 644 openserver/sqlrelay $(initroot)/etc
endif
ifeq ($(initroot),)
	if ( test -x "/sbin/chkconfig" ); then \
		/sbin/chkconfig --add sqlrelay; \
	fi
endif

uninstall:
	if ( test -x "/sbin/chkconfig" -a -n "`/sbin/chkconfig --list sqlrelay 2> /dev/null`"); then \
		/sbin/chkconfig --del sqlrelay; \
	fi
	$(RM) $(initroot)/etc/rc.d/init.d/sqlrelay
	$(RM) $(initroot)/etc/rc.d/rc.sqlrelay
	$(RM) $(initroot)/etc/init.d/sqlrelay
	$(RM) $(initroot)/usr/local/etc/rc.d/sqlrelay
	$(RM) $(initroot)/etc/sysconfig/sqlrelay
	$(RM) $(initroot)/etc/sqlrelay