Reworked cmpp compilation. More automake compliant.

This commit is contained in:
pnenzi 2004-02-14 19:52:58 +00:00
parent 9066452b23
commit 18403d2aa5
8 changed files with 256 additions and 1119 deletions

View File

@ -1,411 +0,0 @@
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = .
top_srcdir = ../../..
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/ng-spice-rework
pkglibdir = $(libdir)/ng-spice-rework
pkgincludedir = $(includedir)/ng-spice-rework
top_builddir = ../../..
ACLOCAL = aclocal-1.4
AUTOCONF = autoconf
AUTOMAKE = automake-1.4
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias =
host_triplet = i686-pc-linux-gnu
AR = ar
AS = @AS@
CC = gcc
CIDERDIR =
CIDERMATH =
CIDERMATHDIR =
CIDERSCRIPTS =
CIDERSIM =
CIDERTESTS =
CXX = g++
CXXCPP = g++ -E
DLLTOOL = @DLLTOOL@
ECHO = echo
EGREP = grep -E
EKVDIR =
EKVLIB =
EXEEXT =
F77 = g77
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
HAVE_LIB = @HAVE_LIB@
LIB = @LIB@
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIB = @LTLIB@
MAINT = #
MAKEINFO = makeinfo
NUMDEV =
NUMDEVDIR =
NUMPARAMDIR =
NUMPARAMLIB =
OBJDUMP = @OBJDUMP@
OBJEXT = o
PACKAGE = ng-spice-rework
RANLIB = ranlib
RC = @RC@
STRIP = strip
VERSION = 15
WINMAIN =
XGRAPHDIR =
XSPICEDIR =
XSPICELIB1 =
XSPICELIB2 =
YACC =
BUILT_SOURCES = ifs_lex.c ifs_yacc.c ifs_yacc.h mod_lex.c mod_yacc.c mod_yacc.h
EXTRA_DIST = ifs_lex.l ifs_yacc.h mod_yacc.h
AM_YFLAGS = -d
LEX = -t
bin_PROGRAMS = cmpp
cmpp_SOURCES = cmpp.h main.c pp_ifs.c pp_lst.c pp_mod.c read_ifs.c util.c writ_ifs.c ifs_yacc_y.h ifs_yacc.y ifs_lex.c mod_yacc_y.h mod_yacc.y mod_lex.c
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../../config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = cmpp$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I../../..
CPPFLAGS =
LDFLAGS =
LIBS = -lm -lncurses
X_CFLAGS = -I/usr/X11R6/include
X_LIBS = -L/usr/X11R6/lib -lX11 -lXt -lXext -lXmu -lXaw
X_EXTRA_LIBS =
X_PRE_LIBS = -lSM -lICE
cmpp_OBJECTS = main.$(OBJEXT) pp_ifs.$(OBJEXT) pp_lst.$(OBJEXT) \
pp_mod.$(OBJEXT) read_ifs.$(OBJEXT) util.$(OBJEXT) writ_ifs.$(OBJEXT) \
ifs_yacc.$(OBJEXT) ifs_lex.$(OBJEXT) mod_yacc.$(OBJEXT) \
mod_lex.$(OBJEXT)
cmpp_LDADD = $(LDADD)
cmpp_DEPENDENCIES =
cmpp_LDFLAGS =
YLWRAP = $(srcdir)/ylwrap
CFLAGS = -g -O2 -Wall
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in ifs_yacc.c mod_yacc.c ylwrap
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/ifs_lex.P .deps/ifs_yacc.P .deps/main.P \
.deps/mod_lex.P .deps/mod_yacc.P .deps/pp_ifs.P .deps/pp_lst.P \
.deps/pp_mod.P .deps/read_ifs.P .deps/util.P .deps/writ_ifs.P
SOURCES = $(cmpp_SOURCES)
OBJECTS = $(cmpp_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .obj .s .y
$(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/cmpp/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
cmpp$(EXEEXT): $(cmpp_OBJECTS) $(cmpp_DEPENDENCIES)
@rm -f cmpp$(EXEEXT)
$(LINK) $(cmpp_LDFLAGS) $(cmpp_OBJECTS) $(cmpp_LDADD) $(LIBS)
.y.c:
$(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
ifs_yacc.h: ifs_yacc.c
mod_yacc.h: mod_yacc.c
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src/xspice/cmpp
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/xspice/cmpp/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "ifs_yacchifs_yacccmod_yacchmod_yaccc$(BUILT_SOURCES)" || rm -f ifs_yacch ifs_yaccc mod_yacch mod_yaccc $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
clean-depend clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
distclean-tags distclean-depend distclean-generic \
clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
%.c : %.l
$(LEX) -P$(*:lex=)yy $< > $@
ifs_lex.c : ifs_lex.l
$(LEX) -i -P$(*:lex=)yy $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -2,7 +2,7 @@
BUILT_SOURCES = ifs_lex.c ifs_yacc.c ifs_yacc.h mod_lex.c mod_yacc.c mod_yacc.h
EXTRA_DIST= ifs_lex.l ifs_yacc.h mod_yacc.h
EXTRA_DIST= ifs_lex.l mod_lex.l ifs_yacc.h mod_yacc.h
AM_YFLAGS = -d
@ -19,3 +19,5 @@ cmpp_SOURCES = cmpp.h main.c pp_ifs.c pp_lst.c pp_mod.c read_ifs.c util.c \
ifs_lex.c : ifs_lex.l
$(LEX) -i -P$(*:lex=)yy $< > $@
MAINTAINERCLEANFILES = Makefile.in

View File

@ -1,411 +0,0 @@
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AR = @AR@
AS = @AS@
CC = @CC@
CIDERDIR = @CIDERDIR@
CIDERMATH = @CIDERMATH@
CIDERMATHDIR = @CIDERMATHDIR@
CIDERSCRIPTS = @CIDERSCRIPTS@
CIDERSIM = @CIDERSIM@
CIDERTESTS = @CIDERTESTS@
CXX = @CXX@
CXXCPP = @CXXCPP@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
EGREP = @EGREP@
EKVDIR = @EKVDIR@
EKVLIB = @EKVLIB@
EXEEXT = @EXEEXT@
F77 = @F77@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
HAVE_LIB = @HAVE_LIB@
LIB = @LIB@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIB = @LTLIB@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
NUMDEV = @NUMDEV@
NUMDEVDIR = @NUMDEVDIR@
NUMPARAMDIR = @NUMPARAMDIR@
NUMPARAMLIB = @NUMPARAMLIB@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RC = @RC@
STRIP = @STRIP@
VERSION = @VERSION@
WINMAIN = @WINMAIN@
XGRAPHDIR = @XGRAPHDIR@
XSPICEDIR = @XSPICEDIR@
XSPICELIB1 = @XSPICELIB1@
XSPICELIB2 = @XSPICELIB2@
YACC = @YACC@
BUILT_SOURCES = ifs_lex.c ifs_yacc.c ifs_yacc.h mod_lex.c mod_yacc.c mod_yacc.h
EXTRA_DIST = ifs_lex.l ifs_yacc.h mod_yacc.h
AM_YFLAGS = -d
LEX = @LEX@ -t
bin_PROGRAMS = cmpp
cmpp_SOURCES = cmpp.h main.c pp_ifs.c pp_lst.c pp_mod.c read_ifs.c util.c writ_ifs.c ifs_yacc_y.h ifs_yacc.y ifs_lex.c mod_yacc_y.h mod_yacc.y mod_lex.c
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../../config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = cmpp$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I../../..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
cmpp_OBJECTS = main.$(OBJEXT) pp_ifs.$(OBJEXT) pp_lst.$(OBJEXT) \
pp_mod.$(OBJEXT) read_ifs.$(OBJEXT) util.$(OBJEXT) writ_ifs.$(OBJEXT) \
ifs_yacc.$(OBJEXT) ifs_lex.$(OBJEXT) mod_yacc.$(OBJEXT) \
mod_lex.$(OBJEXT)
cmpp_LDADD = $(LDADD)
cmpp_DEPENDENCIES =
cmpp_LDFLAGS =
YLWRAP = $(srcdir)/ylwrap
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in ifs_yacc.c mod_yacc.c ylwrap
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/ifs_lex.P .deps/ifs_yacc.P .deps/main.P \
.deps/mod_lex.P .deps/mod_yacc.P .deps/pp_ifs.P .deps/pp_lst.P \
.deps/pp_mod.P .deps/read_ifs.P .deps/util.P .deps/writ_ifs.P
SOURCES = $(cmpp_SOURCES)
OBJECTS = $(cmpp_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .obj .s .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/cmpp/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
cmpp$(EXEEXT): $(cmpp_OBJECTS) $(cmpp_DEPENDENCIES)
@rm -f cmpp$(EXEEXT)
$(LINK) $(cmpp_LDFLAGS) $(cmpp_OBJECTS) $(cmpp_LDADD) $(LIBS)
.y.c:
$(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
ifs_yacc.h: ifs_yacc.c
mod_yacc.h: mod_yacc.c
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src/xspice/cmpp
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/xspice/cmpp/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "ifs_yacchifs_yacccmod_yacchmod_yaccc$(BUILT_SOURCES)" || rm -f ifs_yacch ifs_yaccc mod_yacch mod_yaccc $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
clean-depend clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
distclean-tags distclean-depend distclean-generic \
clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-depend \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
%.c : %.l
$(LEX) -P$(*:lex=)yy $< > $@
ifs_lex.c : ifs_lex.l
$(LEX) -i -P$(*:lex=)yy $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,164 +0,0 @@
/* A Bison parser, made by GNU Bison 1.875a. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
TOK_ALLOWED_TYPES = 258,
TOK_ARRAY = 259,
TOK_ARRAY_BOUNDS = 260,
TOK_BOOL_NO = 261,
TOK_BOOL_YES = 262,
TOK_COMMA = 263,
TOK_PORT_NAME = 264,
TOK_PORT_TABLE = 265,
TOK_CTYPE_D = 266,
TOK_CTYPE_G = 267,
TOK_CTYPE_GD = 268,
TOK_CTYPE_H = 269,
TOK_CTYPE_HD = 270,
TOK_CTYPE_I = 271,
TOK_CTYPE_ID = 272,
TOK_CTYPE_V = 273,
TOK_CTYPE_VD = 274,
TOK_CTYPE_VNAM = 275,
TOK_C_FUNCTION_NAME = 276,
TOK_DASH = 277,
TOK_DATA_TYPE = 278,
TOK_DEFAULT_TYPE = 279,
TOK_DEFAULT_VALUE = 280,
TOK_DESCRIPTION = 281,
TOK_DIRECTION = 282,
TOK_DIR_IN = 283,
TOK_DIR_INOUT = 284,
TOK_DIR_OUT = 285,
TOK_DTYPE_BOOLEAN = 286,
TOK_DTYPE_COMPLEX = 287,
TOK_DTYPE_INT = 288,
TOK_DTYPE_POINTER = 289,
TOK_DTYPE_REAL = 290,
TOK_DTYPE_STRING = 291,
TOK_IDENTIFIER = 292,
TOK_STATIC_VAR_NAME = 293,
TOK_STATIC_VAR_TABLE = 294,
TOK_INT_LITERAL = 295,
TOK_LANGLE = 296,
TOK_LBRACKET = 297,
TOK_LIMITS = 298,
TOK_NAME_TABLE = 299,
TOK_NULL_ALLOWED = 300,
TOK_PARAMETER_NAME = 301,
TOK_PARAMETER_TABLE = 302,
TOK_RANGLE = 303,
TOK_RBRACKET = 304,
TOK_REAL_LITERAL = 305,
TOK_SPICE_MODEL_NAME = 306,
TOK_STRING_LITERAL = 307
};
#endif
#define TOK_ALLOWED_TYPES 258
#define TOK_ARRAY 259
#define TOK_ARRAY_BOUNDS 260
#define TOK_BOOL_NO 261
#define TOK_BOOL_YES 262
#define TOK_COMMA 263
#define TOK_PORT_NAME 264
#define TOK_PORT_TABLE 265
#define TOK_CTYPE_D 266
#define TOK_CTYPE_G 267
#define TOK_CTYPE_GD 268
#define TOK_CTYPE_H 269
#define TOK_CTYPE_HD 270
#define TOK_CTYPE_I 271
#define TOK_CTYPE_ID 272
#define TOK_CTYPE_V 273
#define TOK_CTYPE_VD 274
#define TOK_CTYPE_VNAM 275
#define TOK_C_FUNCTION_NAME 276
#define TOK_DASH 277
#define TOK_DATA_TYPE 278
#define TOK_DEFAULT_TYPE 279
#define TOK_DEFAULT_VALUE 280
#define TOK_DESCRIPTION 281
#define TOK_DIRECTION 282
#define TOK_DIR_IN 283
#define TOK_DIR_INOUT 284
#define TOK_DIR_OUT 285
#define TOK_DTYPE_BOOLEAN 286
#define TOK_DTYPE_COMPLEX 287
#define TOK_DTYPE_INT 288
#define TOK_DTYPE_POINTER 289
#define TOK_DTYPE_REAL 290
#define TOK_DTYPE_STRING 291
#define TOK_IDENTIFIER 292
#define TOK_STATIC_VAR_NAME 293
#define TOK_STATIC_VAR_TABLE 294
#define TOK_INT_LITERAL 295
#define TOK_LANGLE 296
#define TOK_LBRACKET 297
#define TOK_LIMITS 298
#define TOK_NAME_TABLE 299
#define TOK_NULL_ALLOWED 300
#define TOK_PARAMETER_NAME 301
#define TOK_PARAMETER_TABLE 302
#define TOK_RANGLE 303
#define TOK_RBRACKET 304
#define TOK_REAL_LITERAL 305
#define TOK_SPICE_MODEL_NAME 306
#define TOK_STRING_LITERAL 307
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 487 "ifs_yacc.y"
typedef union YYSTYPE {
Ctype_List_t *ctype_list;
Dir_t dir;
Boolean_t bool;
Range_t range;
Data_Type_t dtype;
My_Port_Type_t ctype;
My_Value_t value;
char *str;
Bound_t bound;
int ival;
double rval;
Complex_t cval;
} YYSTYPE;
/* Line 1240 of yacc.c. */
#line 156 "y.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE yylval;

81
src/xspice/cmpp/ifs_yacc_y.h Executable file
View File

@ -0,0 +1,81 @@
/* $Id$ */
/*============================================================================
FILE ifs_yacc.h
MEMBER OF process cmpp
Copyright 1991
Georgia Tech Research Corporation
Atlanta, Georgia 30332
All Rights Reserved
PROJECT A-8503
AUTHORS
9/12/91 Steve Tynor
MODIFICATIONS
<date> <person name> <nature of modifications>
SUMMARY
Typedefs needed by the YYSTYPE union (%union operator) in the yacc
file. These are only used in the yacc file, but must be defined here since
the generated token.h file includes a definition of the union YYSTYPE.
INTERFACES
None.
REFERENCED FILES
None.
NON-STANDARD FEATURES
None.
============================================================================*/
#include "cmpp.h"
typedef struct {
Boolean_t has_value;
Data_Type_t kind;
union {
Boolean_t bvalue;
int ivalue;
double rvalue;
Complex_t cvalue;
char *svalue;
} u;
} My_Value_t;
typedef struct {
Boolean_t has_bound;
My_Value_t bound;
} Bound_t;
typedef struct {
Boolean_t is_named;
union {
char *name;
struct {
Bound_t upper;
Bound_t lower;
} bounds;
} u;
} Range_t;
typedef struct {
Port_Type_t kind;
char *id; /* undefined unless kind == USER_DEFINED */
} My_Port_Type_t;
typedef struct ctype_list_s {
My_Port_Type_t ctype;
struct ctype_list_s *next;
} Ctype_List_t;

View File

@ -1,132 +0,0 @@
/* A Bison parser, made by GNU Bison 1.875a. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
TOK_ARGS = 258,
TOK_INIT = 259,
TOK_ANALYSIS = 260,
TOK_NEW_TIMEPOINT = 261,
TOK_TIME = 262,
TOK_RAD_FREQ = 263,
TOK_TEMPERATURE = 264,
TOK_T = 265,
TOK_PARAM = 266,
TOK_PARAM_SIZE = 267,
TOK_PARAM_NULL = 268,
TOK_PORT_SIZE = 269,
TOK_PORT_NULL = 270,
TOK_PARTIAL = 271,
TOK_AC_GAIN = 272,
TOK_CHANGED = 273,
TOK_OUTPUT_DELAY = 274,
TOK_STATIC_VAR = 275,
TOK_STATIC_VAR_SIZE = 276,
TOK_INPUT = 277,
TOK_INPUT_STRENGTH = 278,
TOK_INPUT_STATE = 279,
TOK_INPUT_TYPE = 280,
TOK_OUTPUT = 281,
TOK_OUTPUT_CHANGED = 282,
TOK_OUTPUT_STRENGTH = 283,
TOK_OUTPUT_STATE = 284,
TOK_OUTPUT_TYPE = 285,
TOK_COMMA = 286,
TOK_LPAREN = 287,
TOK_RPAREN = 288,
TOK_LBRACKET = 289,
TOK_RBRACKET = 290,
TOK_MISC_C = 291,
TOK_IDENTIFIER = 292,
TOK_LOAD = 293,
TOK_TOTAL_LOAD = 294,
TOK_MESSAGE = 295,
TOK_CALL_TYPE = 296
};
#endif
#define TOK_ARGS 258
#define TOK_INIT 259
#define TOK_ANALYSIS 260
#define TOK_NEW_TIMEPOINT 261
#define TOK_TIME 262
#define TOK_RAD_FREQ 263
#define TOK_TEMPERATURE 264
#define TOK_T 265
#define TOK_PARAM 266
#define TOK_PARAM_SIZE 267
#define TOK_PARAM_NULL 268
#define TOK_PORT_SIZE 269
#define TOK_PORT_NULL 270
#define TOK_PARTIAL 271
#define TOK_AC_GAIN 272
#define TOK_CHANGED 273
#define TOK_OUTPUT_DELAY 274
#define TOK_STATIC_VAR 275
#define TOK_STATIC_VAR_SIZE 276
#define TOK_INPUT 277
#define TOK_INPUT_STRENGTH 278
#define TOK_INPUT_STATE 279
#define TOK_INPUT_TYPE 280
#define TOK_OUTPUT 281
#define TOK_OUTPUT_CHANGED 282
#define TOK_OUTPUT_STRENGTH 283
#define TOK_OUTPUT_STATE 284
#define TOK_OUTPUT_TYPE 285
#define TOK_COMMA 286
#define TOK_LPAREN 287
#define TOK_RPAREN 288
#define TOK_LBRACKET 289
#define TOK_RBRACKET 290
#define TOK_MISC_C 291
#define TOK_IDENTIFIER 292
#define TOK_LOAD 293
#define TOK_TOTAL_LOAD 294
#define TOK_MESSAGE 295
#define TOK_CALL_TYPE 296
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 324 "mod_yacc.y"
typedef union YYSTYPE {
char *str;
Sub_Id_t sub_id;
} YYSTYPE;
/* Line 1240 of yacc.c. */
#line 124 "y.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE yylval;

49
src/xspice/cmpp/mod_yacc_y.h Executable file
View File

@ -0,0 +1,49 @@
/* $Id$ */
/*============================================================================
FILE mod_yacc.h
MEMBER OF process cmpp
Copyright 1991
Georgia Tech Research Corporation
Atlanta, Georgia 30332
All Rights Reserved
PROJECT A-8503
AUTHORS
9/12/91 Steve Tynor
MODIFICATIONS
<date> <person name> <nature of modifications>
SUMMARY
Typedefs needed by the YYSTYPE union (%union operator) in the yacc
file. These are only used in the yacc file, but must be defined here since
the generated token.h file includes a definition of the union YYSTYPE.
INTERFACES
None.
REFERENCED FILES
None.
NON-STANDARD FEATURES
None.
============================================================================*/
#include "cmpp.h"
typedef struct {
char *id;
Boolean_t has_subscript;
char *subscript;
} Sub_Id_t;

123
src/xspice/cmpp/ylwrap Executable file
View File

@ -0,0 +1,123 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Usage:
# ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]...
# * PROGRAM is program to run.
# * INPUT is the input file
# * OUTPUT is file PROG generates
# * DESIRED is file we actually want
# * ARGS are passed to PROG
# Any number of OUTPUT,DESIRED pairs may be used.
# The program to run.
prog="$1"
shift
# Make any relative path in $prog absolute.
case "$prog" in
/* | [A-Za-z]:\\*) ;;
*/*) prog="`pwd`/$prog" ;;
esac
# The input.
input="$1"
shift
case "$input" in
/* | [A-Za-z]:\\*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute. Why? Because otherwise any
# debugging info in the generated file will point to the wrong
# place. This is really gross.
input="`pwd`/$input"
;;
esac
# We don't want to use the absolute path if the input in the current
# directory like when making a tar ball.
input_base=`echo $input | sed -e 's|.*/||'`
if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then
input=$input_base
fi
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
shift
break
fi
pairlist="$pairlist $1"
shift
done
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
case "$input" in
/* | [A-Za-z]:\\*)
# Absolute path; do nothing.
;;
*)
# Make a symbolic link, hard link or hardcopy.
ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" .
;;
esac
$prog ${1+"$@"} "$input"
status=$?
if test $status -eq 0; then
set X $pairlist
shift
first=yes
while test "$#" -ne 0; do
if test -f "$1"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
/* | [A-Za-z]:\\*) target="$2";;
*) target="../$2";;
esac
mv "$1" "$target" || status=$?
else
# A missing file is only an error for the first file. This
# is a blatant hack to let us support using "yacc -d". If -d
# is not specified, we don't want an error when the header
# file is "missing".
if test $first = yes; then
status=1
fi
fi
shift
shift
first=no
done
else
status=$?
fi
# Remove the directory.
cd ..
rm -rf $dirname
exit $status