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 ...@@ -809,7 +809,6 @@ enable_dependency_tracking
with_gnu_ld with_gnu_ld
with_sysroot with_sysroot
enable_libtool_lock enable_libtool_lock
with_gnu_ld
enable_largefile enable_largefile
with_threads with_threads
with_zlib with_zlib
...@@ -839,25 +838,16 @@ LDFLAGS ...@@ -839,25 +838,16 @@ LDFLAGS
LIBS LIBS
CPPFLAGS CPPFLAGS
CPP CPP
CPPFLAGS
FC FC
FCFLAGS FCFLAGS
LDFLAGS
LIBS
FPP FPP
FPPFLAGS FPPFLAGS
F77 F77
FFLAGS FFLAGS
LDFLAGS
LIBS
CXX CXX
CXXFLAGS CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC CCC
CXXCPP CXXCPP
CPPFLAGS
FCMODEXT' FCMODEXT'
   
   
......
...@@ -100,7 +100,11 @@ cdilib.c: ...@@ -100,7 +100,11 @@ cdilib.c:
cdilib.o: cdilib.c cdilib.o: cdilib.c
$(COMPILE) -c $< $(COMPILE) -c $<
LOCALTARGETS = pkgconfig/cdi.pc LOCALTARGETS =
if ENABLE_CDI_LIB
LOCALTARGETS += pkgconfig/cdi.pc
endif
if CREATE_ISOC if CREATE_ISOC
LOCALTARGETS += mo_cdi.o mo_cdi.$(FCMODEXT) LOCALTARGETS += mo_cdi.o mo_cdi.$(FCMODEXT)
endif endif
...@@ -125,19 +129,21 @@ if CREATE_ISOC ...@@ -125,19 +129,21 @@ if CREATE_ISOC
CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
endif endif
install-exec-hook: if ENABLE_CDI_LIB
-@rmdir "$(DESTDIR)$(libdir)" CLEANFILES += pkgconfig/cdi.pc
install-data-hook:
-@rmdir "$(DESTDIR)$(includedir)"
install-exec-local: pkgconfig/cdi.pc install-exec-local: pkgconfig/cdi.pc
test $(ENABLE_CDI_LIB) = false \ $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
|| ( $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig" ; \ $(install_sh_DATA) pkgconfig/cdi.pc "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
$(install_sh_DATA) pkgconfig/cdi.pc \
"$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" )
uninstall-local: uninstall-local:
test $(ENABLE_CDI_LIB) = false \ rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
|| ( rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" ; \ rmdir "$(DESTDIR)$(libdir)/pkgconfig"
rmdir "$(DESTDIR)$(libdir)/pkgconfig" )
endif
install-exec-hook:
-@rmdir "$(DESTDIR)$(libdir)"
install-data-hook:
-@rmdir "$(DESTDIR)$(includedir)"
...@@ -35,8 +35,10 @@ PRE_UNINSTALL = : ...@@ -35,8 +35,10 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
@CREATE_ISOC_TRUE@am__append_1 = mo_cdi.o mo_cdi.$(FCMODEXT) @ENABLE_CDI_LIB_TRUE@am__append_1 = pkgconfig/cdi.pc
@CREATE_ISOC_TRUE@am__append_2 = $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o @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 subdir = src
DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in $(srcdir)/Makefile.in $(srcdir)/config.h.in
...@@ -372,9 +374,9 @@ libcdi_la_SOURCES = \ ...@@ -372,9 +374,9 @@ libcdi_la_SOURCES = \
stream.c \ stream.c \
swap.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 all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am $(MAKE) $(AM_MAKEFLAGS) all-am
...@@ -683,6 +685,8 @@ distclean-generic: ...@@ -683,6 +685,8 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @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: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
...@@ -801,22 +805,19 @@ pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status ...@@ -801,22 +805,19 @@ pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
# #
all-local: $(LOCALTARGETS) 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: install-exec-hook:
-@rmdir "$(DESTDIR)$(libdir)" -@rmdir "$(DESTDIR)$(libdir)"
install-data-hook: install-data-hook:
-@rmdir "$(DESTDIR)$(includedir)" -@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. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .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