[make 'make rpm' and 'make distcheck' both work more or less
John Meacham <john@repetae.net>**20080208073841] addfile ./jhc.spec.in
addfile ./ac-macros/acincludepackage.m4
hunk ./Makefile.am 16
-GHCOPTS=  @HSOPTS@  -O -ignore-package lang  -pgmF drift-ghc  -F $(GHCDEBUGOPTS) $(GHCINC) $(PACKAGES) $(GHCLANG)
+GHCOPTS=  $(HSOPTS)  -O -ignore-package lang  -pgmF drift-ghc  -F $(GHCDEBUGOPTS) $(GHCINC) $(PACKAGES) $(GHCLANG)
hunk ./Makefile.am 23
-EXTRA_DIST = FrontEnd/HsParser.y Version/Ctx.hs Version/Raw.hs $(RAWFILES) depend.make  arch/generic.arch arch/arch.c arch/i686.arch arch/x86_64.arch
+EXTRA_DIST = FrontEnd/HsParser.y Version/Ctx.hs Version/Raw.hs $(DATAFILES) $(UTILS) $(RAWFILES) depend.make  arch/generic.arch arch/arch.c arch/i686.arch arch/x86_64.arch  data/PrimitiveOperators-in.hs
hunk ./Makefile.am 25
-RAWFILES = $(srcdir)/data/HsFFI.h $(srcdir)/data/jhc_rts.c $(srcdir)/data/jhc_rts_header.h $(srcdir)/data/wsize.h $(srcdir)/data/jhc_rts_alloc.c $(srcdir)/data/jhc_rts2.c $(srcdir)/data/ViaGhc.hs
+UTILS = utils/op_process.prl utils/opt_sets.prl utils/gen_props.prl utils/op_names.prl utils/op_raw.prl
+
+RAWFILES = data/HsFFI.h data/jhc_rts.c data/jhc_rts_header.h data/wsize.h data/jhc_rts_alloc.c data/jhc_rts2.c data/ViaGhc.hs
+
+DATAFILES = data/operators.txt data/primitives.txt  data/names.txt data/props.txt
hunk ./Makefile.am 51
-PrimitiveOperators.hs: $(srcdir)/utils/op_process.prl $(srcdir)/data/operators.txt $(srcdir)/data/primitives.txt $(srcdir)/data/PrimitiveOperators-in.hs
-	perl $(srcdir)/utils/op_process.prl > $@ || rm -f $@
+PrimitiveOperators.hs: utils/op_process.prl $(srcdir)/data/operators.txt $(srcdir)/data/primitives.txt $(srcdir)/data/PrimitiveOperators-in.hs
+	perl $< > $@ || rm -f $@
hunk ./Makefile.am 65
-_dacs/inventory:
+_darcs/inventory:
hunk ./Makefile.am 67
-
-changes.txt: $(srcdir)/_darcs/inventory
+#  $(srcdir)/_darcs/inventory
+changes.txt:
hunk ./Makefile.am 74
-
-Version/Raw.hs: $(srcdir)/_darcs/inventory
+#                 $(srcdir)/_darcs/inventory
+Version/Raw.hs:
hunk ./Makefile.am 100
-	cp jhc-$(VERSION).tar.gz $(HOME)/var/rpm/SOURCES/
+	cp jhc-$(VERSION).tar.gz $(HOME)/var/rpm/SOURCES/jhc-$(VERSION).tar.gz
hunk ./Makefile.am 105
+
hunk ./ac-macros/acincludepackage.m4 1
+dnl Borrowed from Merijn de Jonge:
+dnl   AC_PACKAGE_REQUIRE
+dnl   AC_PROGRAM_REQUIRE
+dnl   AC_PACKAGE_REQUIRE1
+
+dnl AC_PACKAGE_REQUIRE
+dnl Add --with-<pkg> switch. If this switch was not specified try to locate
+dnl it by searching for one or more programs contained in that package.
+dnl Abort configuration when no program could be found. The variable PKG contains the
+dnl full path to the found program on return.
+dnl
+dnl Usage:
+dnl    AC_PACKAGE_REQUIRE(package, programs, usage )
+dnl
+dnl When --with-<pkg> was specified, the variable <PKG> will contain the
+dnl value of the argument of the switch. If the switch was not specified,
+dnl its location is determined automatically using the <programs> argument.
+dnl This is a list of programs to search for to find the location of the
+dnl package. If one such program is found, <PKG> is set to
+dnl <path_to_program>/../..
+dnl
+dnl Example
+dnl    AC_PACKAGE_REQUIRE(wish, wish8.0 wish8.1 wish,
+dnl                             [ --with-wish   location of wish program])
+dnl
+dnl This would set the variable WISH to the location of the first program
+dnl found or to the program as specified with the --with-wish switch.
+AC_DEFUN([AC_PACKAGE_REQUIRE],
+[AC_PACKAGE_REQUIRE1([$1],[$2],[$3],
+    dnl Program found; evaluate <actions_of_found>
+    [translit($1,-a-z,_A-Z)=`dirname \`dirname $translit($1,a-z-,A-Z_)\``])
+])
+
+dnl AC_PROGRAM_REQUIRE
+dnl Add --with-<pkg> switch. If this switch was not specified try to locate
+dnl it by searching for one or more programs contained in that package.
+dnl Abort configuration when no program could be found. The variable PKG contains the
+dnl full path to the found program on return.
+dnl
+dnl Usage:
+dnl    AC_PACKAGE_REQUIRE(package, programs, usage )
+dnl
+dnl When --with-<pkg> was specified, the variable <PKG> will contain the
+dnl value of the argument of the switch. If the switch was not specified,
+dnl its location is determined automatically using the <programs> argument.
+dnl This is a list of programs to search for to find the location of the
+dnl package. If one such program is found, <PKG> is set to <path_to_program>
+dnl
+dnl Example
+dnl    AC_PROGRAM_REQUIRE(wish, wish8.0 wish8.1 wish,
+dnl                             [ --with-wish   location of wish program])
+dnl
+dnl This would set the variable WISH to the location of the first program
+dnl found or to the program as specified with the --with-wish switch.
+AC_DEFUN([AC_PROGRAM_REQUIRE],
+   [AC_PACKAGE_REQUIRE1([$1],[$2],[$3],)])
+
+dnl AC_PACKAGE_REQUIRE1
+dnl Implementation for AC_PACKAGE_REQUIRE and AC_PROGRAM_REQUIRE. The
+dnl commands in the fourht argument are evaluated after a successful
+dnl search for a package program and is used to obtain the installation
+dnl directory from a full path to a program. For example to obtain
+dnl /usr/local from /usr/local/bin/wish
+
+AC_DEFUN([AC_PACKAGE_REQUIRE1],
+[
+   dnl Add configuration switch
+   AC_ARG_WITH($1, [$3],
+      dnl switch was specified
+      translit($1,a-z-,A-Z_)=${withval},
+      dnl If switch not specified, try to find the program automatically
+      [
+         AC_PATH_PROGS(translit($1,a-z-,A-Z_),$2,
+         [
+            dnl Not found; abort configuration
+            AC_ERROR(Required \"$1\" program not found.)
+         ])
+         dnl Program found; evaluate <actions_of_found>
+         $4
+      ])
+])
hunk ./configure.ac 9
+
hunk ./configure.ac 19
+
hunk ./jhc.spec.in 1
+Summary: Jhc Haskell Compiler
+Name: @PACKAGE@
+Version: @VERSION@
+Release: 0
+License: LICENSE
+Group: Development/Languages/Haskell
+BuildRoot: %{_tmppath}/%{name}-root
+Source: http://repetae.net/computer/jhc/drop/%{name}-%{version}.tar.gz
+URL: http://repetae.net/computer/jhc/
+Packager: John Meacham <john@repetae.net>
+Prefix: %{_prefix}
+
+%description
+Jhc Haskell compiler.
+
+%prep
+%setup
+
+%build
+%configure
+# ./configure --prefix=%{prefix}
+make
+
+%install
+%makeinstall
+# make prefix=$RPM_BUILD_ROOT%{prefix} install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+
+%files
+%defattr(-,root,root)
+%{_bindir}/jhc
+
+%doc LICENSE
+
+