1 # This makefile fragment is used to manage downloading, verifying, and when required
2 # building the required files for a cygwin build environment
4 # Normally called from build_pcb but can be run manually with:
7 # gmake -f pcb-win32-deps.mk DEPMK=setup/glib.mk <target>
12 ALL_DISTURLS
= ${SRC_DISTURLS} ${DEV_DISTURLS} ${RUN_DISTURLS}
13 DISTINFO
= ${CURDIR}/setup
/${NAME}.distinfo
14 PROMPT
= "PCB Dependencies Setup --\> "
18 @
test -d
${DISTDIR} || mkdir
-p
${DISTDIR}
19 @
test -d
${STAMPDIR} || mkdir
-p
${STAMPDIR}
20 @
test -d
${RUNTIMEDIR} || mkdir
-p
${RUNTIMEDIR}
21 @
test -d
${DEVTIMEDIR} || mkdir
-p
${DEVTIMEDIR}
22 @
test -d
${LIBSRCDIR} || mkdir
-p
${LIBSRCDIR}
26 @
${ECHO} "${PROMPT}Checking downloads for ${NAME}"
27 @for disturl in
${ALL_DISTURLS} ; do \
28 distfile
=`${ECHO} $$disturl | ${SED} 's;.*/;;g'` ; \
29 if
test ! -f
${DISTDIR}/$$distfile ; then \
30 ${ECHO} "${PROMPT}Attempting to download $$disturl" ; \
31 (cd
${DISTDIR} && ${WGET} $$disturl) || exit
$$?
; \
34 @
${ECHO} "${PROMPT}Downloads complete for ${NAME}"
38 @
${ECHO} "${PROMPT}Comparing checksums for ${NAME}"
39 @for disturl in
${ALL_DISTURLS} ; do \
40 distfile
=`echo $$disturl | ${SED} 's;.*/;;g'` ; \
41 if
test ! -f
${DISTDIR}/$$distfile ; then \
42 ${ECHO} "Missing distfile: ${DISTDIR}/$$distfile" ; \
45 hash
=`grep "\($$distfile\)" ${DISTINFO} | ${AWK} 'NF>1 { print $$NF }'` ; \
46 dlhash
=`${OPENSSL} ${HASHTYPE} ${DISTDIR}/$$distfile | ${AWK} 'NF>1 {print $$NF}'` ; \
47 if
test "$$hash" != "$$dlhash" ; then \
48 ${ECHO} "Checksum failure for $$distfile" ; \
49 ${ECHO} " computed: $$dlhash" ; \
50 ${ECHO} " expected: $$hash" ; \
54 @
${ECHO} "${PROMPT}All checksums match for ${NAME}"
58 @
${ECHO} "${PROMPT}Recreating checksums for ${NAME}"
59 @
${ECHO} "" > ${DISTINFO}.tmp
60 @for disturl in
${ALL_DISTURLS} ; do \
61 distfile
=`echo $$disturl | ${SED} 's;.*/;;g'` ; \
62 if
test ! -f
${DISTDIR}/$$distfile ; then \
63 ${ECHO} "Missing distfile: ${DISTDIR}/$$distfile" ; \
66 ${ECHO} "Calculating hash for $${distfile}..." ; \
67 (cd
${DISTDIR} && ${OPENSSL} ${HASHTYPE} $$distfile >> ${DISTINFO}.tmp
) ; \
69 @mv
-f
${DISTINFO}.tmp
${DISTINFO}
70 @
${ECHO} "${PROMPT}Recreated ${DISTINFO} for ${NAME}"
74 @
${ECHO} "${PROMPT}Extracting runtime package for ${NAME}"
75 @for disturl in
${RUN_DISTURLS} ; do \
76 distfile
=`echo $$disturl | ${SED} 's;.*/;;g'` ; \
77 if
test ! -f
${DISTDIR}/$$distfile ; then \
78 ${ECHO} "Missing distfile: ${DISTDIR}/$$distfile" ; \
81 (cd
${RUNTIMEDIR} && ${TOOLSDIR}/extract.sh
${DISTDIR}/$$distfile) ; \
83 @
${ECHO} "${PROMPT}Extracting development package for ${NAME}"
84 @for disturl in
${DEV_DISTURLS} ; do \
85 distfile
=`echo $$disturl | ${SED} 's;.*/;;g'` ; \
86 if
test ! -f
${DISTDIR}/$$distfile ; then \
87 ${ECHO} "Missing distfile: ${DISTDIR}/$$distfile" ; \
90 (cd
${DEVTIMEDIR} && ${TOOLSDIR}/extract.sh
${DISTDIR}/$$distfile) ; \
92 @
${ECHO} "${PROMPT}Extracting src package for ${NAME}"
93 @for disturl in
${SRC_DISTURLS} ; do \
94 distfile
=`echo $$disturl | ${SED} 's;.*/;;g'` ; \
95 if
test ! -f
${DISTDIR}/$$distfile ; then \
96 ${ECHO} "Missing distfile: ${DISTDIR}/$$distfile" ; \
99 (cd
${LIBSRCDIR} && ${TOOLSDIR}/extract.sh
${DISTDIR}/$$distfile) ; \
101 @
${ECHO} "${PROMPT}Done extracting for ${NAME}"
106 @
${ECHO} "${LICENSE} ${NAME}-${VER}"
108 .PHONY
: config-variables
110 @
${ECHO} "gtk_win32_runtime=${RUNTIMEDIR}"
111 @
${ECHO} "gtk_win32_devel=${DEVTIMEDIR}"
115 echo
"not implemented"
119 echo
"not implemented"
123 echo
"not implemented"
127 echo
"not implemented"