X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2FMakefile.am;h=f38a91570ac214abfefa91dbc22e41cf64c91033;hb=d582524d3ed4c284ef69492cd6af078d9a31bf18;hp=619f46ef90f3a2fbfb5164f2128664045b1ea864;hpb=c0e4b5dc693cefdc81a4ec7cc1073a2cae371803;p=libguestfs.git diff --git a/src/Makefile.am b/src/Makefile.am index 619f46e..f38a915 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,8 @@ generator_built = \ guestfs-bindtests.c \ guestfs-actions.pod \ guestfs-availability.pod \ - guestfs-structs.pod + guestfs-structs.pod \ + libguestfs.syms $(generator_built): stamp-generator @@ -40,7 +41,8 @@ EXTRA_DIST = \ MAX_PROC_NR \ stamp-generator \ generator.ml \ - libguestfs.3 + libguestfs.3 \ + guestfs.pod # Rerun the generator if it has changed. # Git removes empty directories, so in cases where the @@ -108,8 +110,10 @@ libprotocol_la_CFLAGS = # # Note that this scheme means the real library version will always be # 'libguestfs.so.0.$(MAX_PROC_NR).0'. - libguestfs_la_LDFLAGS = -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) + +libguestfs_la_LDFLAGS += $(VERSION_SCRIPT_FLAGS)libguestfs.syms + libguestfs_la_SOURCES = \ guestfs.c \ guestfs.h \ @@ -118,9 +122,10 @@ libguestfs_la_SOURCES = \ guestfs-bindtests.c \ guestfs-internal.h \ guestfs_protocol.h \ - gettext.h + gettext.h \ + libguestfs.syms -libguestfs_la_LIBADD = $(LTLIBTHREAD) +libguestfs_la_LIBADD = $(LTLIBTHREAD) ../gnulib/lib/libgnu.la # Make libguestfs include the convenience library. noinst_LTLIBRARIES = libprotocol.la @@ -171,3 +176,14 @@ guestfs.3: guestfs.pod \ --name "guestfs" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ > $@ + +# Check user doesn't try to do 'make all' or 'make check' as root. +# https://www.redhat.com/archives/libguestfs/2010-April/msg00098.html + +all-local: checkroot +check-local: checkroot +checkroot: + @if [ "`id -u`" = 0 ]; then \ + echo "*** Error: Don't run 'make' or 'make check' as root."; \ + exit 1; \ + fi