1#!/bin/sh 2#ident "@(#)mkdep-hpux.sh 1.1 02/10/10 " 3########################################################################### 4# Copyright 2002 by J. Schilling 5########################################################################### 6# 7# Create dependency list with the HP-UX bundled cc 8# 9########################################################################### 10# 11# This script will probably not work correctly with a list of C-files 12# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient. 13# 14# Due to a design bug in the compiler interface we cannot tell the compiler 15# to output the list on stdout, -Wp,-M- does not work. As the default 16# output is on stderr and the output is even completely confused with 17# error messages and warnings, we cannot just grep away the warnings 18# like we do on SCO unix. 19# 20########################################################################### 21# This program is free software; you can redistribute it and/or modify 22# it under the terms of the GNU General Public License as published by 23# the Free Software Foundation; either version 2, or (at your option) 24# any later version. 25# 26# This program is distributed in the hope that it will be useful, 27# but WITHOUT ANY WARRANTY; without even the implied warranty of 28# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29# GNU General Public License for more details. 30# 31# You should have received a copy of the GNU General Public License 32# along with this program; see the file COPYING. If not, write to 33# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 34########################################################################### 35 36trap 'rm -fr /tmp/cpp-m.$$ ; exit 1' 1 2 15 37 38cc -Wp,-M/tmp/cpp-m.$$ -E > /dev/null "$@" 39 40cat /tmp/cpp-m.$$ 41 42rm -f /tmp/cpp-m.$$ 43