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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:18:38+00:00 2026-06-05T03:18:38+00:00

Based on Beta’s answer in gnu make copy many files to a single location

  • 0

Based on Beta’s answer in gnu make copy many files to a single location, I had a working rule to copy figures from different paths into a ./figures/ subdir in my build directory

ORIG_FILE_DIRS += ..
LOCAL_FILES += figures/myfig.png
DESTDIR := figures

all : $(LOCAL_FILES)

vpath %.png $(ORIG_FILE_DIRS)

$(DESTDIR)/%.png: %.png
  mkdir -p $(DESTDIR)
  cp $< $@

This works nicely provided figures is not ./ — For example, modifying this to attempt to copy latex .sty files (which I need in the current working directory) from an alternate path, I’d tried:

ORIG_FILE_DIRS += ..
LOCAL_FILES += mycommon.sty
DESTDIR := ./

all : $(LOCAL_FILES)

vpath %.sty $(ORIG_FILE_DIRS)

$(filter %.sty,$(LOCAL_FILES)) : $(DESTDIR)/%.sty: %.sty
  mkdir -p $(DESTDIR)
  cp $< $@

(the filter is an attempt to be explicit since I have a few other .sty files in ./)

This gives me

make: Circular mycommon.sty <- mycommon.sty dependency dropped.
make: Nothing to be done for `all'.

I’m unsure how to resolve this. I’d tried an explicit path for the dependency:

$(filter %.sty,$(LOCAL_FILES)) : $(DESTDIR)/%.sty: ../%.sty
  mkdir -p $(DESTDIR)
  cp $< $@

but still get a circular dependency (for ../mycommon.sty) doing so.

  • 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-06-05T03:18:41+00:00Added an answer on June 5, 2026 at 3:18 am

    I can just rename the originals: give them a different suffix, and use a plain old suffix rule.

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

Sidebar

Related Questions

Based on what I had read when I started working on the game that
I've recently started learning Ruby on Rails, based on RoR3 beta/RC. I had earlier
I have a VS11 beta WPF application with a Microsoft Datagrid based on a
based on the MVVM Light 4 beta template I created a 7.5 app and
I installed iPhone OS 4.0 Beta 3. When I create a new Windows-based universal
I an trying to setup Forms Based Authentication using ASPNetSQLMembershipProvider. In 2010 Beta 2,
I need to begin a branch (beta) based in another branch (alpha), you can
I am working a lot on a PHP-based CMS at the moment, and while
I have a web app based on MVC3 (no beta or release candidate, RTM/RTW
Are there any examples of using the Flash 10 beta RTMFP UDP based protocol

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.