pkgsrc/textproc/discount/patches/patch-Makefile.in
schmonz 4060c7733d Update to 2.2.6. From the changelog:
- make a test program to examine pandoc header elements
- if __mkd_trim_line trims the entire line, manually set the string to \0
- add in a handful of test to verify that empty pandoc headers are not
  auto-populated with %
- messed up the definition for missing attributes; should be /**/
  instead of '', because AC_DEFINE will convert an empty string into a 1
- move flags.o down to the last line in OBJS= to work around a plan9
  makefile bug
- have peek() return an int instead of an unsigned int (netbsd 8; ctype
  functions explode with unsigned int arguments?)
- fix all places where I pass flags to be DWORDs
- include config.h before any other headers
- make all instances of 'main()' be integer functions (sigh)
- clean up all references to flags; define them EVERYWHERE as mkd_flag_t
- shuffle around some of the definitions to make everything happily(?)
  compile with all instances of flags being mkd_flag_t
- when checking that the C compiler works, compile the test program as
  two modules with a function declared with differing pointer types
  (char ptr vs void ptr) so if the C compiler generates type signatures
  and doesn't think a void pointer is the universal solvent it will fail
  right there
- set the Plan9 CFLAGS to the two extensions (instead of having them be
  part of the CC macro) and wipe out any CFLAGS (like -T, which tells
  the Plan9 posix C compiler to be stupid) that already exists
- tweak the Makefile macros a bit so people can wedge in their own
  compilers (BUILD) and linkers (LINK) during a build
- add a list item for testing the build
- patch the cmakefile so that has an option to only generate a library
- push the fencedcode block handler up to the toplevel scanner so it
  will handle blank lines inside the fence
- add a fenced code block with embedded html
- don't give a code block class if it's just an empty string
- add a test case for a piece of fenced code with trailing spaces after
  the opening ~~~
- deal with cached text before handling fenced code blocks
- yank the repeated inline uncaches out and stuff them into a local function
- add two more tests (unfinished fenced code block, paragraph then
  fenced code block) to codeblock.t
- don't publish mkd_string_to_anchor
- add an anchor format callback, plus add the -x option to the markdown
  program to squash toc anchors to (close to) github compatability
- add some dle sanity checking into onlyifset()
- when dumping the parse tree, say which header is being dumped --
  h1..h6 vs just header
- tweak configure to (a) use the modern standard uintXX_t types for
  DWORD, WORD, BYTE if possible and (b) if a program is defined via an
  environment variable (like CC) try to use that variable instead of
  doing a path search in AC_PROG
- tweak how scalar headers are include in .in files
- support external code formatters
- add an external code block formatter to the markdown program
- mkd2html wasn't passing pgm to hoptusage()
- mkd2html wasn't properly handling two arguments for input & output
  files. While I was at it, add the -G option to use gfm_in() to read
  the input file in (and preserve newlines)
2019-06-10 13:32:56 +00:00

92 lines
3.4 KiB
Text

