File: Makefile.in

package info (click to toggle)
cti-ifhp 2.2.8-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 904 kB
  • ctags: 673
  • sloc: ansic: 4,916; sh: 1,539; makefile: 287; perl: 99
file content (157 lines) | stat: -rw-r--r-- 4,032 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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
###########################################################################
# LPRng - An Extended Print Spooler System
#
# Copyright 1988-1995 Patrick Powell, San Diego State University
#     papowell@astart.com
# See LICENSE for conditions of use.
#
###########################################################################
# MODULE: Makefile.in
# PURPOSE: top level Makefile for LPD Software
# Makefile.in,v 3.4 1998/03/29 23:16:57 papowell Exp
########################################################################## 

SRC=@srcdir@
@SET_MAKE@

#=============================================================================
# List the directories you want to generate:
# DIRS for all, clean, etc.
# ALLDIRS for other such as documentation
#=============================================================================

DIRS= src man
ALLDIRS= $(DIRS) ${SRC}/fonts
TARGET=monitor ifhp

# define default target
MAKETARGET=all

all: $(DIRS)

.PHONY: all clean FRC install tar ci cifiles DIRS ALLDIRS warn
#force phony target to be made

$(ALLDIRS): FRC
#GNU
	$(MAKE) -C $@ $(MAKETARGET) 
#
#BSD 	(cd $@; $(MAKE) -f Makefile.bsd $(MAKEFLAGS) $(MAKETARGET))

FRC:
###############################################################################

install: 
	$(MAKE) MAKETARGET=$@ $(DIRS)

###############################################################################

ci: cifiles
	if test ! -d RCS ; then mkdir RCS; fi;
	$(MAKE) MAKETARGET=$@ $(ALLDIRS)

CI=
CO=-kv

cifiles: newmake
	if test ! -d RCS ; then mkdir RCS; fi;
	checkin() { \
		rcs -l $$1 ; \
		ci $(CI) -mUpdate -t-Initial $$1; \
		co $(CO) $$1; \
	}; \
	for i in *; do \
		if test -f "$$i" ; then \
			case "$$i" in  \
			config.h.in ) checkin $$i;; \
			config.* ) ;; \
			* ) checkin $$i ;; \
			esac; \
		fi; \
	done;

newmake:
	for i in Makefile.in */Makefile.in ; do \
		d=`dirname $$i`; b=`basename $$i .in`; c=$${d}/$${b}.bsd.in; \
		echo $$i $$c; \
		sed -e '/^#GNU/,/^#/d' -e 's/^#BSD.//' -e 's/$$^/$$>/' \
		 -e	's/^if /.if /' -e 's/^endif/.endif/' $$i >/tmp/Makefile.bsd.in; \
		rm -f $$c ; cp /tmp/Makefile.bsd.in $$c;\
	done;

###############################################################################

clean:
	-rm -f *.o *.core core $(TARGET)
	$(MAKE) MAKETARGET=$@ $(DIRS)

realclean distclean: clean
	$(MAKE) MAKETARGET=distclean $(ALLDIRS)
	-rm -f Makefile Makefile.bsd \
		config.cache config.h config.log config.status

###############################################################################

shar:
	DIR=`pwd | sed 's,.*/,,' `; \
	if [ ! -f /tmp/$${DIR}.tgz ]; then \
		echo You must make TAR file first; \
		exit 1; \
	fi; \
	cd ..; tar ztf /tmp/$${DIR}.tgz | sed -e '/\/$$/d' |  \
		shar -S -n $${DIR} -a -s papowell@astart.com \
		   -c -o /tmp/$${DIR}-Part -L100

dist:
	echo RCS >/tmp/L_X
	echo Makefile >>/tmp/L_X
	echo core >>/tmp/L_X
	echo '?' >>/tmp/L_X
	echo '*.o' >>/tmp/L_X
	echo '*,v' >>/tmp/L_X
	echo '*.a' >>/tmp/L_X
	echo '*.orig' >>/tmp/L_X
	echo '*.rej' >>/tmp/L_X
	echo '*.sh' >>/tmp/L_X
	for i in $(TARGET) Makefile config.cache config.h config.log config.status; \
		 do echo \*/$$i >>/tmp/L_X; done
	cat /tmp/L_X
	DIR=`pwd | sed 's,.*/,,' `; \
	cd ..; \
		tar zXcfv /tmp/L_X $${DIR}.tgz $${DIR}; \
		md5 $${DIR}.tgz |pgp -fast > $$DIR.tgz.md5

cifast:
	find . -type f -newer VERSION -print \
		| sed \
			-e '/core$$/d' \
			-e '/RCS/d' \
			-e '/\.o$$/d'  \
			-e '/.*liblpr.a$$/d' \
			-e '/.*checkpc$$/d' \
			-e '/.*lpr$$/d' \
			-e '/.*lpd$$/d' \
			-e '/.*lpq$$/d' \
			-e '/.*lprm$$/d' \
			-e '/.*lpc$$/d' \
			-e '/.*lpbanner$$/d' \
			-e '/.*lpf$$/d' \
			-e '/.*lpraccnt$$/d' \
		 >/tmp/list
	echo README >>/tmp/list
	cat /tmp/list
	checkin() { \
		rcs -l $$1 ; \
		ci $(CI) -mUpdate -t-Initial $$1; \
		co $(CO) $$1; \
	}; \
	for i in ` cat /tmp/list `; do \
		checkin $$i; \
	done;

update:
	for i in src/version.h VERSION; do \
		rcs -l $$i; chmod +w $$i; \
	done;
	pwd | sed -n -e 's,.*/,,' -e 's,.*,#define VERSION "&",p' > src/version.h
	pwd | sed -n -e 's,.*/,,' -e 's,.*,VERSION &,p' > VERSION