"Fossies" - the Fresh Open Source Software Archive 
Member "htmlrecode-1.3.1/depfun.mak" (21 Jul 2009, 7597 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.6.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 git_release: ${ARCHFILES} ;
59 # Create the release commit
60 git commit --allow-empty -a -m 'Release version ${VERSION} (dev)' # commit in dev brach
61 git rev-parse HEAD > .git/PUSHED_HEAD
62 git checkout release || git checkout -b release
63 #
64 # Set the cache & index to exact copy of the original branch
65 #
66 git rm -fr --cached '*' &> /dev/null
67 git checkout PUSHED_HEAD .
68 #
69 # Limit the index to those files we publish
70 #
71 git rm -fr --cached '*' &> /dev/null
72 git add -f --ignore-errors ${ARCHFILES} ${EXTRA_ARCHFILES} depfun.mak Makefile
73 @if [ -f docmaker.php ]; then php -q docmaker.php ${ARCHNAME} > README.html; git add docmaker.php README.html; fi
74 @if [ -f makediff.php ]; then git add makediff.php; fi
75 #
76 # Create a merge commit
77 #
78 cp .git/PUSHED_HEAD .git/MERGE_HEAD
79 git commit -m 'Release version ${VERSION}' # commit in release
80 #
81 # Create the archive
82 #
83 @- mkdir ${ARCHDIR} 2>/dev/null
84 git archive --format=tar --prefix=${ARCHNAME}/ HEAD > ${ARCHDIR}${ARCHNAME}.tar
85 # Return to the original branch
86 git checkout -f $$(cd .git/refs/heads;grep -l `cat ../../PUSHED_HEAD` * || echo PUSHED_HEAD)
87 git update-server-info
88 @make arch_finish_pak
89 @make omabin_link${DEPFUN_OMABIN}
90
91 git_test_release: ${ARCHFILES}
92 # Create the testing commit
93 git commit --allow-empty -a -m 'Test release ${VERSION} (dev)' # commit in dev branch
94 git rev-parse HEAD > .git/PUSHED_HEAD
95 git checkout release || git checkout -b release
96 #
97 # Backup the HEAD in release branch
98 #
99 git rev-parse release > .git/RELEASE_HEAD
100 #
101 # Set the cache & index to exact copy of the original branch
102 #
103 git rm -fr --cached '*' &> /dev/null
104 git checkout PUSHED_HEAD .
105 #
106 # Limit the index to those files we publish
107 #
108 git rm -fr --cached '*' &> /dev/null
109 git add -f --ignore-errors ${ARCHFILES} ${EXTRA_ARCHFILES} depfun.mak Makefile
110 @if [ -f docmaker.php ]; then php -q docmaker.php ${ARCHNAME} > README.html; git add docmaker.php README.html; fi
111 @if [ -f makediff.php ]; then git add makediff.php; fi
112 #
113 # Create a merge commit
114 #
115 cp .git/PUSHED_HEAD .git/MERGE_HEAD
116 git commit -m 'Test release' # commit in release
117 #
118 # Create the testing directory
119 #
120 rm -rf test_release
121 git archive --format=tar --prefix=test_release/ HEAD | tar xvf - | sed 's/^/ /'
122 #
123 # Reset the release branch to its previous state
124 #
125 git reset --hard RELEASE_HEAD
126 # Return to the original branch
127 git checkout -f $$(cd .git/refs/heads;grep -l `cat ../../PUSHED_HEAD` * || echo PUSHED_HEAD)
128 git update-server-info
129 git gc --quiet
130 @echo
131 @echo ----------------------------------------------------------------------
132 @echo 'Would-be release extracted to test_release/ -- go ahead and try it.'
133 @echo ----------------------------------------------------------------------
134 @echo
135
136 UNUSED_archpak: ${ARCHFILES} ;
137 @if [ "${ARCHNAME}" = "" ]; then echo ARCHNAME not set\!;false;fi
138 - mkdir ${ARCHNAME} ${ARCHDIR} 2>/dev/null
139 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
140 - if [ -f docmaker.php ]; then php -q docmaker.php ${ARCHNAME} >README.html; ln -f docmaker.php README.html ${ARCHNAME}/;fi
141 if [ -f makediff.php ]; then ln -f makediff.php ${ARCHNAME}/; fi
142 #- rm -f ${ARCHDIR}${ARCHNAME}.zip
143 #- zip -9rq ${ARCHDIR}${ARCHNAME}.zip ${ARCHNAME}/
144 #- rar a ${ARCHDIR}${ARCHNAME}.rar -mm -m5 -r -s -inul ${ARCHNAME}/
145 #tar cf ${ARCHDIR}${ARCHNAME}.tar ${ARCHNAME}/
146 #
147 find ${ARCHNAME}/ -type d > .paktmp.txt
148 find ${ARCHNAME}/ -not -type d | rev | sort | rev >> .paktmp.txt
149 #find ${ARCHNAME}/|/ftp/backup/bsort >.paktmp.txt
150 tar -c --no-recursion -f ${ARCHDIR}${ARCHNAME}.tar -T.paktmp.txt
151 rm -rf .paktmp.txt ${ARCHNAME}
152 @make arch_finish_pak
153
154 arch_finish_pak:
155 - if [ "${NOBZIP2ARCHIVES}" = "" ]; then bzip2 -9 >${ARCHDIR}${ARCHNAME}.tar.bz2 < ${ARCHDIR}${ARCHNAME}.tar; fi
156 if [ "${NOGZIPARCHIVES}" = "" ]; then gzip -f9 ${ARCHDIR}${ARCHNAME}.tar; fi
157 rm -f ${ARCHDIR}${ARCHNAME}.tar
158
159 # Makes the packages of various types...
160 UNUSED_pak: archpak ;
161 if [ -f makediff.php ]; then php -q makediff.php ${ARCHNAME} ${ARCHDIR} 1; fi
162
163 omabin_link${DEPFUN_OMABIN}:
164 - @rm -f /WWW/src/arch/${ARCHNAME}.tar.{bz2,gz}
165 - ln -f ${ARCHDIR}${ARCHNAME}.tar.{bz2,gz} /WWW/src/arch/
166 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
167
168 # This is Bisqwit's method to install the packages to web-server...
169 UNUSED_omabin${DEPFUN_OMABIN}: archpak
170 if [ -f makediff.php ]; then php -q makediff.php ${ARCHNAME} ${ARCHDIR}; fi
171 #- @rm -f /WWW/src/arch/${ARCHNAME}.{zip,rar,tar.{bz2,gz}}
172 #- ln -f ${ARCHDIR}${ARCHNAME}.{zip,rar,tar.{bz2,gz}} /WWW/src/arch/
173 @make omabin_link${DEPFUN_OMABIN}
174
175 install${DEPFUN_INSTALL}: ${INSTALLPROGS}
176 - if [ ! "${BINDIR}" = "" ]; then mkdir --parents $(BINDIR) 2>/dev/null; mkdir $(BINDIR) 2>/dev/null; \
177 for s in ${INSTALLPROGS} ""; do if [ ! "$$s" = "" ]; then \
178 ${INSTALL} -c -s -o bin -g bin -m 755 "$$s" ${BINDIR}/"$$s";fi;\
179 done; \
180 fi; \
181 if [ ! "${MANDIR}" = "" ]; then mkdir --parents $(MANDIR) 2>/dev/null; mkdir $(MANDIR) 2>/dev/null; \
182 for s in ${INSTALLMANS} ""; do if [ ! "$$s" = "" ]; then \
183 ${INSTALL} -m 644 "$$s" ${MANDIR}/man"`echo "$$s"|sed 's/.*\.//'`"/"$$s";fi;\
184 done; \
185 fi
186
187 uninstall${DEPFUN_INSTALL} deinstall${DEPFUN_INSTALL}:
188 for s in ${INSTALLPROGS}; do rm -f ${BINDIR}/"$$s";done
189 - for s in ${INSTALLLIBS}; do rm -f ${LIBDIR}/"$$s";done
190 for s in ${INSTALLMANS} ""; do if [ ! "$$s" = "" ]; then \
191 rm -f ${MANDIR}/man"`echo "$$s"|sed 's/.*\.//'`"/"$$s";fi;\
192 done; \
193
194 .PHONY: pak dep depend archpak omabin \
195 install${DEPFUN_INSTALL} \
196 deinstall${DEPFUN_INSTALL} \
197 uninstall${DEPFUN_INSTALL}