File: Makefile.bsd

package info (click to toggle)
cti-ifhp 2.1.8-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 932 kB
  • ctags: 845
  • sloc: ansic: 6,036; sh: 1,524; makefile: 318
file content (136 lines) | stat: -rw-r--r-- 3,750 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
# Generated automatically from Makefile.bsd.in by configure.
###########################################################################
# LPRng - An Extended Print Spooler System
#
# Copyright 1988-1995 Patrick Powell, San Diego State University
#     papowell@sdsu.edu
# See LICENSE for conditions of use.
#
###########################################################################
# MODULE: Makefile.in
# PURPOSE: top level Makefile for LPD Software
# $Id: Makefile.bsd,v 1.1 1997/02/05 22:35:21 papowell Exp $
########################################################################## 

SRC=.


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

DIRS= ${SRC}/src ${SRC}/man
ALLDIRS= ${SRC}/src ${SRC}/man ${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
	(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)

cifiles: newmake
	if test ! -d RCS ; then mkdir RCS; fi;
	checkin() { \
		ci $(CI) -l -mUpdate -t-Initial $$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.bsd.in */Makefile.bsd.in ; do \
		d=`dirname $$i`; b=`basename $$i .bsd.in`; c=$${d}/$${b}.in; \
		sed -e '/^#GNU/,/^#/d' -e 's/^#BSD.//' -e 's/$$>/$$>/' \
		 -e	's/^if /.if /' -e 's/^endif/.endif/' $$c >/tmp/Makefile.bsd.in; \
		diff $$i /tmp/Makefile.bsd.in >/dev/null || cp /tmp/Makefile.bsd.in $$i;\
	done


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

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

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

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

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@sdsu.edu \
		   -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 '*.a' >>/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 > $$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
	ci $(CI) -l -mUpdate -t-Initial `cat /tmp/list`; \

update:
	pwd | sed -n -e 's,.*/,,' -e 's,.*,#define VERSION "&",p' > src/version.h
	pwd | sed -n -e 's,.*/,,' -e 's,.*,VERSION &,p' > VERSION