* [PATCH] autoconfiscate utils
@ 2002-04-06 13:30 Nathanael Nerode
2002-04-06 21:24 ` DJ Delorie
2002-04-08 12:11 ` DJ Delorie
0 siblings, 2 replies; 4+ messages in thread
From: Nathanael Nerode @ 2002-04-06 13:30 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
This "patch" autoconfiscates utils. It uses autogen to generate
Makefile.in.
2002-04-06 Nathanael Nerode <neroden@twcny.rr.com>
* utils/configure.in: autoconfiscate
* utils/configure: generate using 'autoconf'
* utils/Makefile.tpl: new file
* utils/Makefile.def: new file
* utils/Makefile.in: generated using 'autogen Makefile.def'
This isn't actually a patch, since I can't get diff to behave properly
on new files. Instead the files are attached.
Tested on i686-pc-linux-gnu plus appropriate cross-compilation targets
to trigger all the code.
[-- Attachment #2: configure.in --]
[-- Type: text/plain, Size: 1578 bytes --]
AC_INIT([Makefile.in])
AC_PROG_INSTALL
AC_CANONICAL_SYSTEM
if test -d ${srcdir}/spu ; then
configdirs="spu"
fi
case "${target}" in
sparclite-*-*)
if test -d ${srcdir}/sparclite ; then
configdirs="$configdirs sparclite"
fi
;;
*mips*-*-pe* | *sh*-*-pe* | *arm*-*-wince | *arm*-wince-pe* )
if test -d ${srcdir}/wince ; then
configdirs="$configdirs wince"
fi
;;
esac
all_subdirs=""
install_subdirs=""
mostlyclean_subdirs=""
clean_subdirs=""
distclean_subdirs=""
maintainer_clean_subdirs=""
for dir in $configdirs ; do
all_subdirs="${all_subdirs} all-$dir"
install_subdirs="${install_subdirs} install-$dir"
mostlyclean_subdirs="${mostlyclean_subdirs} mostlyclean-$dir"
clean_subdirs="${clean_subdirs} clean-$dir"
distclean_subdirs="${distclean_subdirs} distclean-$dir"
maintainer_clean_subdirs="${maintainer_clean_subdirs} maintainer-clean-$dir"
done
AC_SUBST([all_subdirs])
AC_SUBST([install_subdirs])
AC_SUBST([mostlyclean_subdirs])
AC_SUBST([clean_subdirs])
AC_SUBST([distclean_subdirs])
AC_SUBST([maintainer_clean_subdirs])
case "${srcdir}" in
[[\\/]]* | ?:[[\\/]]* ) # Absolute
abs_srcdir=${srcdir}
;;
*)
abs_srcdir="../${srcdir}"
;;
esac
AC_SUBST([abs_srcdir])
case "${cache_file}" in
[[\\/]]* | ?:[[\\/]]* ) # Absolute
abs_cache_file=${cache_file}
;;
*)
abs_cache_file="../${cache_file}"
;;
esac
subconfigure_args=${ac_configure_args}
subconfigure_args="${subconfigure_args} --cache-file=${abs_cache_file}"
AC_SUBST([subconfigure_args])
AC_OUTPUT([Makefile])
[-- Attachment #3: Makefile.def --]
[-- Type: text/plain, Size: 1369 bytes --]
autogen definitions Makefile;
/*
* Copyright 2002 Free Software Foundation
*
* This file is part of GDB.
*
* This file 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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Makefile.def
* use "autogen Makefile.def" (in directory with Makefile.tpl)
* to regenerate Makefile.in
*/
targets = { target = "all";
target_flags = '$(FLAGS_TO_PASS)'; };
targets = { target = "install"; };
targets = { target = "mostlyclean"; };
targets = { target = "clean"; };
targets = { target = "distclean";
makeline_flag = "-"; };
targets = { target = "maintainer-clean";
makeline_flag = "-"; };
subdirs = { subdir = "spu"; };
subdirs = { subdir = "sparclite"; };
subdirs = { subdir = "wince"; };
[-- Attachment #4: Makefile.tpl --]
[-- Type: text/plain, Size: 3691 bytes --]
[+ AutoGen5 template
# Makefile.tpl
# Run 'autogen Makefile.def' in the same directory to regenerate Makefile.in
#
# This file is mostly an ordinary Makefile.in.
# Certain repetitive sections are generated by autogen;
# the parts with [+ and +] around them are the macros.
#
# Use .in as the suffix for the generated file
in
# make sure we don't use csh:
(setenv "SHELL" "/bin/sh")
+]
#
# Makefile.tpl, Makefile.in, Makefile
# Copyright 2002 Free Software Foundation
#
# This file is part of GDB.
#
# This file 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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
SHELL = /bin/sh
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
infodir = @infodir@
includedir = @includedir@
srcdir = @srcdir@
abs_srcdir = @abs_srcdir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
tooldir = $(exec_prefix)
subconfigure_args = @subconfigure_args@
# Should it be INSTALL = @INSTALL@ -c ?
# The old makefile passed the -c argument.
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
# public targets
all: @all_subdirs@
install: @install_subdirs@
mostlyclean: @mostlyclean_subdirs@
clean: @clean_subdirs@
# These should always clean all sudirectories...
distclean: [+ FOR subdirs +]distclean-[+subdir+] [+ ENDFOR subdirs +]
maintainer-clean: [+ FOR subdirs +]maintainer-clean-[+subdir+] [+ ENDFOR subdirs +]
clean mostlyclean:
-rm -f *~ core *.o a.out
maintainer-clean distclean:
-rm -f Makefile config.status config.log config.cache *~ core *.o a.out
info:
install-info:
clean-info:
dvi:
.PHONY: all install clean mostlyclean distclean maintainer-clean
.PHONY: info install-info clean-info dvi
.NOEXPORT:
# Rules for regenerating this Makefile
Makefile: $(srcdir)/Makefile.in config.status
./config.status
$(srcdir)/Makefile.in: $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
cd $(srcdir) && autogen Makefile.def
config.status: $(srcdir)/configure
./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && autoconf
# Miscellaneous variable setting
AR_FLAGS = qv
FLAGS_TO_PASS = \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"AS=$(AS)" \
"CROSS_CFLAGS=$(CROSS_CFLAGS)" \
"TARGET_CFLAGS=$(TARGET_CFLAGS)" \
"INCLUDES=$(INCLUDES)"
# Everything from here on down is generated by FOR loops in autogen.
[+ FOR targets +]
# Glue for [+target+].
[+ FOR subdirs +]
[+target+]-[+subdir+]: configure-[+subdir+]
[+makeline_flag+]cd [+subdir+] && $(MAKE) [+target_flags+] [+target+]
.PHONY: [+target+]-[+subdir+]
[+ ENDFOR subdirs +][+ ENDFOR targets +]
# Glue for configure.
[+ FOR subdirs +]
configure-[+subdir+]: [+subdir+]/Makefile
[+subdir+]/Makefile: config.status
test -d [+subdir+] || mkdir [+subdir+] ; \
cd [+subdir+] && $(abs_srcdir)/[+subdir+]/configure $(subconfigure_args)
.PHONY: configure-[+subdir+]
[+ ENDFOR subdirs +]
[-- Attachment #5: Makefile.in --]
[-- Type: text/plain, Size: 5198 bytes --]
#
# Makefile.tpl, Makefile.in, Makefile
# Copyright 2002 Free Software Foundation
#
# This file is part of GDB.
#
# This file 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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
SHELL = /bin/sh
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
infodir = @infodir@
includedir = @includedir@
srcdir = @srcdir@
abs_srcdir = @abs_srcdir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
tooldir = $(exec_prefix)
subconfigure_args = @subconfigure_args@
# Should it be INSTALL = @INSTALL@ -c ?
# The old makefile passed the -c argument.
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
# public targets
all: @all_subdirs@
install: @install_subdirs@
mostlyclean: @mostlyclean_subdirs@
clean: @clean_subdirs@
# These should always clean all sudirectories...
distclean: distclean-spu distclean-sparclite distclean-wince
maintainer-clean: maintainer-clean-spu maintainer-clean-sparclite maintainer-clean-wince
clean mostlyclean:
-rm -f *~ core *.o a.out
maintainer-clean distclean:
-rm -f Makefile config.status config.log config.cache *~ core *.o a.out
info:
install-info:
clean-info:
dvi:
.PHONY: all install clean mostlyclean distclean maintainer-clean
.PHONY: info install-info clean-info dvi
.NOEXPORT:
# Rules for regenerating this Makefile
Makefile: $(srcdir)/Makefile.in config.status
./config.status
$(srcdir)/Makefile.in: $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
cd $(srcdir) && autogen Makefile.def
config.status: $(srcdir)/configure
./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && autoconf
# Miscellaneous variable setting
AR_FLAGS = qv
FLAGS_TO_PASS = \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"AS=$(AS)" \
"CROSS_CFLAGS=$(CROSS_CFLAGS)" \
"TARGET_CFLAGS=$(TARGET_CFLAGS)" \
"INCLUDES=$(INCLUDES)"
# Everything from here on down is generated by FOR loops in autogen.
# Glue for all.
all-spu: configure-spu
cd spu && $(MAKE) $(FLAGS_TO_PASS) all
.PHONY: all-spu
all-sparclite: configure-sparclite
cd sparclite && $(MAKE) $(FLAGS_TO_PASS) all
.PHONY: all-sparclite
all-wince: configure-wince
cd wince && $(MAKE) $(FLAGS_TO_PASS) all
.PHONY: all-wince
# Glue for install.
install-spu: configure-spu
cd spu && $(MAKE) install
.PHONY: install-spu
install-sparclite: configure-sparclite
cd sparclite && $(MAKE) install
.PHONY: install-sparclite
install-wince: configure-wince
cd wince && $(MAKE) install
.PHONY: install-wince
# Glue for mostlyclean.
mostlyclean-spu: configure-spu
cd spu && $(MAKE) mostlyclean
.PHONY: mostlyclean-spu
mostlyclean-sparclite: configure-sparclite
cd sparclite && $(MAKE) mostlyclean
.PHONY: mostlyclean-sparclite
mostlyclean-wince: configure-wince
cd wince && $(MAKE) mostlyclean
.PHONY: mostlyclean-wince
# Glue for clean.
clean-spu: configure-spu
cd spu && $(MAKE) clean
.PHONY: clean-spu
clean-sparclite: configure-sparclite
cd sparclite && $(MAKE) clean
.PHONY: clean-sparclite
clean-wince: configure-wince
cd wince && $(MAKE) clean
.PHONY: clean-wince
# Glue for distclean.
distclean-spu: configure-spu
-cd spu && $(MAKE) distclean
.PHONY: distclean-spu
distclean-sparclite: configure-sparclite
-cd sparclite && $(MAKE) distclean
.PHONY: distclean-sparclite
distclean-wince: configure-wince
-cd wince && $(MAKE) distclean
.PHONY: distclean-wince
# Glue for maintainer-clean.
maintainer-clean-spu: configure-spu
-cd spu && $(MAKE) maintainer-clean
.PHONY: maintainer-clean-spu
maintainer-clean-sparclite: configure-sparclite
-cd sparclite && $(MAKE) maintainer-clean
.PHONY: maintainer-clean-sparclite
maintainer-clean-wince: configure-wince
-cd wince && $(MAKE) maintainer-clean
.PHONY: maintainer-clean-wince
# Glue for configure.
configure-spu: spu/Makefile
spu/Makefile: config.status
test -d spu || mkdir spu ; \
cd spu && $(abs_srcdir)/spu/configure $(subconfigure_args)
.PHONY: configure-spu
configure-sparclite: sparclite/Makefile
sparclite/Makefile: config.status
test -d sparclite || mkdir sparclite ; \
cd sparclite && $(abs_srcdir)/sparclite/configure $(subconfigure_args)
.PHONY: configure-sparclite
configure-wince: wince/Makefile
wince/Makefile: config.status
test -d wince || mkdir wince ; \
cd wince && $(abs_srcdir)/wince/configure $(subconfigure_args)
.PHONY: configure-wince
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] autoconfiscate utils
2002-04-06 13:30 [PATCH] autoconfiscate utils Nathanael Nerode
@ 2002-04-06 21:24 ` DJ Delorie
2002-04-07 9:35 ` Andrew Cagney
2002-04-08 12:11 ` DJ Delorie
1 sibling, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2002-04-06 21:24 UTC (permalink / raw)
To: neroden; +Cc: gdb-patches
> This "patch" autoconfiscates utils. It uses autogen to generate
> Makefile.in.
>
> 2002-04-06 Nathanael Nerode <neroden@twcny.rr.com>
>
> * utils/configure.in: autoconfiscate
> * utils/configure: generate using 'autoconf'
> * utils/Makefile.tpl: new file
> * utils/Makefile.def: new file
> * utils/Makefile.in: generated using 'autogen Makefile.def'
IIRC the autogen issue hasn't quite been resolved in gcc-land. The
files look technically OK with me, so if the gdb folks are OK with
autogen, I'm OK with it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] autoconfiscate utils
2002-04-06 21:24 ` DJ Delorie
@ 2002-04-07 9:35 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-04-07 9:35 UTC (permalink / raw)
To: DJ Delorie, neroden; +Cc: gdb-patches
> This "patch" autoconfiscates utils. It uses autogen to generate
>> Makefile.in.
>>
>> 2002-04-06 Nathanael Nerode <neroden@twcny.rr.com>
>>
>> * utils/configure.in: autoconfiscate
>> * utils/configure: generate using 'autoconf'
>> * utils/Makefile.tpl: new file
>> * utils/Makefile.def: new file
>> * utils/Makefile.in: generated using 'autogen Makefile.def'
>
>
> IIRC the autogen issue hasn't quite been resolved in gcc-land. The
> files look technically OK with me, so if the gdb folks are OK with
> autogen, I'm OK with it.
M'kay from here.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] autoconfiscate utils
2002-04-06 13:30 [PATCH] autoconfiscate utils Nathanael Nerode
2002-04-06 21:24 ` DJ Delorie
@ 2002-04-08 12:11 ` DJ Delorie
1 sibling, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2002-04-08 12:11 UTC (permalink / raw)
To: neroden; +Cc: gdb-patches
> 2002-04-06 Nathanael Nerode <neroden@twcny.rr.com>
>
> * utils/configure.in: autoconfiscate
> * utils/configure: generate using 'autoconf'
> * utils/Makefile.tpl: new file
> * utils/Makefile.def: new file
> * utils/Makefile.in: generated using 'autogen Makefile.def'
Applied (with the updated Makefile.def). Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-08 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-06 13:30 [PATCH] autoconfiscate utils Nathanael Nerode
2002-04-06 21:24 ` DJ Delorie
2002-04-07 9:35 ` Andrew Cagney
2002-04-08 12:11 ` DJ Delorie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox