Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions system/grep/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ##############################################################################
# apps/system/grep/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

if(CONFIG_SYSTEM_GREP)
nuttx_add_application(
MODULE
${CONFIG_SYSTEM_GREP}
NAME
${CONFIG_SYSTEM_GREP_PROGNAME}
STACKSIZE
${CONFIG_SYSTEM_GREP_STACKSIZE}
PRIORITY
${CONFIG_SYSTEM_GREP_PRIORITY}
SRCS
grep_main.c)

endif()
30 changes: 30 additions & 0 deletions system/grep/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config SYSTEM_GREP
tristate "system 'grep' command"
default n
depends on LIBC_REGEX
---help---
Enable support for the system 'grep' command (regex-based search).

if SYSTEM_GREP

config SYSTEM_GREP_PROGNAME
string "grep program name"
default "grep"
---help---
This is the name of the program that will be used when the grep
program is installed.

config SYSTEM_GREP_PRIORITY
int "grep task priority"
default 100

config SYSTEM_GREP_STACKSIZE
int "grep stack size"
default DEFAULT_TASK_STACKSIZE

endif
25 changes: 25 additions & 0 deletions system/grep/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/system/grep/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_SYSTEM_GREP),)
CONFIGURED_APPS += $(APPDIR)/system/grep
endif
36 changes: 36 additions & 0 deletions system/grep/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
############################################################################
# apps/system/grep/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

# Standalone grep command

PROGNAME = $(CONFIG_SYSTEM_GREP_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_GREP_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_GREP_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_GREP)

# Files

MAINSRC = grep_main.c

include $(APPDIR)/Application.mk
Loading
Loading