diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-12-08 19:17:54 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-12-08 19:17:54 +0000 |
commit | 8d57eb7ac9b9af835c83ef1b3e58a152bdd3bdc6 (patch) | |
tree | b8baa5255a5438836fd3075edeaa08c04efa7b47 | |
parent | 46b58da4e6c675859199be64db0c9b5297e1aa14 (diff) |
Bug #4807: Modularized gccmakedep (Joshua Baergen)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Makefile.am | 44 | ||||
-rw-r--r-- | configure.ac | 36 | ||||
-rw-r--r-- | cpprules.in | 26 |
4 files changed, 113 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..dda5ac0 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,7 @@ +2005-12-08 Adam Jackson <ajax@freedesktop.org> + + * configure.ac: + * Makefile.am: + * cpprules.in: + * ChangeLog: + Bug #4807: Modularized gccmakedep (Joshua Baergen) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..8abfb5f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,44 @@ +# +# Copyright 2005 Red Hat, Inc. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Red Hat not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Red Hat makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +gccmakedep_DATA = gccmakedep +gccmakedepdir = $(bindir) + +EXTRA_DIST = gccmdep.cpp + +include cpprules.in + +DEFS = \ + -DCCCMD=$(CC)\ + -DRMCMD="rm"\ + -DLNCMD="ln"\ + -DMVCMD="mv" + +CPP_FILES_FLAGS = $(DEFS) + +dist_man1_MANS = gccmakedep.man + +gccmakedep: gccmdep + mv gccmdep gccmakedep +install-data-hook: + chmod +x $(DESTDIR)/$(bindir)/gccmakedep + +CLEANFILES = gccmakedep diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..82da45d --- /dev/null +++ b/configure.ac @@ -0,0 +1,36 @@ + +dnl Copyright 2005 Red Hat, Inc. +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Red Hat not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Red Hat makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.57]) +AC_INIT(gccmakedep,[0.99.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],gccmakedep) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +AC_PROG_INSTALL +AC_PROG_CC + +XORG_PROG_RAWCPP + +XORG_RELEASE_VERSION + +AC_OUTPUT([Makefile]) diff --git a/cpprules.in b/cpprules.in new file mode 100644 index 0000000..09b7567 --- /dev/null +++ b/cpprules.in @@ -0,0 +1,26 @@ +# -*- Makefile -*- +# Rules for generating files using the C pre-processor +# (Replaces CppFileTarget from Imake) + +SED = sed + +SUFFIXES = .cpp + +WCHAR32_FLAGS = -DWCHAR32=@WCHAR32@ + +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. + +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + +.cpp: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ |