File: Makefile.in

package info (click to toggle)
ifhp 3.5.20-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,424 kB
  • sloc: ansic: 15,055; sh: 12,037; perl: 1,461; makefile: 643; sed: 16
file content (221 lines) | stat: -rw-r--r-- 6,501 bytes parent folder | download | duplicates (9)
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
###################################################################
# ifhp Software
# copyright 1988-2003 Patrick Powell
#    papowell@astart.com
# See LICENSE for conditions of use.
###########################################################################
# $Id: Makefile.in,v 1.116 2004/10/05 15:50:10 papowell Exp papowell $
###########################################################################

PACKAGE=@PACKAGE@
VERSION=3.5.20
SRC=@srcdir@
@SET_MAKE@
prefix=@prefix@
exec_prefix=@exec_prefix@
sysconfdir=@sysconfdir@
mandir=@mandir@
libexecdir=@libexecdir@
INSTALLCMD=@INSTALL@
FILTER_DIR=@FILTER_DIR@
IFHP_CONF=@IFHP_CONF@
LOCALEDIR=@LOCALEDIR@
USE_NLS=@USE_NLS@
SHELL=@SHELL@
CAT=@CAT@
top_builddir=.


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

DIRS= src po man
ALLDIRS= $(DIRS) fonts DOCS
TARGET= ./ifhp.conf

# define default target
MAKETARGET=all

FILES= ./ifhp.conf
all: ${FILES} ${DIRS}

.PHONY: \
	all install ci cifiles clean realclean distclean \
	configure dist tar update send supported FRC ${ALLDIRS}

# we use this to do recursion to specified directories
$(ALLDIRS):
	if [ "$@" = po ] ; then \
	    for i in po/Makefile* ; do \
		if [ -f "$$i" ] ; then \
		    if grep '^mkinstalldirs.*=.*case' $$i ; then \
			echo "fixing broken $$i which causes wrong path to mkinstalldirs to be used"; \
			perl -spi -e 's:^mkinstalldirs\s*=\s*.*:mkinstalldirs = \$$(SHELL) \$$(MKINSTALLDIRS):' $$i; \
		    fi \
		fi \
	    done \
	fi
	if [ "$@" != po -o "$(USE_NLS)" != "no" ] ; then \
		cd $@; $(MAKE) localedir=${LOCALEDIR} \
		DESTDIR=$(DESTDIR) $(MAKETARGET) ; \
	fi

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

install: all
	$(MAKE) MAKETARGET=$@ $(DIRS) DESTDIR=${DESTDIR}
	if [ -n "${VERBOSE_INSTALL}" ] ; then set -x; fi; if [ "${POSTINSTALL}" != "NO" ] ; then \
		if [ -f ${DESTDIR}${IFHP_CONF} ] ; then \
			date=`date | awk '{ print $$6 "_" $$2 "_" $$3 "_" $$4;}'`; \
			mv ${DESTDIR}${IFHP_CONF} ${DESTDIR}${IFHP_CONF}.$$date; \
		fi; \
		d=`dirname ${DESTDIR}${IFHP_CONF}`; \
		if [ ! -d $$d ] ; then ${SHELL} ${SRC}/mkinstalldirs $$d; fi; \
		${INSTALLCMD} -m 644 ./ifhp.conf ${DESTDIR}${IFHP_CONF}.sample; \
		${INSTALLCMD} -m 644 ./ifhp.conf ${DESTDIR}${IFHP_CONF}; \
	fi;
	if [ -n "${VERBOSE_INSTALL}" ] ; then set -x; fi; if [ "${POSTINSTALL}" != "NO" ] ; then \
		if [ ! -d ${DESTDIR}${FILTER_DIR}/UTILS ] ; then ${SHELL} ${SRC}/mkinstalldirs ${DESTDIR}${FILTER_DIR}/UTILS; fi; \
		for f in ${SRC}/UTILS UTILS ; do ( cd UTILS; \
			for i in * ; do \
			if [ -f $$i ] ; then ${INSTALLCMD} -m 644 $$i ${DESTDIR}${FILTER_DIR}/UTILS/$$i; fi; \
		 done; ); done; \
	fi;

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

./ifhp.conf: ${SRC}/ifhp.conf.in Makefile
	rm -f $@
	sed \
		-e "s,.CAT@,$(CAT),g" \
		-e "s,.FILTER_DIR@,$(FILTER_DIR),g" \
		-e "s,.A2PS@,@A2PS@,g" \
		-e "s,.GS@,@GS@,g" \
		-e "s,.GZIP@,@GZIP@,g" \
		-e "s,.FILEUTIL@,@FILEUTIL@,g" \
		-e "s,.PAGE_SIZE@,@PAGE_SIZE@,g" \
		-e "s,.FONT_DIR@,@FONT_DIR@,g" \
		-e "s,.DEVFD3@,@DEVFD3@,g" \
		-e "s,.FOOMATIC@,@FOOMATIC@,g" \
		-e "s,.FOOMATIC_RIP@,@FOOMATIC_RIP@,g" \
			${SRC}/ifhp.conf.in >$@

