Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch names of BEAM files from source files #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KrzysiekJ
Copy link

LFE allows creating many modules in a single source file. There is no mandatory correspondence between base names of source files and base names of BEAM files.

LFE allows creating many modules in a single source file. There is no
mandatory correspondence between base names of source files and base
names of BEAM files.
@@ -25,7 +25,8 @@ LFE_FILES = $(sort $(call core_find,src/,*.lfe))

ifneq ($(LFE_FILES),)

BEAM_FILES += $(addprefix ebin/,$(patsubst %.lfe,%.beam,$(notdir $(LFE_FILES))))
BEAM_FILES += $(addprefix ebin/, $(addsuffix .beam,\
$(shell grep -h '^.defmodule ' src/*.lfe | sed 's/^.defmodule *\([^ ]*\).*/\1/')))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regexp should be ^\(defmodule , but I hadn’t managed to escape the parenthesis, so have replaced it with a dot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant