1#!/bin/sh 2# 3# Script to configure and make CUPS with the standard build options. When no 4# targets are specified, the "clean" and "check" targets are used. 5# 6# Usage: 7# 8# scripts/makecups [configure option(s)] [make target(s)] 9# 10 11# Scan the command-line arguments... 12confopts="--enable-debug --enable-debug-guards --enable-debug-printfs --enable-sanitizer --enable-unit-tests" 13makeopts="" 14 15while test $# -gt 0; do 16 opt="$1" 17 shift 18 19 case "$opt" in 20 -*) 21 confopts="$confopts $opt" 22 ;; 23 *) 24 makeopts="$makeopts $opt" 25 ;; 26 esac 27done 28 29if test "x$makeopts" = x; then 30 makeopts="clean check" 31fi 32 33case "`uname`" in 34 Darwin) 35 makeopts="-j`sysctl -n hw.activecpu` $makeopts" 36 ;; 37 Linux*) 38 ASAN_OPTIONS="leak_check_at_exit=false"; export ASAN_OPTIONS 39 ;; 40esac 41 42# Run the configure script... 43echo ./configure $confopts 44./configure $confopts || exit 1 45 46# Build the software... 47echo make $makeopts 48make $makeopts 49