Skip to content

Commit

Permalink
buildsys: stop using ward for HPC-GAP
Browse files Browse the repository at this point in the history
It is not doing anything anymore, see issue gap-system#1742
  • Loading branch information
fingolfin committed Sep 27, 2018
1 parent 54021f1 commit b1c7144
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 68 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ doc/gapmacrodoc.idx
/tags
/src/TAGS

# ward
/hpcgap/ward

/builds/

/libgap.la
Expand Down
36 changes: 0 additions & 36 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -223,40 +223,6 @@ GAP_LIBS += $(LIBATOMIC_OPS_LIBS)
GAP_LIBS += $(LIBS)


########################################################################
# HPC-GAP: transform code using ward
#
# For HPC-GAP, we must use ward as a preprocessor before invoking the C
# compiler. The following build rules achieve this.
########################################################################
ifeq ($(HPCGAP),yes)

# Compute new list of sources from ORIGINAL_SOURCES, by replacing src/ with gen/
ORIGINAL_SOURCES := $(SOURCES)
SOURCES := $(patsubst src/%,gen/%,$(ORIGINAL_SOURCES))

# static pattern rule for translating sources via ward
# (note that ward needs to parse the sources, hence gen/config.h must already be made)
gen/%.c: src/%.c gen/config.h
@$(MKDIR_P) $(@D)/$(DEPDIRNAME)
@echo "$@: $<" > $(DEPFILE) # add dependency from gen/*.c to src/*.c
@echo "$<:" >> $(DEPFILE) # add empty rule for src/*.c, to avoid errors if a source file is renamed or removed
$(QUIET_WARD) CPP="$(CPP)" $(ADDGUARDS2) -cpp $(GAP_CPPFLAGS) -- $< > $@

# Normally, GNU make deletes intermediate build files, such as the gen/*.c
# files generated by ward. We do not want this for various reasons (performance
# being one of them), so we tell GNU make accordingly:
.SECONDARY: $(SOURCES)

endif # end of HPCGAP specific code


# instruct GNU make to delete output files of failed build rules,
# so that if Ward errors out, any incomplete generated files are
# deleted.
.DELETE_ON_ERROR:


########################################################################
# Object files
########################################################################
Expand All @@ -279,7 +245,6 @@ ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
QUIET_CC = @echo " C $< => $@";
QUIET_LINK = @echo " LINK $@";
QUIET_WARD = @echo " WARD $< => $@";
QUIET_SED = @echo " SED $< => $@";
QUIET_INSTALL = @echo " INSTALL $< => $@";
QUIET = @
Expand Down Expand Up @@ -672,7 +637,6 @@ sysinfo.gap: config.status $(srcdir)/Makefile.rules cnf/GAP-CFLAGS cnf/GAP-CPPFL
@echo "GAParch=$(GAPARCH)" >> $@
@echo "GAP_ABI=$(ABI)" >> $@
@echo "GAP_HPCGAP=$(HPCGAP)" >> $@
@echo "GAP_ADDGUARDS2=$(ADDGUARDS2)" >> $@
@echo "" >> $@
@echo "GAP_BIN_DIR=\"$(abs_builddir)\"" >> $@
@echo "GAP_LIB_DIR=\"$(abs_srcdir)\"" >> $@
Expand Down
22 changes: 0 additions & 22 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -516,28 +516,6 @@ AC_SUBST([JULIA_LDFLAGS])
AC_SUBST([JULIA_LIBS])


dnl Find ward (if HPC-GAP mode is enabled)
AC_ARG_WITH([ward],
[AS_HELP_STRING([--with-ward@<:@=PREFIX@:>@],
[prefix to the ward tool (used for building HPC-GAP)])],
[],
[with_ward=check])

dnl If HPC-GAP is enabled, check for a usable ward, either in the prefix
dnl specified by the user, or else in $srcdir/hpcgap/ward
AS_IF([test "x$enable_hpcgap" = xyes],
[
# If the user specified a prefix, check only there.
# Otherwise, check in various relative paths, and in $PATH
AS_IF([test "x$with_ward" != xcheck],
[WARD_PATH="$with_ward/bin"],
[WARD_PATH="$srcdir/hpcgap/ward/bin:ward/bin:../ward/bin:$PATH"]
)
AC_PATH_PROG([ADDGUARDS2], [addguards2c addguards2], [], [$WARD_PATH])
AS_IF([test "x$ADDGUARDS2" = x], AC_MSG_ERROR([could not locate addguards2]))
]
)

AS_IF([test "x$with_gc" = xboehm],
[
# We bundle two libraries we need for HPC-GAP:
Expand Down
5 changes: 0 additions & 5 deletions etc/ci-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ then
fi
BUILDDIR=$PWD

# for HPC-GAP we install ward inside BUILDDIR
if [[ $HPCGAP = yes ]]
then
git clone https://github.com/gap-system/ward
cd ward
CFLAGS= LDFLAGS= ./build.sh
cd ..
CONFIGFLAGS="$CONFIGFLAGS --enable-hpcgap"
fi

Expand Down
3 changes: 1 addition & 2 deletions src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
#endif

// Portable compile time assertion.
#if defined(static_assert) && !defined(WARD_ENABLED)
#if defined(static_assert)
// If available, use _Static_assert resp. static_assert from C11.
// However, ward currently cannot deal with it.
#define GAP_STATIC_ASSERT(cond, msg) static_assert(cond, msg)
#else
// If the compiler does not support _Static_assert resp. static_assert,
Expand Down

0 comments on commit b1c7144

Please sign in to comment.