Skip to content

Commit

Permalink
build: Add convenience targets to build libfl only
Browse files Browse the repository at this point in the history
These are wrappers around automake- and libtool-generated targets,
allowing users to build libfl only, without the main flex program.

See GH-256 for discussion.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
  • Loading branch information
Explorer09 authored and westes committed Aug 31, 2017
1 parent b84ad14 commit dd1afa3
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ SUBDIRS = \
tests \
tools

# Convenience targets to build libfl only
# These are actually wrappers around automake- and libtool-generated targets

libfl:
cd src && $(MAKE) $(AM_MAKEFLAGS) libfl.la libfl.pc

install-libfl:
cd src && \
$(MAKE) $(AM_MAKEFLAGS) lib_LTLIBRARIES=libfl.la \
pkgconfig_DATA=libfl.pc install-libLTLIBRARIES install-pkgconfigDATA

uninstall-libfl:
cd src && \
$(MAKE) $(AM_MAKEFLAGS) \
lib_LTLIBRARIES=libfl.la pkgconfig_DATA=libfl.pc \
uninstall-libLTLIBRARIES uninstall-pkgconfigDATA

# libfl.pc is cleaned via 'distclean' target
clean-libfl:
cd src && \
$(MAKE) $(AM_MAKEFLAGS) lib_LTLIBRARIES=libfl.la clean-libLTLIBRARIES \
clean-libtool

# Create the ChangeLog, but only if we're inside a git working directory

ChangeLog: $(srcdir)/tools/git2cl
Expand All @@ -63,4 +86,5 @@ install-exec-hook:
cd $(DESTDIR)$(bindir) && \
$(LN_S) -f flex$(EXEEXT) flex++$(EXEEXT)

.PHONY: ChangeLog indent
.PHONY: libfl install-libfl uninstall-libfl clean-libfl \
ChangeLog indent

0 comments on commit dd1afa3

Please sign in to comment.