"Fossies" - the Fresh Open Source Software Archive 
Member "htmlrecode-1.3.1/argh/depfun.mak" (21 Jul 2009, 4675 Bytes) of package /linux/www/old/htmlrecode-1.3.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Make source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 # This is Bisqwit's generic depfun.mak, included from Makefile.
2 # The same file is used in many different projects.
3 #
4 # depfun.mak version 1.5.1
5 #
6 # Required vars:
7 #
8 # ${CPP} - C preprocessor name, usually "gcc"
9 # ${CPPFLAGS} - preprocessor flags (including defs)
10 #
11 # ${ARCHFILES} - All file names to include in archive
12 # .depend, depfun.mak and Makefile are
13 # automatically included.
14 # ${ARCHNAME} - Name of program. Example: testprog-0.0.1
15 #
16 # Optional vars:
17 #
18 # ${ARCHDIR} - Directory for the archives.
19 # Must end with '/'.
20 # ${INSTALLPROGS} - Programs to be installed (space delimited)
21 # ${BINDIR} - Directory for installed programs (without /)
22 # Example: /usr/local/bin
23 # ${INSTALL} - Installer program, example: install
24 # ${DEPDIRS} - Optional dependency dirs to account in .depend
25 #
26 # ${EXTRA_ARCHFILES} - More files to include in archive,
27 # but without dependency checking
28
29
30 # Note: This requires perl. FIXME change it to sed
31 .depend: ${ARCHFILES}
32 @echo "Checking dependencies..."
33 @rm -f $@.tmp
34 @for dir in "" ${DEPDIRS}; \
35 do n="`pwd`";\
36 if [ ! -z "$$dir" ]; then cd "$$dir"; fi; \
37 for s in *.c *.cc *.cpp; \
38 do if echo "$$s"|grep -vq '^\*';\
39 then \
40 cd "$$n";\
41 ${CPP} ${CPPFLAGS} -MM -MG "$$dir""$$s" |\
42 perl -pe "s|^([^ ])|$$dir\\1|" \
43 > $@."$$s";\
44 fi&done; \
45 cd "$$n"; \
46 done; wait
47 @touch $@.dummy
48 @cat $@.* >$@
49 @cp -f $@ $@.tmp
50 @sed 's/\.o:/.lo:/' <$@.tmp >>$@
51 @rm -f $@.*
52
53 depend dep: .depend
54
55
56 -include .depend
57
58
59 archpak: ${ARCHFILES}
60 @if [ "${ARCHNAME}" = "" ]; then echo ARCHNAME not set\!;false;fi
61 - mkdir ${ARCHNAME} ${ARCHDIR} 2>/dev/null
62 cp --parents -lfr ${ARCHFILES} ${EXTRA_ARCHFILES} depfun.mak Makefile ${ARCHNAME}/ 2>&1 >/dev/null | while read line;do cp --parents -fr "`echo "$$line"|sed 's/.*${ARCHNAME}\///;s/'\''.*//'`" ${ARCHNAME}/; done
63 - if [ -f docmaker.php ]; then php -q docmaker.php ${ARCHNAME} >README.html; ln -f docmaker.php README.html ${ARCHNAME}/;fi
64 if [ -f makediff.php ]; then ln -f makediff.php ${ARCHNAME}/; fi
65 #- rm -f ${ARCHDIR}${ARCHNAME}.zip
66 #- zip -9rq ${ARCHDIR}${ARCHNAME}.zip ${ARCHNAME}/
67 #- rar a ${ARCHDIR}${ARCHNAME}.rar -mm -m5 -r -s -inul ${ARCHNAME}/
68 #tar cf ${ARCHDIR}${ARCHNAME}.tar ${ARCHNAME}/
69 #
70 find ${ARCHNAME}/ -type d > .paktmp.txt
71 find ${ARCHNAME}/ -not -type d | rev | sort | rev >> .paktmp.txt
72 #find ${ARCHNAME}/|/ftp/backup/bsort >.paktmp.txt
73 tar -c --no-recursion -f ${ARCHDIR}${ARCHNAME}.tar -T.paktmp.txt
74 rm -f .paktmp.txt
75
76 rm -rf ${ARCHNAME}
77 - if [ "${NOBZIP2ARCHIVES}" = "" ]; then bzip2 -9 >${ARCHDIR}${ARCHNAME}.tar.bz2 < ${ARCHDIR}${ARCHNAME}.tar; fi
78 if [ "${NOGZIPARCHIVES}" = "" ]; then gzip -f9 ${ARCHDIR}${ARCHNAME}.tar; fi
79 rm -f ${ARCHDIR}${ARCHNAME}.tar
80
81 # Makes the packages of various types...
82 pak: archpak
83 if [ -f makediff.php ]; then php -q makediff.php ${ARCHNAME} ${ARCHDIR} 1; fi
84
85 # This is Bisqwit's method to install the packages to web-server...
86 omabin${DEPFUN_OMABIN}: archpak
87 if [ -f makediff.php ]; then php -q makediff.php ${ARCHNAME} ${ARCHDIR}; fi
88 #- @rm -f /WWW/src/arch/${ARCHNAME}.{zip,rar,tar.{bz2,gz}}
89 #- ln -f ${ARCHDIR}${ARCHNAME}.{zip,rar,tar.{bz2,gz}} /WWW/src/arch/
90 - @rm -f /WWW/src/arch/${ARCHNAME}.tar.{bz2,gz}
91 - ln -f ${ARCHDIR}${ARCHNAME}.tar.{bz2,gz} /WWW/src/arch/
92 if [ -f progdesc.php ]; then cp -p --remove-destination progdesc.php /WWW/src/.desc-$(subst /,,$(dir $(subst -,/,$(ARCHNAME)))).php 2>/dev/null || cp -fp progdesc.php /WWW/src/.desc-$(subst /,,$(dir $(subst -,/,$(ARCHNAME)))).php; fi
93
94 install${DEPFUN_INSTALL}: ${INSTALLPROGS}
95 - if [ ! "${BINDIR}" = "" ]; then mkdir --parents $(BINDIR) 2>/dev/null; mkdir $(BINDIR) 2>/dev/null; \
96 for s in ${INSTALLPROGS} ""; do if [ ! "$$s" = "" ]; then \
97 ${INSTALL} -c -s -o bin -g bin -m 755 "$$s" ${BINDIR}/"$$s";fi;\
98 done; \
99 fi; \
100 if [ ! "${MANDIR}" = "" ]; then mkdir --parents $(MANDIR) 2>/dev/null; mkdir $(MANDIR) 2>/dev/null; \
101 for s in ${INSTALLMANS} ""; do if [ ! "$$s" = "" ]; then \
102 ${INSTALL} -m 644 "$$s" ${MANDIR}/man"`echo "$$s"|sed 's/.*\.//'`"/"$$s";fi;\
103 done; \
104 fi
105
106 uninstall${DEPFUN_INSTALL} deinstall${DEPFUN_INSTALL}:
107 for s in ${INSTALLPROGS}; do rm -f ${BINDIR}/"$$s";done
108 - for s in ${INSTALLLIBS}; do rm -f ${LIBDIR}/"$$s";done
109 for s in ${INSTALLMANS} ""; do if [ ! "$$s" = "" ]; then \
110 rm -f ${MANDIR}/man"`echo "$$s"|sed 's/.*\.//'`"/"$$s";fi;\
111 done; \
112
113 .PHONY: pak dep depend archpak omabin \
114 install${DEPFUN_INSTALL} \
115 deinstall${DEPFUN_INSTALL} \
116 uninstall${DEPFUN_INSTALL}