On Having Built Linux for a Small System


Explanation: Config/make/v3.81.mak

${EXTTEMP}/make-${VERSION}-htc/.configured:
	${MAKE} extract LIST="$(strip ${SOURCES})"
	mv ${EXTTEMP}/make-${VERSION} ${EXTTEMP}/make-${VERSION}-htc
	(	cd ${EXTTEMP}/make-${VERSION}-htc || exit 1 ;\
	  	CC=${NATIVE_GCC} \
	    	  CFLAGS=-O2 \
			./configure \
			  --prefix=${HTC_ROOT}/usr \
			  --disable-largefile --disable-nls \
			  || exit 1 ;\
		touch ${EXTTEMP}/make-${VERSION}-htc/.configured \
	)	|| exit 1
	touch ${EXTTEMP}/make-${VERSION}-htc/.configured

${EXTTEMP}/make-${VERSION}-htc/.built: ${EXTTEMP}/make-${VERSION}-htc/.configured
	(	cd ${EXTTEMP}/make-${VERSION}-htc || exit 1 ;\
		make || exit 1 \
	) || exit 1
	touch ${EXTTEMP}/make-${VERSION}-htc/.built

.PHONY: install-htc
install-htc: ${EXTTEMP}/make-${VERSION}-htc/.built
	(	cd ${EXTTEMP}/make-${VERSION}-htc || exit 1 ;\
		make install || exit 1 ;\
		cd ${HTC_ROOT}/usr/bin && ln -sf make gmake \
	) || exit 1