aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
AgeCommit message (Collapse)Author
2019-01-02Removed custom Setup.hs, use build-type: simple.John MacFarlane
The only thing we gained from the custom build was automatic installation of the man page when using 'cabal install'. But custom builds cause problems, e.g., with cross-compilation. Installation of the man page is better handled by packagers. Note to packagers (e.g. Debian): it may be necessary to add a step installing the man page with the next release.
2018-01-05Update copyright notices to include 2018Albert Krewinkel
2017-10-26update years in copyrightKolen Cheung
2017-04-03Removed unused imports from Setup.hs.John MacFarlane
2017-04-02Revert "Revert "Use file-embed instead of hsb2hs to embed data files.""John MacFarlane
This reverts commit 1fa15c225b515e1fa1c6566f90f1be363a4d770f.
2017-03-26Revert "Use file-embed instead of hsb2hs to embed data files."John MacFarlane
This reverts commit 10d91c147968d2e4d63b99b5b0342624827f416f.
2017-03-26Revert "Setup.hs - removed unneeded imports."John MacFarlane
This reverts commit 5354b441706b7c745efecb9174b00625c2d6bab3.
2017-03-26Setup.hs - removed unneeded imports.John MacFarlane
2017-03-26Use file-embed instead of hsb2hs to embed data files.John MacFarlane
I think template haskell is robust enough now across platforms that this will work. Motivation: file-embed gives us better dependency tracking: if a data file changes, ghc/stack/cabal know to recompile the Data module. This also removes hsb2hs as a build dependency.
2016-10-18Setup.hs - removed some unneeded imports.John MacFarlane
2015-10-09Setup.hs: rewrite so as not to use process, directory, filepath.John MacFarlane
Using anything outside base is dangerous, since older versions of ghc will link against two different versions. See e.g. - https://groups.google.com/forum/#!topic/pandoc-discuss/0r9Hhl730LY - https://www.reddit.com/r/haskell/comments/3634x2/cabal_is_giving_a_weird_error_when_attempting_to/ - jaspervdj/hakyll#356
2015-07-06Setup.hs: better version detection in older hsb2hs.John MacFarlane
If it returns an error with input `--version`, recover gracefully.
2015-07-05Make cabal require hsb2hs >= 0.3.1.John MacFarlane
This is done by adding `hookedPrograms` in `Setup.hs`, which allows us to include `hsb2hs` in Build-Tools in cabal.
2015-07-03Setup.hs: Don't require hsb2hs unless embed_data_files flag specified.John MacFarlane
2015-07-02Added pandoc.1 to repository. Don't build as part of cabal build.John MacFarlane
The process was too fragile. It made too many assumptions about available libraries (which failed sometimes when sandboxes were used). This is a low-tech solution. The only drawback is that `man/pandoc.1` is a generated file in the repository. It will need to be regenerated periodically when README changes.
2015-07-02Make copying of man pages respect --destdir.John MacFarlane
Closes #2262.
2015-07-02Setup.hs: ensure target directory is created when installing man page.John MacFarlane
2015-07-01Install man pages as part of cabal 'copy' phase.John MacFarlane
2015-07-01Generate man page in cabal build process and include in data/.John MacFarlane
The pandoc.1 man page is generated automatically after the cabal build process. It goes in `data/pandoc.1`. It can be obtained by the user who installs pandoc via cabal thus: pandoc --print-default-data-file pandoc.1 > pandoc.1
2015-06-28New method for producing man pages.John MacFarlane
This change adds `--man1` and `--man5` options to pandoc, so pandoc can generate its own man pages. It removes the old overly complex method of building a separate executable (but not installing it) just to create the man pages. The man pages are no longer automatically created in the build process. The man/ directory has been removed. The man page templates have been moved to data/. New unexported module: Text.Pandoc.ManPages. Text.Pandoc.Data now exports readmeFile, and `readDataFile` knows how to find README. Closes #2190.
2015-05-28Better fix for #2187.John MacFarlane
* Reverted kludgy change to make-windows-installer.bat. * Removed make-reference-fiels.hs. * Moved the individual ingredients of reference.docx and reference.odt to the data directory. * Removed reference.docx and reference.odt from data directory. * We now build the reference archives from their ingredient pieces in the docx and odt writers, instead of having a reference.docx or reference.odt intermediary. This should fix #2187. It also simplifies the bulid procedure. The one thing users may notice is different is that you can no longer get the reference.docx or reference.odt using `--print-default-data-file`. Instead, simply generate a docx or odt using pandoc with a blank or minimal input, and use that (or a customized version) with `--reference-docx` or `--reference-odt`.
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane
2015-03-28Always build man pages. Removed make-pandoc-man-pages flag.John MacFarlane
Updated INSTALL instructions. Makefile: removed man target, now that we generate man pages by default.
2015-03-28Create reference files from unpacked archives with helper programNikolay Yakimov
2014-08-13Setup.hs: ensure make-man-pages not installed in bindir.John MacFarlane
2014-08-13Simplified Setup.hs.John MacFarlane
It no longer builds and installs man pages. All it does is hook the hsb preprocessor. This should make the build process more robust over Cabal API changes. We'll add a Makefile to generate man pages.
2014-08-13Removed special testHook from Setup.John MacFarlane
This was just too fragile and dependent on a changing Cabal API (see #1526). Instead of passing the bulid directory to the test program, we now let the test program find itself (using executable-path) and then find the pandoc executable relative to itself.
2014-05-17no need to hide 'catch'Michael Thompson
This doesn't normally cause a problem because of some ghc workaround special to this case, but I was able to trigger an error with a complicated mixture of sandboxing, directing `cabal` to a locally installed ghc, and something else. `catch` isn't actually used in the file, so it seems it might as well go.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel
2013-10-20Pass the buildDir as first argument to test suite.John MacFarlane
Allows test suite to work with cabal sandboxes. Previously we hard-coded the build directory.
2013-10-08Revert "Setup.hs: Better way of handling man page building."John MacFarlane
This reverts commit ed061b91c8e3247e1d3b1538eca24687adf0e575.
2013-10-06Setup.hs: Better way of handling man page building.John MacFarlane
Previously we tried to remove make-pandoc-man-pages from the list of packages to be haddocked, installed, copied, etc. It works better to set 'Buildable: False' on make-pandoc-man-pages, then have the buildHook temporarily set Buildable to True. This allows make-pandoc-man-pages to be built (and used in generating the man pages), but not installed.
2013-01-23Use hsb2hs preprocessor instead of TH for embed_data_files.John MacFarlane
This should work on Windows, unlike the TH solution with file-embed.
2012-11-07Use LBI buildDir instead of hardcoded "dist" </> "build".Clint Adams
2012-10-15Moved man page creation out of Setup.hs.John MacFarlane
* MakeManPage.hs has been transformed into man/make-pandoc-man-pages.hs. * There is now a cabal stanza for this, so the dependencies are handled by cabal. * Special treatment in Setup.hs ensures that this never gets installed; it is built and used to create the man pages. * Setup.hs cleaned up.
2012-10-15Removed unneeded function from Setup.hs.John MacFarlane
2012-10-15WhitespaceJohn MacFarlane
2012-09-21Setup: getModificationTime returns UTCTime as of GHC 7.6Ben Gamari
2012-07-26Integrated test suite with cabal.John MacFarlane
To run tests, configure with --enable-tests, then 'cabal test'. You can specify particular tests using --test-options='-t markdown'. No output is shown unless tests fail. In the future, we can move to the detailed-1.0 interface.
2012-07-24Use catch from Control.Exception to avoid warnings.John MacFarlane
2012-03-09Fixed permissions on installed man pages.John MacFarlane
Thanks to Magnus Therning for the patch.
2012-01-20Removed markdown2pdf and documentation.John MacFarlane
2011-12-19Setup: Making man pages now works with cabal-dev.John MacFarlane
In Setup.hs we now invoke 'runghc' in a way that points it to the correct package databases, instead of always falling back to the default user package db. Thanks to Antoine Latter for the patch.
2011-02-04Setup.hs: Added a 5 second timeout for test cases.John MacFarlane
2011-01-31Setup.hs: Don't call MakeManPage.hs unless the man pages need making.John MacFarlane
2011-01-28Refactored man pages.John MacFarlane
* Markdown syntax description from README now goes in pandoc_markdown.5. * Refactored man page construction functions, putting more of the work in MakeManPages.hs.
2011-01-16Setup.hs: Only make pandoc.1 if README modified, be more verbose.John MacFarlane
2011-01-12Merge branch 'master' into testsJohn MacFarlane
2011-01-12Improvements to test suite.John MacFarlane
+ You can now specify glob patterns after 'cabal test'; e.g. 'cabal test latex' will only run the latex tests. + Instead of detecting highlighting support in Setup.hs, we now detect it in test-pandoc, by looking to see if 'languages' is null. + We now verify the lhs readers against the lhs-test.native, normalizing with 'normalize'. This makes more sense than verifying against HTML, which also brings in the HTML writer. + Added lhsn-test.nohl.{html,html+lhs}, so we can do the lhs tests whether or not highlighting has been installed.
2011-01-11Setup.hs: -Wall clean.John MacFarlane