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 6726721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:57:38+00:00 2026-05-26T09:57:38+00:00

In a project, I have a script called make.sh that builds the project and

  • 0

In a project, I have a script called make.sh that builds the project and does some other stuff too. It is working well so far.

Then, just out of curiosity I’ve tried to create a Makefile that just passed its command-line parameters to this script so I could call it
make snapshot
instead of
./make.sh snapshot

this is the Makefile that I’m using right now

.PHONY: snapshot

%: 
    ./make.sh $@

snapshot: 
    ./make.sh snapshot

But this approach have some problems, I can’t pass “build” as a parameter, because I have a “Build” directory (used by SCons), and I can’t pass a second parameter to be passed to the script, like:
make upload 192.168.1.10
as make interprets it as two different targets…

Is there a way I can do this with the Makefile?

  • 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-26T09:57:39+00:00Added an answer on May 26, 2026 at 9:57 am

    Yes, you can do it:

    %:all
        @true
    
    all:
        ./make.sh $(MAKECMDGOALS)
    

    but this is an abuse of Make. The idea is that Make should interpret its arguments as a set of targets, not an ordered list of general arguments. You should probably use a different tool.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a utility build script that gets called from a variety of project-specific
I am working on a project that I have to Write a simple script
I have a project I'm working on called Natalie. What it does, (twitter.com is
I have a Java project that I build using an Ant script. I am
I have project that I'm working on that is going to require a webserver.
I have a web project that has a page called editemployee.aspx. The code behind
I have a project I am currently working on that has multiple validators and
I have a gant script in my grails project. I would like to do
I have a WPF project and I'm trying to setup a NAnt build script
In my project.gwt.xml file I have <script src=http://maps.google.com/maps?gwt=1&amp;file=api&amp;v=2&amp;sensor=false;key=MYKEY /> But, when I load my

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.