Commit 951a2092 authored by Ralf Mueller's avatar Ralf Mueller
Browse files

Use automake conditionals instead of "test" (refs #1745)

parent 3112602a
......@@ -809,7 +809,6 @@ enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
with_gnu_ld
enable_largefile
with_threads
with_zlib
......@@ -839,25 +838,16 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
CPPFLAGS
FC
FCFLAGS
LDFLAGS
LIBS
FPP
FPPFLAGS
F77
FFLAGS
LDFLAGS
LIBS
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CXXCPP
CPPFLAGS
FCMODEXT'
 
 
......
......@@ -100,7 +100,11 @@ cdilib.c:
cdilib.o: cdilib.c
$(COMPILE) -c $<
LOCALTARGETS = pkgconfig/cdi.pc
LOCALTARGETS =
if ENABLE_CDI_LIB
LOCALTARGETS += pkgconfig/cdi.pc
endif
if CREATE_ISOC
LOCALTARGETS += mo_cdi.o mo_cdi.$(FCMODEXT)
endif
......@@ -125,19 +129,21 @@ if CREATE_ISOC
CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
endif
install-exec-hook:
-@rmdir "$(DESTDIR)$(libdir)"
install-data-hook:
-@rmdir "$(DESTDIR)$(includedir)"
if ENABLE_CDI_LIB
CLEANFILES += pkgconfig/cdi.pc
install-exec-local: pkgconfig/cdi.pc
test $(ENABLE_CDI_LIB) = false \
|| ( $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig" ; \
$(install_sh_DATA) pkgconfig/cdi.pc \
"$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" )
$(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
$(install_sh_DATA) pkgconfig/cdi.pc "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
uninstall-local:
test $(ENABLE_CDI_LIB) = false \
|| ( rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" ; \
rmdir "$(DESTDIR)$(libdir)/pkgconfig" )
rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
rmdir "$(DESTDIR)$(libdir)/pkgconfig"
endif
install-exec-hook:
-@rmdir "$(DESTDIR)$(libdir)"
install-data-hook:
-@rmdir "$(DESTDIR)$(includedir)"
......@@ -35,8 +35,10 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@CREATE_ISOC_TRUE@am__append_1 = mo_cdi.o mo_cdi.$(FCMODEXT)
@CREATE_ISOC_TRUE@am__append_2 = $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
@ENABLE_CDI_LIB_TRUE@am__append_1 = pkgconfig/cdi.pc
@CREATE_ISOC_TRUE@am__append_2 = mo_cdi.o mo_cdi.$(FCMODEXT)
@CREATE_ISOC_TRUE@am__append_3 = $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
@ENABLE_CDI_LIB_TRUE@am__append_4 = pkgconfig/cdi.pc
subdir = src
DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in
......@@ -372,9 +374,9 @@ libcdi_la_SOURCES = \
stream.c \
swap.c
LOCALTARGETS = pkgconfig/cdi.pc $(am__append_1)
LOCALTARGETS = $(am__append_1) $(am__append_2)
#
CLEANFILES = `ls *~` cdilib.c $(am__append_2)
CLEANFILES = `ls *~` cdilib.c $(am__append_3) $(am__append_4)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
......@@ -683,6 +685,8 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@uninstall-local:
@ENABLE_CDI_LIB_FALSE@install-exec-local:
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
......@@ -801,22 +805,19 @@ pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
#
all-local: $(LOCALTARGETS)
@ENABLE_CDI_LIB_TRUE@install-exec-local: pkgconfig/cdi.pc
@ENABLE_CDI_LIB_TRUE@ $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
@ENABLE_CDI_LIB_TRUE@ $(install_sh_DATA) pkgconfig/cdi.pc "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
@ENABLE_CDI_LIB_TRUE@uninstall-local:
@ENABLE_CDI_LIB_TRUE@ rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
@ENABLE_CDI_LIB_TRUE@ rmdir "$(DESTDIR)$(libdir)/pkgconfig"
install-exec-hook:
-@rmdir "$(DESTDIR)$(libdir)"
install-data-hook:
-@rmdir "$(DESTDIR)$(includedir)"
install-exec-local: pkgconfig/cdi.pc
test $(ENABLE_CDI_LIB) = false \
|| ( $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig" ; \
$(install_sh_DATA) pkgconfig/cdi.pc \
"$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" )
uninstall-local:
test $(ENABLE_CDI_LIB) = false \
|| ( rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" ; \
rmdir "$(DESTDIR)$(libdir)/pkgconfig" )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment