Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6023395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:59:55+00:00 2026-05-23T03:59:55+00:00

I tried to do something similar to How to make two different source directories

  • 0

I tried to do something similar to How to make two different source directories in a Makefile output to one bin directory?, so I have these files (relative to my project root):

Emakefile:
% EMakefile
% -*- mode: erlang -*-
{["src/*", "src/*/*", "src/*/*/*"],
 [{i, "include"}, {outdir, "ebin"}, debug_info]}.

test/Emakefile:
% EMakefile
% -*- mode: erlang -*-
{["../src/*", "../src/*/*", "../src/*/*/*"],
 [{i, "../include"}, {outdir, "../ebin"}, debug_info, {d, 'TEST'}]}.

Makefile:
EPATH=-pa ebin

all: before_compile
    erl -make

all_test: before_compile
    cd test
    erl -make
    cd ..

before_compile: mk_ebin copy_sqlite create_db copy_config copy_dot_app

test: all_test
    erl -noshell $(EPATH) \
        -s tests run \
        -s init stop
    rm -f ct.db

clean:
    rm -fv ebin/*

... dependencies of before_compile

The problem is that running make test doesn’t recompile any modules which are already compiled with make. It seems erl -make doesn’t care that they were compiled without TEST defined, it just checks that the modules themselves are older than beam-files. How do I force it to recompile (and avoid recompilation when it isn’t needed)?

UPDATE: Strangely, when running make all_test immediately after make clean, it appears that ./Emakefile is used instead of test/Emakefile: I am getting

Recompile: src/tests
Recompile: src/server_protocol_client

etc. and no tests instead of

Recompile: ../src/tests
Recompile: ../src/server_protocol_client

which I get by doing cd test; erl -make manually. Any idea why? Anyway, I’ve fixed this problem by removing test/Emakefile and replacing all_test in Makefile:

all_test: before_compile
    erl -noshell -eval "make:all([{d, 'TEST'}])." -s init stop
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:59:56+00:00Added an answer on May 23, 2026 at 3:59 am
    all_test: before_compile
        cd test
        erl -make
        cd ..
    

    This is incorrect. Each line produces its own process. Do such:

    all_test: before_compile
        cd test; \
        erl -make
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I match (PCRE) everything inbetween two tags? I tried something like this:
I am wondering if you have tried to make a mobile version of a
I tried to search something similar but I failed, so, I'm asking here this
Summary Let's say I have two C# 4.0 classes, one inheriting from the other:
I have two threads. One thread has an instance of myObjectManager. myObjectManager has a
I've made a voting on comments like the one this website has(something similar), and
I've tried searching for people with similar questions, but haven't found anything. I have
How can I do something similar to jquery's explode effect, but make it where
Tried something like this: HttpApplication app = s as HttpApplication; //s is sender of
I tried something like this but it just makes the background of the image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.