$NetBSD: patch-Makefile.in,v 1.3 2019/06/10 13:32:56 schmonz Exp $
Libtoolize for portability across pkgsrc platforms.
--- Makefile.in.orig 2019-04-15 15:28:20.000000000 +0000
+++ Makefile.in
@@ -1,3 +1,4 @@
+LIBTOOL=libtool --tag=CC
CC=@CC@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
@@ -7,8 +8,8 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DIR=@INSTALL_DIR@
INSTALL_DATA=@INSTALL_DATA@
-BUILD=$(CC) -I. $(CFLAGS)
-LINK=$(CC) -L. $(LDFLAGS)
+BUILD=$(LIBTOOL) --mode=compile $(CC) -I. $(CFLAGS)
+LINK=$(LIBTOOL) --mode=link $(CC) -L. $(LDFLAGS)
.c.o:
$(BUILD) -c -o $@ $<
@@ -39,8 +40,10 @@ MAN3PAGES=mkd-callbacks.3 mkd-functions.
all: $(PGMS) $(SAMPLE_PGMS) $(TESTFRAMEWORK)
install: $(PGMS) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR) $(DESTDIR)$(PKGDIR)
- $(INSTALL_PROGRAM) $(PGMS) $(DESTDIR)$(BINDIR)
- ./librarian.sh install libmarkdown VERSION $(DESTDIR)$(LIBDIR)
+ for x in $(PGMS); do \
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$$x; \
+ done
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(MKDLIB).la $(DESTDIR)$(LIBDIR)/$(MKDLIB).la
$(INSTALL_DATA) mkdio.h $(DESTDIR)$(INCDIR)
@MK_PKGCONFIG@$(INSTALL_DATA) $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
@@ -49,7 +52,7 @@ install.everything: install install.samp
install.samples: $(SAMPLE_PGMS) install $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man1
for x in $(SAMPLE_PGMS); do \
- $(INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
$(INSTALL_DATA) $$x.1 $(DESTDIR)$(MANDIR)/man1/$(SAMPLE_PFX)$$x.1; \
done
@@ -100,19 +103,19 @@ mktags: mktags.o
# example programs
@THEME@theme: theme.o $(COMMON) $(MKDLIB) mkdio.h
-@THEME@ $(LINK) -o theme theme.o $(COMMON) -lmarkdown @LIBS@
+@THEME@ $(LINK) -o theme theme.o $(COMMON) $(MKDLIB).la @LIBS@
mkd2html: mkd2html.o $(MKDLIB) mkdio.h gethopt.h $(COMMON)
- $(LINK) -o mkd2html mkd2html.o $(COMMON) -lmarkdown @LIBS@
+ $(LINK) -o mkd2html mkd2html.o $(COMMON) $(MKDLIB).la @LIBS@
markdown: main.o $(COMMON) $(MKDLIB)
- $(LINK) -o markdown main.o $(COMMON) -lmarkdown @LIBS@
+ $(LINK) -o markdown main.o $(COMMON) $(MKDLIB).la @LIBS@
makepage.o: makepage.c mkdio.h
$(BUILD) -c makepage.c
makepage: makepage.o $(COMMON) $(MKDLIB)
- $(LINK) -o makepage makepage.o $(COMMON) -lmarkdown @LIBS@
+ $(LINK) -o makepage makepage.o $(COMMON) $(MKDLIB).la @LIBS@
pgm_options.o: pgm_options.c mkdio.h config.h
$(BUILD) -c pgm_options.c
@@ -126,8 +129,12 @@ gethopt.o: gethopt.c
main.o: main.c mkdio.h config.h
$(BUILD) -c main.c
-$(MKDLIB): $(OBJS)
- ./librarian.sh make $(MKDLIB) VERSION $(OBJS)
+libtool-version-info: VERSION
+ awk -F. '{ printf "%d:%d:0\n", $$1 - 1, $$2 }' < VERSION > libtool-version-info
+
+$(MKDLIB): $(MKDLIB).la
+$(MKDLIB).la: $(OBJS) libtool-version-info
+ $(LINK) -o $(MKDLIB).la $(OBJS:S/.o/.lo/g) -version-info `cat libtool-version-info` -rpath $(LIBDIR)
verify: echo tools/checkbits.sh
@./echo -n "headers ... "; tools/checkbits.sh && echo "GOOD"
@@ -139,7 +146,7 @@ test: $(PGMS) $(TESTFRAMEWORK) verify
pandoc_headers.o: tools/pandoc_headers.c config.h
$(BUILD) -c -o pandoc_headers.o tools/pandoc_headers.c
-pandoc_headers: pandoc_headers.o
+pandoc_headers: pandoc_headers.o $(COMMON) $(MKDLIB)
$(LINK) -o pandoc_headers pandoc_headers.o $(COMMON) -lmarkdown
branch.o: tools/branch.c config.h