open-cas-linux/configure.d/1_hlist.conf
Michal Mielewczyk 42f981918d Force ordering in configure script
To prevent using macros before they are defined, enfoce calling them in an
appropriate order.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-06-03 08:34:32 -04:00

26 lines
691 B
Bash

#!/bin/bash
#
# Copyright(c) 2012-2019 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
. `dirname $0`/conf_framework
if compile_module "struct hlist_node list" "linux/types.h"
then
add_define "CAS_ALIAS_NODE_TYPE \\
struct hlist_node"
add_define "CAS_DENTRY_LIST_EMPTY(head) \\
hlist_empty(head)"
add_define "CAS_INODE_FOR_EACH_DENTRY(pos, head) \\
hlist_for_each(pos, head)"
elif compile_module "struct list_head list" "linux/list.h"
then
add_define "CAS_ALIAS_NODE_TYPE \\
struct list_head"
add_define "CAS_DENTRY_LIST_EMPTY(head) \\
list_empty(head)"
add_define "CAS_INODE_FOR_EACH_DENTRY(pos, head) \\
list_for_each(pos, head)"
fi