ci: cifiles
	for i in $(ALLDIRS); do \
	    case $$i in \
	    po ) ;; \
	    * ) $(MAKE) MAKETARGET=$@ $$i ;; \
	    esac; \
	done;
	chmod 755 `find . -name install-sh -print`
	chmod 755 `find . -name mkinstalldirs -print`

#CI=
#CO=-kv
CO=-l

# rcs -l $$1; 
cifiles:
	for i in . $(ALLDIRS); do \
	    if test ! -d $$i/RCS ; then \
	        mkdir $$i/RCS; \
	    fi; \
	done;
	checkin() { \
		ci $(CI) -mUpdate -t-Initial $$1; \
		yes |co $(CO) $$1; \
	}; \
	for i in * po/* UTILS/* ; do \
		if test -f "$$i" ; then \
			case "$$i" in  \
			*.mo ) ;; \
			*.in ) checkin $$i;; \
			config.* ) ;; \
			configure ) ;; \
			* ) checkin $$i ;; \
			esac; \
		fi; \
	done;

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

clean:
	$(MAKE) MAKETARGET=$@ $(DIRS)
	-rm -f *.o *.a ? ?.* *core $(TARGET) po/POTFILES
	-rm -f header *.bak $(SCRIPTS) po/*~

realclean: clean
	$(MAKE) MAKETARGET=$@ $(ALLDIRS)

distclean: clean
	rm -rf DISTRIBUTIONS/FreeBSD*/work DISTRIBUTIONS/FreeBSD*/*.tgz ;
	$(MAKE) MAKETARGET=$@ DESTDIR=$(DESTDIR) $(ALLDIRS)
	-rm -f config.cache config.h config.log config.status
	-rm -f Makefile */Makefile */*core* ltmain
	-rm -f UTILS/*.sh
	rm -f `find . -type f -name '*.old' -print` \
	 `find . -type f -name '*.bak' -print` \
	 `find . -type f -name '*.orig' -print` \
	  Makefile */Makefile po/POTFILES
	rm -f `find . -type f -name '*.in' -print | sed -e 's/\.in$$//' -e /configure/d `

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

configure: configure.in
	autoconf
	autoheader

dist: update ci tar send
redist: ci tar send

send:
	if [ -f ../SENDTO ] ; then cd ..; sh SENDTO; fi

tar: distclean
	DIR=`pwd | sed 's,.*/,,'`; \
	cd ..; \
		tar --exclude '*RCS' -zcf $${DIR}.tgz $${DIR}; \
		md5 $${DIR}.tgz |pgp -fast > $${DIR}.tgz.md5
	@echo "";

update:
	for i in VERSION ./src/patchlevel.h configure.in ; do \
		rcs -l $$i; chmod +w $$i; \
	done;
	DIR=`pwd | sed 's,.*/,,'`; \
	DIRVER=` echo $${DIR} | sed 's,.*-,,'`; \
	echo DIR $${DIR}, DIRVER $${DIRVER}; \
	echo "#define PATCHLEVEL \"$${DIR}\"" >./src/patchlevel.h; \
	echo $${DIR} >VERSION; \
	S=`echo *.sh | sed -e 's/\.sh//g'`; \
	perl -spi -e "s,=.*,=$${DIRVER}, if(/^VERSION=/ or /^#.* VERSION=/); \
		s,^IFHP_VER=.*,IFHP_VER=$${DIRVER},; \
		s,^DISTNAME=.*,DISTNAME=	$${DIR},; \
		s,^PORTNAME=.*,PORTNAME=	$(PACKAGE),; \
		s,^PORTVERSION=.*,PORTVERSION=	$${DIRVER},; \
		s,^Version: .*,Version: $${DIRVER},; \
		s,^Release: .*,Release: 1,; \
		s,package name \".*\",package name \"$${DIR}\",; \
		s,^SCRIPTS=.*,SCRIPTS=$$S,;" \
		Makefile.in configure.in src/Makefile.in ifhp.conf.in \
		DISTRIBUTIONS/*/Makefile \
		DISTRIBUTIONS/*/*.spec \
		po/Makefile.in.in; \
	perl -spi -e 's,.*,"Project-Id-Version: $(PACKAGE) '$${DIRVER}'\\n", if(/^"Project-Id/);' \
		po/*.po
	sh CREATE_CONFIGURE
	sh STANDARD_configuration
	ci -l -mUpdate -t-Initial Makefile
	for i in DOCS man ; do \
		(cd $$i ; $(MAKE) $@; $(MAKE) ); \
	done;
	-for i in po ; do \
		(cd $$i ; $(MAKE) update-po ); \
	done
	$(MAKE) supported

supported:
	perl -i.bak UTILS/supported ifhp.conf.in